<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>com.51degrees</groupId>
    <artifactId>pipeline.device-detection</artifactId>
    <version>4.4.63</version>
    <packaging>pom</packaging>

    <name>51Degrees :: Pipeline :: Device Detection</name>
    <url>https://51degrees.com</url>
    <description>Device detection engines for the 51Degrees Pipeline API</description>

    <modules>
        <module>device-detection.shared</module>
        <module>device-detection.hash.engine.on-premise</module>
        <module>device-detection.cloud</module>
        <module>device-detection</module>
    </modules>

    <developers>
        <developer>
            <name>51Degrees</name>
            <email>support@51degrees.com</email>
        </developer>
    </developers>

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

        <pipeline.version>4.4.32</pipeline.version>

        <junit.version>4.13.2</junit.version>
        <slf4j-api.version>1.7.36</slf4j-api.version>
        <logback-classic.version>1.2.13</logback-classic.version>
        <mockito-core.version>4.3.1</mockito-core.version>
        <org.json.version>20211205</org.json.version>

        <maven-compiler-plugin.version>3.9.0</maven-compiler-plugin.version>
        <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
        <maven-install-plugin.version>2.5.2</maven-install-plugin.version>
        <maven-jar-plugin.version>3.2.2</maven-jar-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-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
        <maven-jarsigner-plugin.version>3.0.0</maven-jarsigner-plugin.version>
        <maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
        <maven-project-info-reports-plugin.version>2.6</maven-project-info-reports-plugin.version>
        <maven-site-plugin.version>3.7.1</maven-site-plugin.version>
        <dependency-check-maven.version>6.5.3</dependency-check-maven.version>

        <ossrh.baseurl>https://oss.sonatype.org</ossrh.baseurl>
        <snapshot-repository.id>ossrh</snapshot-repository.id>
        <snapshot-repository.url>${ossrh.baseurl}/content/repositories/snapshots/</snapshot-repository.url>
        <publishrepository.id>ossrh</publishrepository.id>
        <publishrepository.url>${ossrh.baseurl}/service/local/staging/deploy/maven2/</publishrepository.url>
        <fetchrepository.id>central</fetchrepository.id>
        <fetchrepository.url>https://repo1.maven.org/maven2</fetchrepository.url>

        <skippackagesign>true</skippackagesign>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>pipeline-aggregate</artifactId>
                <version>${pipeline.version}</version>
            </dependency>
            <!-- compile dependencies -->

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j-api.version}</version>
            </dependency>

            <!-- test dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito-core.version}</version>
                <scope>test</scope>
            </dependency>

            <!-- runtime dependencies -->

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback-classic.version}</version>
                <scope>runtime</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- Examples and tests need an implementation of SLF4J at runtime -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
    </dependencies>


    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                        <showWarnings>true</showWarnings>
                        <compilerArgs>
                            <arg>-Xlint:all,-try,-options</arg>
                            <arg>-Werror</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
                <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>${maven-install-plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-install</id>
                        <configuration>
                            <skip>${deployOnly}</skip>
                        </configuration>
                    </execution>
                    <execution>
                        <id>default-test</id>
                        <configuration>
                            <skip>${deployOnly}</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexus-staging-maven-plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>${publishrepository.id}</serverId>
                    <nexusUrl>${ossrh.baseurl}</nexusUrl>
                    <altStagingDirectory>${user.home}/.m2</altStagingDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <useSystemClassLoader>false</useSystemClassLoader>
                    <systemPropertyVariables>
                        <!-- this tells all tests run via surefire to pick their logback config up from the root -->
                        <!-- fwiw does not affect those run via main() which need to find their config by other means -->
                        <!--suppress UnresolvedMavenProperty -->
                        <logback.configurationFile>${maven.multiModuleProjectDirectory}/logback.xml</logback.configurationFile>
                        <!-- this sets the scope of file search (inter alia in getFilePath) to the project directory-->
                        <!--suppress UnresolvedMavenProperty -->
                        <project.root>${maven.multiModuleProjectDirectory}</project.root>
                        <!-- cloud resource key for running tests - this can be defined in  settings.xml -->
                        <TestResourceKey>${TestResourceKey}</TestResourceKey>
                        <!-- special resource key with license for running TAC and Native Model examples
                             - can be defined in settings.xml-->
                        <SuperResourceKey>${SuperResourceKey}</SuperResourceKey>
                        <!-- license key required for running UpdateDataFile example -->
                        <LicenseKey>${LicenseKey}</LicenseKey>
                    </systemPropertyVariables>
                    <properties>
                        <property>
                            <name>listener</name>
                            <value>fiftyone.devicedetection.shared.testhelpers.MavenRunListener</value>
                        </property>
                    </properties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>${exec-maven-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <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>
                    <doclint>none</doclint>
                    <quiet>true</quiet>
                    <detectJavaApiLink>false</detectJavaApiLink>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jarsigner-plugin</artifactId>
                <version>${maven-jarsigner-plugin.version}</version>
                <executions>
                    <execution>
                        <id>sign</id>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skip>${skippackagesign}</skip>
                    <keystore>${keystore}</keystore>
                    <alias>${alias}</alias>
                    <storepass>${keystorepass}</storepass>
                    <keypass>${keypass}</keypass>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven-gpg-plugin.version}</version>
                <configuration>
                    <skip>${skippackagesign}</skip>
                    <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.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven-site-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <version>${dependency-check-maven.version}</version>
                <configuration>
                    <failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
                    <excludes>
                        <exclude>com.51degrees:device-detection.examples.*</exclude>
                        <exclude>com.51degrees:device.detection.shell.examples.*</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${maven-project-info-reports-plugin.version}</version>
            </plugin>
         </plugins>
    </reporting>

    <distributionManagement>
        <repository>
            <id>${publishrepository.id}</id>
            <url>${publishrepository.url}</url>
        </repository>
        <snapshotRepository>
            <id>${snapshot-repository.id}</id>
            <url>${snapshot-repository.url}</url>
        </snapshotRepository>
        <site>
            <id>local</id>
            <url>file:///${maven.multiModuleProjectDirectory}/site/</url>
        </site>
    </distributionManagement>

    <repositories>
        <repository>
            <id>${fetchrepository.id}</id>
            <url>${fetchrepository.url}</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>${snapshot-repository.id}</id>
            <url>${snapshot-repository.url}</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <licenses>
        <license>
            <name>European Union Public License 1.2</name>
            <url>https://opensource.org/licenses/EUPL-1.2</url>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/51Degrees/device-detection-java</url>
        <connection>scm:git:git://github.com/51Degrees/device-detection-java.git</connection>
        <developerConnection>scm:git:info@51degrees.com:51Degrees/device-detection-java.git</developerConnection>
    </scm>

</project>
