<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.github.almasb</groupId>
    <artifactId>fxgl-framework</artifactId>
    <version>0.3.0</version>
    <packaging>pom</packaging>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>JavaFX Game Development Framework</description>
    <url>http://almasb.github.io/FXGL/</url>

    <modules>
        <module>fxgl</module>
        <module>fxgl-net</module>
        <module>fxgl-core</module>
        <module>fxgl-io</module>
        <module>fxgl-ecs</module>
        <module>fxgl-ai</module>
        <module>fxgl-physics</module>
        <module>fxgl-eventbus</module>

        <!-- Modules below show how to use FXGL, but FXGL does not depend on them -->
        <module>fxgl-samples</module>
        <module>fxgl-games</module>
    </modules>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/AlmasB/FXGL</url>
        <connection>scm:git:git://github.com/AlmasB/FXGL.git</connection>
        <developerConnection>scm:git:git@github.com:AlmasB/FXGL.git</developerConnection>
    </scm>

    <developers>
        <developer>
            <email>almaslvl@gmail.com</email>
            <name>Almas Baimagambetov</name>
            <url>https://github.com/AlmasB</url>
            <id>almasb</id>
        </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>

    <issueManagement>
        <url>https://github.com/AlmasB/FXGL/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <source.version>1.8</source.version>
        <fxgl.version>${project.version}</fxgl.version>

        <!-- plugins -->
        <maven.gpg.version>1.6</maven.gpg.version>
        <sonatype.nexus.staging.version>1.6.7</sonatype.nexus.staging.version>
        <maven.compiler.version>3.6.0</maven.compiler.version>
        <maven.enforcer.version>1.4.1</maven.enforcer.version>
        <maven.source.version>3.0.1</maven.source.version>
        <maven.javadoc.version>2.10.3</maven.javadoc.version>
        <dokka.version>0.9.11</dokka.version>
        <maven.shade.version>2.4.3</maven.shade.version>
        <jacoco.version>0.7.8</jacoco.version>
        <apache.http.version>4.5.3</apache.http.version>

        <!-- dependencies -->
        <kotlin.version>1.0.5</kotlin.version>
        <guice.version>4.0</guice.version>
        <jfxtras.version>8.0-r4</jfxtras.version>
        <controlsfx.version>8.40.12</controlsfx.version>
        <jackson.version>2.8.5</jackson.version>
        <log4j.version>2.5</log4j.version>
        <classpath.scanner.version>2.0.10</classpath.scanner.version>

        <!-- test dependencies -->
        <junit.version>4.12</junit.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${log4j.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${log4j.version}</version>
        </dependency>

        <!-- test scope dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>

                <!-- Compile java -->
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.version}</version>
                    <configuration>
                        <source>${source.version}</source>
                        <target>${source.version}</target>
                    </configuration>
                </plugin>

                <!-- Force check on compiler 1.8.0_101+ -->
                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven.enforcer.version}</version>
                    <executions>
                        <execution>
                            <id>enforce-all</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <DependencyConvergence/>
                                    <requireJavaVersion>
                                        <version>[1.8.0-101,)</version>
                                    </requireJavaVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <!-- Sign artifact using gpg -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven.gpg.version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Upload to sonatype nexus / maven central -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${sonatype.nexus.staging.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>