<?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>org.nameapi.ontology</groupId>
    <artifactId>nameapi-ontology5</artifactId>
    <name>nameapi-ontology5</name>
    <version>5.3.4</version>
    <packaging>pom</packaging>

    <url>http://www.nameapi.org</url>
    <description>
        Contains the domain classes that are used as input to the NameAPI services as well as the result objects.
    </description>
    <organization>
        <name>Optimaize GmbH, Switzerland</name>
        <url>http://www.optimaize.com/</url>
    </organization>
    <developers>
        <developer>
            <name>Fabian Kessler</name>
        </developer>
        <developer>
            <name>Nicole Torres</name>
        </developer>
        <developer>
            <name>Alexei Arshavin</name>
        </developer>
        <developer>
            <name>Gabriela Achim</name>
        </developer>
        <developer>
            <name>Sam B.</name>
        </developer>
        <developer>
            <name>Serhii Beliablia</name>
        </developer>
        <developer>
            <name>Stefan Cretu</name>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>GPLv3</name>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/optimaize/nameapi-ontology-java.git</connection>
        <developerConnection>scm:git:git@github.com:optimaize/nameapi-ontology-java.git</developerConnection>
        <url>http://github.com/optimaize/nameapi-ontology-java</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <java-version>1.7</java-version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <jackson.version>2.9.8</jackson.version>

        <maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>

        <repo-base-url>https://artif4ctory.optimaize.com</repo-base-url>
    </properties>

    <repositories>
        <repository>
            <id>optimaize-release</id>
            <url>${repo-base-url}/artifactory/libs-release-local</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
        <repository>
            <id>optimaize-snapshot</id>
            <url>${repo-base-url}/artifactory/libs-snapshot-local</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype Nexus release repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <resources>
            <resource><!-- this is default, but because we tamper with the resources, we need to explicitly mention it. -->
                <directory>src/main/resources</directory>
            </resource>
            <resource><!-- Include the README and LICENSE files: -->
                <directory>${project.basedir}</directory>
                <includes>
                    <include>README*</include>
                    <include>LICENSE*</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>${java-version}</source>
                    <target>${java-version}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.0</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-site-plugin</artifactId>
                <version>3.5</version>
            </plugin>

            <!-- Required: javadoc JAR -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <!-- Automated passphrase entry: -->

                    <!-- To pass your passphrase to the build automatically, so avoiding
                    manual interaction, you'll need to put the passphrase into settings.xml.
                    You don't really want that to be in plain text, so you'll want to follow:
                    http://maven.apache.org/guides/mini/guide-encryption.html -->
                    <!-- <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments> -->

                    <!-- Manual passphrase entry: -->

                    <!-- This is the simplest secure solution, but requires you to type
                    your key passphrase in manually when performing a release. No biggie unless
                    you want your CI server to decide when to release for you. -->
                    <mavenExecutorId>forked-path</mavenExecutorId>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>do-not-release-sign-artifacts</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
            </build>
        </profile>

        <profile>
            <!-- make the build work with Java7 and Java8 out of the box, see
             https://stackoverflow.com/questions/22528767/how-to-work-around-the-stricter-java-8-javadoc-when-using-maven -->
            <id>disable-java8-doclint</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <additionalparam>-Xdoclint:none</additionalparam>
            </properties>
        </profile>

        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <!--<configuration>-->
                        <!--<passphrase>${gpg.passphrase}</passphrase>-->
                        <!--</configuration>-->
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
		                 <configuration>
			            <gpgArguments>
        			        <arg>--batch</arg>
			            </gpgArguments>
            			 </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <configuration>
                    <doctitle>NameAPI: ${project.name} ${project.version} API</doctitle>
                    <finalName>nameapi-ontology-${project.version}</finalName>
                </configuration>
            </plugin>
        </plugins>
    </reporting>


    <dependencies>
        <dependency>
            <groupId>com.intellij</groupId>
            <artifactId>annotations</artifactId>
            <!-- updated on 2013-07-23 -->
            <version>12.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <!-- updated on 2016-03-18. -->
            <version>19.0</version>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <!-- updated on 2015-11-04. -->
            <version>6.9.9</version>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <modules>
        <module>core</module>
        <module>json</module>
    </modules>

</project>
