<?xml version="1.0" encoding="UTF-8"?>
<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>
    <packaging>pom</packaging>

    <groupId>com.kotcrab.vis</groupId>
    <artifactId>vis-parent</artifactId>
    <version>1.3.2</version>
    <description>Common Maven parent for Vis sub-modules</description>

    <name>VisParent</name>
    <url>https://github.com/kotcrab/VisEditor</url>

    <scm>
        <connection>scm:git:git@github.com:kotcrab/VisSceneEditor.git</connection>
        <developerConnection>scm:git:git@github.com:kotcrab/VisSceneEditor.git</developerConnection>
        <url>git@github.com:kotcrab/VisSceneEditor.git</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <gdx.version>1.9.0</gdx.version>
        <artemis.version>1.3.1</artemis.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.kotcrab.annotation</groupId>
            <artifactId>callsuper</artifactId>
            <version>0.1.2</version>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.badlogicgames.gdx</groupId>
                <artifactId>gdx</artifactId>
                <version>${gdx.version}</version>
            </dependency>

            <dependency>
                <groupId>com.badlogicgames.gdx</groupId>
                <artifactId>gdx-backend-lwjgl</artifactId>
                <version>${gdx.version}</version>
            </dependency>

            <dependency>
                <groupId>com.badlogicgames.gdx</groupId>
                <artifactId>gdx-backend-lwjgl3</artifactId>
                <version>${gdx.version}</version>
            </dependency>

            <dependency>
                <groupId>com.badlogicgames.gdx</groupId>
                <artifactId>gdx-platform</artifactId>
                <version>${gdx.version}</version>
                <classifier>natives-desktop</classifier>
            </dependency>

            <dependency>
                <groupId>com.badlogicgames.gdx</groupId>
                <artifactId>gdx-freetype</artifactId>
                <version>${gdx.version}</version>
            </dependency>

            <dependency>
                <groupId>com.badlogicgames.gdx</groupId>
                <artifactId>gdx-freetype-platform</artifactId>
                <version>${gdx.version}</version>
                <classifier>natives-desktop</classifier>
            </dependency>

            <dependency>
                <groupId>com.badlogicgames.gdx</groupId>
                <artifactId>gdx-tools</artifactId>
                <version>${gdx.version}</version>
            </dependency>

            <dependency>
                <groupId>com.badlogicgames.gdx</groupId>
                <artifactId>gdx-box2d</artifactId>
                <version>${gdx.version}</version>
            </dependency>

            <dependency>
                <groupId>com.badlogicgames.gdx</groupId>
                <artifactId>gdx-box2d-platform</artifactId>
                <version>${gdx.version}</version>
                <classifier>natives-desktop</classifier>
            </dependency>

            <dependency>
                <groupId>com.badlogicgames.box2dlights</groupId>
                <artifactId>box2dlights</artifactId>
                <version>1.4</version> <!-- Box2DLights version is different than LibGDX versions -->
            </dependency>

            <dependency>
                <groupId>net.onedaybeard.artemis</groupId>
                <artifactId>artemis-odb</artifactId>
                <version>${artemis.version}</version>
            </dependency>

            <dependency>
                <groupId>net.onedaybeard.artemis</groupId>
                <artifactId>artemis-odb-processor</artifactId>
                <version>${artemis.version}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>

            <dependency>
                <groupId>com.esotericsoftware</groupId>
                <artifactId>kryo</artifactId>
                <version>3.0.1</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.4</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.3.2</version>
            </dependency>

            <dependency>
                <groupId>net.java.dev.jna</groupId>
                <artifactId>jna</artifactId>
                <version>4.1.0</version>
            </dependency>

            <dependency>
                <groupId>net.java.dev.jna</groupId>
                <artifactId>platform</artifactId>
                <version>3.5.2</version>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>18.0</version>
            </dependency>

            <dependency>
                <groupId>org.jsoup</groupId>
                <artifactId>jsoup</artifactId>
                <version>1.8.2</version>
            </dependency>

            <dependency>
                <groupId>com.brsanthu</groupId>
                <artifactId>google-analytics-java</artifactId>
                <version>1.1.2</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>1.7.12</version>
            </dependency>

            <dependency>
                <groupId>org.imgscalr</groupId>
                <artifactId>imgscalr-lib</artifactId>
                <version>4.2</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>2.4</version>
            </dependency>

            <dependency>
                <groupId>uk.com.robust-it</groupId>
                <artifactId>cloning</artifactId>
                <version>1.9.2</version>
            </dependency>

            <dependency>
                <groupId>org.jooq</groupId>
                <artifactId>joor</artifactId>
                <version>0.9.5</version>
            </dependency>

            <dependency>
                <groupId>com.thoughtworks.xstream</groupId>
                <artifactId>xstream</artifactId>
                <version>1.4.8</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>kotcrab</id>
            <name>Pawel Pastuszak</name>
            <url>http://kotcrab.com</url>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <sourceDirectory>src</sourceDirectory>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <annotationProcessors>
                        <annotationProcessor>com.kotcrab.annotation.callsuper.CallSuperProcessor</annotationProcessor>
                    </annotationProcessors>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.3</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.6</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>jenkins</id> <!-- Jenkins should only build -SNAPSHOTs -->
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <evaluateBeanshell>
                                            <condition>"${project.version}".endsWith("-SNAPSHOT")</condition>
                                            <message>Jenkins should only build -SNAPSHOT versions</message>
                                        </evaluateBeanshell>
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.2</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <additionalparam>-Xdoclint:none</additionalparam>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
