<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>
    <!-- <parent> <groupId>com.github.davidmoten</groupId> <artifactId>sonatype-parent</artifactId> 
        <version>0.1</version> </parent> -->
    <groupId>au.gov.amsa.risky</groupId>
    <artifactId>parent</artifactId>
    <version>0.6.2.0</version>
    <name>${project.artifactId}</name>
    <description>Parent pom for risky project modules</description>
    <packaging>pom</packaging>
    
    <url>http://github.com/amsa-code/risky</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <scm.url>scm:git:https://github.com/amsa-code/risky.git</scm.url>
        <compiler.source>1.8</compiler.source>
        <compiler.target>1.8</compiler.target>
        <rxjava.version>1.3.8</rxjava.version>
        <rxjava.string.version>1.1.1</rxjava.string.version>
        <rxjava.math.version>1.0.0</rxjava.math.version>
        <rxjava.extras.version>0.8.0.18</rxjava.extras.version>
        <rxjava.slf4j.version>0.6.12</rxjava.slf4j.version>
        <rtree.version>0.8.7</rtree.version>
        <slf4j.version>1.7.32</slf4j.version>
        <grumpy.version>0.4.3</grumpy.version>
        <guava.version>31.0.1-jre</guava.version>
        <guava.mini.version>0.1.3</guava.mini.version>
        <geotools.version>26.0</geotools.version>
        <joda.time.version>2.7</joda.time.version>
        <junit.version>4.13.2</junit.version>
        <exec.version>3.0.0</exec.version>
        <mockito.version>4.0.0</mockito.version>
        <jmh.version>1.33</jmh.version>
        <parquet.version>1.12.2</parquet.version>
        <hadoop.version>3.3.1</hadoop.version>
        <easymock.version>4.3</easymock.version>

        <nexus.staging.version>1.6.8</nexus.staging.version>
        <checkstyle.version>3.1.2</checkstyle.version>
        <jacoco.plugin.version>0.8.7</jacoco.plugin.version>
        <findbugs.version>3.0.5</findbugs.version>
        <javadoc.version>3.3.1</javadoc.version>
        <pmd.version>3.15.0</pmd.version>
        <jdepend.version>2.0</jdepend.version>
        <javancss.version>2.1</javancss.version>
        <project.info.version>2.7</project.info.version>
        <jxr.version>3.1.1</jxr.version>
        <taglist.version>2.4</taglist.version>
        <m3.site.version>3.9.1</m3.site.version>
    </properties>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Dave Moten</name>
            <email>david.moten@amsa.gov.au</email>
            <organization>AMSA</organization>
            <organizationUrl>http://www.amsa.gov.au</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>${scm.url}</connection>
        <developerConnection>${scm.url}</developerConnection>
        <url>${scm.url}</url>
        <tag>HEAD</tag>
    </scm>

    <modules>
        <module>streams</module>
        <module>ais</module>
        <module>risky-util</module>
        <module>behaviour-detector</module>
        <module>geo-analyzer</module>
        <module>craft-analyzer-wms</module>
        <module>formats</module>
        <module>ihs-reader</module>
        <!-- <module>renjin</module> -->
        <module>h2spatial</module>
        <module>spark</module>
        <module>animator</module>
        <module>geotools-extras</module>
        <module>ais-router</module>
        <module>ais-parquet</module>
    </modules>

    <build>
        <plugins>
            <plugin>
                <inherited>true</inherited>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <verbose>true</verbose>
                    <fork>true</fork>
                    <source>${compiler.source}</source>
                    <target>${compiler.target}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <!-- <execution> <id>report</id> <phase>test</phase> 
                        <goals> <goal>report</goal> </goals> <configuration> </configuration> </execution> -->
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M5</version>
                <configuration>
                    <!-- required to get jacoco to work locally -->
                    <argLine>@{argLine}</argLine>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>${m3.site.version}</version>
                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${javadoc.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <doclint>none</doclint>
                            <source>8</source>
                            <detectJavaApiLink>false</detectJavaApiLink>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <outputDirectory>${project.build.directory}/site</outputDirectory>
        <plugins>
            <!-- this one should go first so that it is available to other 
                plugins when they run -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>${jxr.version}</version>
                <configuration>
                    <aggregate>true</aggregate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyle.version}</version>
                <configuration>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${pmd.version}</version>
                <configuration>
                    <targetJdk>${maven.compiler.target}</targetJdk>
                    <aggregate>true</aggregate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${findbugs.version}</version>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                    <effort>Max</effort>
                    <!--<excludeFilterFile>findbugs-exclude-filter-amsa.xml</excludeFilterFile> -->
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jdepend-maven-plugin</artifactId>
                <version>${jdepend.version}</version>
            </plugin>
            <!-- javancss failing on OperatorSubscriptionInterval.java so 
                disabling -->
            <!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>javancss-maven-plugin</artifactId> 
                <version>${javancss.version}</version> </plugin> -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${project.info.version}</version>
                <configuration>
                    <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>${taglist.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${javadoc.version}</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <repositories>
        <repository>
            <id>osgeo</id>
            <name>Open Source Geospatial Foundation Repository</name>
            <url>https://repo.osgeo.org/repository/release/</url>
        </repository>
        <repository>
            <id>osgeo-insecure</id>
            <name>Open Source Geospatial Foundation Repository</name>
            <url>http://download.osgeo.org/webdav/geotools/</url>
        </repository>
    </repositories>

    <distributionManagement>
        <repository>
            <id>${risky.repo}</id>
            <url>${risky.repo.url}</url>
        </repository>
        <site>
            <id>site</id>
            <url>${site.url}</url>
        </site>
    </distributionManagement>
    
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>                    
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus.staging.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <name>Maven Central</name>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <name>Maven Central</name>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>

</project>
