<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ (c) Copyright 2014-2015 Micro Focus or one of its affiliates.
  ~
  ~ Licensed under the MIT License (the "License"); you may not use this file
  ~ except in compliance with the License.
  ~
  ~ The only warranties for products and services of Micro Focus and its affiliates
  ~ and licensors ("Micro Focus") are as may be set forth in the express warranty
  ~ statements accompanying such products and services. Nothing herein should be
  ~ construed as constituting an additional warranty. Micro Focus shall not be
  ~ liable for technical or editorial errors or omissions contained herein. The
  ~ information contained herein is subject to change without notice.
  -->
<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.hp.autonomy</groupId>
    <artifactId>foss-master-pom</artifactId>
    <version>3.0.0</version>
    <packaging>pom</packaging>

    <name>OpenText IDOL FOSS Master POM</name>
    <description>Master Parent POM for OpenText IDOL Artifacts</description>
    <url>https://github.com/microfocus-idol/foss-master-pom</url>

    <organization>
        <name>OpenText</name>
        <url>https://www.opentext.com/</url>
    </organization>

    <inceptionYear>2014</inceptionYear>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Alex Scown</name>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:opentext-idol/foss-master-pom.git</connection>
        <developerConnection>scm:git:git@github.com:opentext-idol/foss-master-pom.git</developerConnection>
        <url>git@github.com:opentext-idol/foss-master-pom.git</url>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/opentext-idol/foss-master-pom/issues</url>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <java.version>17</java.version>
        <netbeans.hint.jdkPlatform>JDK_17</netbeans.hint.jdkPlatform>
        <gpg.publicKeyring>${project.basedir}/public.gpg</gpg.publicKeyring>
        <gpg.secretKeyring>${project.basedir}/secret.gpg</gpg.secretKeyring>
    </properties>

    <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>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>3.5.0</version>
                        <executions>
                            <execution>
                                <id>check-dependencies</id>
                                <goals>
                                    <goal>analyze-only</goal>
                                </goals>
                                <configuration>
                                    <failOnWarning>${enforceCorrectDependencies}</failOnWarning>
                                    <ignoreNonCompile>true</ignoreNonCompile>
                                </configuration>
                            </execution>
                        </executions>
                    </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.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.5.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <author>false</author>
                            <detectLinks>true</detectLinks>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</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>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>travis</id>
            <activation>
                <property>
                    <name>env.TRAVIS</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>
                                <configuration>
                                    <defaultKeyring>false</defaultKeyring>
                                    <keyname>${env.GPG_KEYID}</keyname>
                                    <passphrase>${env.GPG_PASSPHRASE}</passphrase>
                                    <publicKeyring>${gpg.publicKeyring}</publicKeyring>
                                    <secretKeyring>${gpg.secretKeyring}</secretKeyring>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <release>17</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                </configuration>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>
</project>
