<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>de.fraunhofer.iosb.ilt.FROST-Server</groupId>
    <artifactId>FROST-ServerParent</artifactId>
    <version>2.0.2</version>
    <packaging>pom</packaging>

    <name>FROST-ServerParent</name>
    <description>A server implementation of the OGC SensorThings API.</description>
    <url>https://github.com/FraunhoferIOSB/FROST-Server</url>
    <inceptionYear>2016</inceptionYear>

    <modules>
        <module>FROST-Server.MQTTP</module>
        <module>FROST-Server.HTTP</module>
        <module>FROST-Server.HTTP.Common</module>
        <module>FROST-Server.MQTT</module>
        <module>FROST-Server.MQTT.Moquette</module>
        <module>FROST-Server.Core.Model</module>
        <module>FROST-Server.Core</module>
        <module>FROST-Server.SQLjooq</module>
        <module>FROST-Server.Auth.Basic</module>
        <module>FROST-Server.Auth.Keycloak</module>
        <module>FROST-Server.Util</module>
        <module>Plugins</module>
        <module>Tools</module>
        <module>FROST-Server.Tests</module>
    </modules>

    <properties>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <annotation-api.version>1.3.1</annotation-api.version>
        <codegen.version>0.6.8-uuid</codegen.version>
        <commons-csv.version>1.9.0</commons-csv.version>
        <commons-io.version>2.11.0</commons-io.version>
        <commons-lang3.version>3.12.0</commons-lang3.version>
        <commons-text.version>1.9</commons-text.version>
        <configurable.version>0.33</configurable.version>
        <FROST-Client.version>0.42</FROST-Client.version>
        <git-commit-id-plugin.version>5.0.0</git-commit-id-plugin.version>
        <geolatte-common.version>0.8</geolatte-common.version>
        <guava.version>31.1-jre</guava.version>
        <httpclient.version>4.5.13</httpclient.version>
        <dbcp2.version>2.9.0</dbcp2.version>
        <jackson.version>2.13.3</jackson.version>
        <jackson-databind.version>2.13.3</jackson-databind.version>
        <jacksonGeojson.version>1.14</jacksonGeojson.version>
        <javacc.version>7.0.11</javacc.version>
        <javacc-maven-plugin.version>2.6</javacc-maven-plugin.version>
        <javax-servlet.version>4.0.1</javax-servlet.version>
        <jetty.version>10.0.11</jetty.version>
        <json-patch.version>1.13</json-patch.version>
        <junit.version>5.8.2</junit.version>
        <junit.platform.version>1.8.2</junit.platform.version>
        <keycloak.version>18.0.1</keycloak.version>
        <liquibase.version>4.12.0</liquibase.version>
        <logback.version>1.2.11</logback.version>

        <maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
        <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
        <maven-dependency-plugin.version>3.3.0</maven-dependency-plugin.version>
        <maven-gpg-plugin>3.0.1</maven-gpg-plugin>
        <maven-jacoco-plugin.version>0.8.8</maven-jacoco-plugin.version>
        <maven-jar-plugin>3.2.2</maven-jar-plugin>
        <maven-javadoc-plugin.version>3.4.0</maven-javadoc-plugin.version>
        <maven-nexus-staging-plugin>1.6.13</maven-nexus-staging-plugin>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
        <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
        <maven-war-plugin.version>3.3.2</maven-war-plugin.version>
        <owasp.version>7.1.1</owasp.version>

        <org.json.version>20220320</org.json.version>
        <paho.version>1.2.5</paho.version>
        <postgis.version>2.5.1</postgis.version>
        <postgres.version>42.4.0</postgres.version>
        <slf4j-api.version>1.7.36</slf4j-api.version>
        <testcontainers.version>1.17.2</testcontainers.version>
        <testcontainers-keycloak.version>2.2.2</testcontainers-keycloak.version>
        <time4j.version>5.9.1</time4j.version>

        <javax-activation.version>1.1.1</javax-activation.version>
        <dockerfile-maven-plugin.version>1.4.13</dockerfile-maven-plugin.version>

        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
        <docker.dependencies.dir>${project.build.directory}/docker_deps</docker.dependencies.dir>

        <!-- Sonar -->
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
        <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../FROST-Server.Tests/target/site/jacoco-aggregate/jacoco.xml,${project.basedir}/../../FROST-Server.Tests/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
        <sonar.language>java</sonar.language>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <sonar.organization>fraunhofer-iosb</sonar.organization>
        <sonar.cpd.java.minimumLines>15</sonar.cpd.java.minimumLines>
    </properties>

    <licenses>
        <license>
            <name>GNU Lesser General Public License v3, or (at your option) any later version</name>
            <url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
            <comments>For more information see the LICENSE.txt included with the sources.</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Hylke van der Schaaf</name>
            <email>hylke.vanderschaaf@iosb.fraunhofer.de</email>
            <organization>Fraunhofer IOSB</organization>
            <organizationUrl>https://www.iosb.fraunhofer.de</organizationUrl>
        </developer>
    </developers>

    <organization>
        <name>Fraunhofer IOSB</name>
        <url>http://iosb.fraunhofer.de</url>
    </organization>

    <scm>
        <connection>scm:git:git://github.com/FraunhoferIOSB/SensorThingsServer.git</connection>
        <developerConnection>scm:git:ssh://github.com:FraunhoferIOSB/SensorThingsServer.git</developerConnection>
        <url>https://github.com/FraunhoferIOSB/FROST-Server/tree/master</url>
        <tag>v2.0.x</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/FraunhoferIOSB/FROST-Server/issues</url>
    </issueManagement>

    <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>

    <profiles>
        <profile>
            <id>owasp</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.owasp</groupId>
                        <artifactId>dependency-check-maven</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${maven-jacoco-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>prepare-agent</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report-aggregate</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>report-aggregate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <configuration>
                            <excludePackageNames>de.fraunhofer.iosb.ilt.frostserver.parser.path:de.fraunhofer.iosb.ilt.frostserver.parser.query:de.fraunhofer.iosb.ilt.frostserver.util.wktparser</excludePackageNames>
                            <quiet>true</quiet>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin}</version>
                        <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>${maven-nexus-staging-plugin}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven-assembly-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${maven-war-plugin.version}</version>
                    <configuration>
                        <archiveClasses>true</archiveClasses>
                        <attachClasses>true</attachClasses>
                        <failOnMissingWebXml>true</failOnMissingWebXml>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>${owasp.version}</version>
                    <configuration>
                        <suppressionFiles>
                            <suppressionFile>owaspSuppressions.xml</suppressionFile>
                        </suppressionFiles>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>aggregate</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
            </plugin>
        </plugins>
    </build>

</project>
