<!--
  Maven POM for CanaryLib
  Copyright (C) 2012-2014 CanaryMod Team <http://www.canarymod.net>
  CanaryLib is available under the BSD 3-Clause License
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>net.canarymod</groupId>
    <artifactId>CanaryLib</artifactId>
    <packaging>jar</packaging>
    <version>1.2.0</version>
    <name>CanaryLib</name>
    <url>http://www.canarymod.net</url>
    <inceptionYear>2012</inceptionYear>
    <organization>
        <name>CanaryMod Team</name>
        <url>http://canarymod.net</url>
    </organization>
    <licenses>
        <license>
            <name>BSD 3-Clause License</name>
            <url>http://opensource.org/licenses/BSD-3-Clause</url>
            <comments>
                Copyright (c) 2012 - 2014, CanaryMod Team
                Under the management of PlayBlack and Visual Illusions Entertainment
                All rights reserved.

                Redistribution and use in source and binary forms, with or without
                modification, are permitted provided that the following conditions are met:
                * Redistributions of source code must retain the above copyright
                notice, this list of conditions and the following disclaimer.
                * Redistributions in binary form must reproduce the above copyright
                notice, this list of conditions and the following disclaimer in the
                documentation and/or other materials provided with the distribution.
                * Neither the name of the CanaryMod Team nor the
                names of its contributors may be used to endorse or promote products
                derived from this software without specific prior written permission.

                THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
                ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
                WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
                DISCLAIMED. IN NO EVENT SHALL CANARYMOD TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY
                DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
                (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
                LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
                ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
                SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

                Any source code from the Minecraft Server is not owned by CanaryMod Team, PlayBlack,
                Visual Illusions Entertainment, or its contributors and is not covered by above license.
                Usage of source code from the Minecraft Server is subject to the Minecraft End User License Agreement
                as set forth by Mojang AB.
                The Minecraft EULA can be viewed at https://account.mojang.com/documents/minecraft_eula
                CanaryMod Team, PlayBlack, Visual Illusions Entertainment, CanaryLib, CanaryMod,
                and its contributors are NOT affiliated with, endorsed, or sponsored by Mojang AB, makers of Minecraft.
                "Minecraft" is a trademark of Notch Development AB
                "CanaryMod" name is used with permission from FallenMoonNetwork.
            </comments>
        </license>
    </licenses>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.build.timestamp.format>dd MMMM yyyy HH:mm z</maven.build.timestamp.format>
        <build.number/>
    </properties>
    <scm>
        <connection>scm:git:git://github.com/CanaryModTeam/CanaryLib.git</connection>
        <url>https://github.com/CanaryModTeam/CanaryLib</url>
        <developerConnection>scm:git:git@github.com:CanaryModTeam/CanaryLib.git</developerConnection>
    </scm>
    <issueManagement>
        <url>https://github.com/CanaryModTeam/CanaryLib/issues</url>
        <system>GitHub</system>
    </issueManagement>
    <ciManagement>
        <system>Jenkins</system>
        <url>http://ci.visualillusionsent.net/job/CanaryLib/</url>
    </ciManagement>
    <distributionManagement>
        <repository>
            <id>vi-repo</id>
            <name>Visual Illusions Repository</name>
            <url>http://repo.visualillusionsent.net/repository/internal/</url>
        </repository>
        <snapshotRepository>
            <id>vi-repo</id>
            <name>Visual Illusions Repository</name>
            <url>http://repo.visualillusionsent.net/repository/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
    <repositories>
        <repository>
            <id>vi-repo</id>
            <name>Visual Illusions Repository</name>
            <url>http://repo.visualillusionsent.net/repository/internal/</url>
        </repository>
        <repository>
            <id>vi-snapshots</id>
            <name>Visual Illusions Snapshots Repository</name>
            <url>http://repo.visualillusionsent.net/repository/snapshots/</url>
        </repository>
        <repository>
            <id>mojang</id>
            <name>Minecraft Libraries</name>
            <url>https://libraries.minecraft.net</url>
        </repository>
    </repositories>
    <dependencies>
        <!-- Compile Time Dependencies -->
        <dependency>
            <groupId>net.visualillusionsent</groupId>
            <artifactId>viutils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom2</artifactId>
        </dependency>
        <dependency>
            <groupId>com.mchange</groupId>
            <artifactId>c3p0</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>com.mojang</groupId>
            <artifactId>authlib</artifactId>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
        </dependency>
        <dependency>
            <groupId>org.luaj</groupId>
            <artifactId>luaj-jse</artifactId>
        </dependency>
        <!-- Runtime Dependencies -->
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <!-- Test Dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
    </dependencies>
    <build>
        <defaultGoal>clean install</defaultGoal>
        <!-- Adds the build number if it is set -->
        <finalName>${project.name}-${project.version}${build.number}</finalName>
        <!-- Plugins -->
        <plugins>
            <!-- Compile plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Scala Plugin -->
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>scala-compile-first</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>scala-test-compile</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Dependency shader -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>shaded</shadedClassifierName>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <finalName>${project.artifactId}-${project.version}${build.number}-shaded</finalName>
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>META-INF/*.SF</exclude>
                                <exclude>META-INF/*.DSA</exclude>
                                <exclude>META-INF/*.RSA</exclude>
                            </excludes>
                        </filter>
                    </filters>
                </configuration>
            </plugin>
            <!-- JAR creation plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <archive>
                        <addMavenDescriptor>true</addMavenDescriptor>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <!-- Release -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.2.2</version>
                <configuration>
                    <preparationGoals>jar:jar</preparationGoals>
                    <goals>jar:jar</goals>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>attach-sources-javadoc</id>

            <build>
                <plugins>
                    <!-- Source plugin -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- JavaDoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.7</version>
                        <configuration>
                            <linksource>true</linksource>
                            <doctitle>${project.name} ${project.version}</doctitle>
                            <header>Generated: ${maven.build.timestamp}</header>
                            <footer>
                                <![CDATA[Licensed under the <a href="http://opensource.org/licenses/BSD-3-Clause">BSD 3-Clause License</a>]]></footer>
                            <links>
                                <link>http://docs.visualillusionsent.net/VIUtils/1.4.0/</link>
                                <link>http://www.jdom.org/docs/apidocs/</link>
                            </links>
                            <tags>
                                <!-- Cause damagefilter uses @tags that don't exist... We need to make them exist -->
                                <tag>
                                    <name>PluginDev</name>
                                    <placement>a</placement>
                                    <head>PluginDev:</head>
                                </tag>
                            </tags>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- Add Build number to a Jenkins build -->
        <profile>
            <id>jenkins</id>
            <activation>
                <property>
                    <name>BUILD_NUMBER</name>
                </property>
            </activation>
            <properties>
                <build.number>-${BUILD_NUMBER}</build.number>
            </properties>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <!-- Compile Time Dependencies -->
            <dependency>
                <groupId>net.visualillusionsent</groupId>
                <artifactId>viutils</artifactId>
                <version>1.4.0</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.jdom</groupId>
                <artifactId>jdom2</artifactId>
                <version>2.0.5</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.mchange</groupId>
                <artifactId>c3p0</artifactId>
                <version>0.9.2.1</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>2.0-beta9</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>15.0</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.mojang</groupId>
                <artifactId>authlib</artifactId>
                <version>1.5.16</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                <version>2.11.2</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.luaj</groupId>
                <artifactId>luaj-jse</artifactId>
                <version>3.0</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.googlecode.json-simple</groupId>
                <artifactId>json-simple</artifactId>
                <version>1.1.1</version>
                <scope>compile</scope>
            </dependency>
            <!-- Runtime Dependencies -->
            <dependency>
                <groupId>org.xerial</groupId>
                <artifactId>sqlite-jdbc</artifactId>
                <version>3.7.2</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>5.1.21</version>
                <scope>runtime</scope>
            </dependency>
            <!-- Test Dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.11</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>
