<?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>be.cytomine.client</groupId>
    <artifactId>cytomine-java-client</artifactId>
    <version>2.2.1</version>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Cytomine-java-client is an opensource Cytomine client.</description>
    <url>http://www.cytomine.be</url>

    <developers>
        <developer>
            <id>cytomine</id>
            <name>Cytomine</name>
            <email>info@cytomine.coop</email>
        </developer>
        <developer>
            <id>geektortoise</id>
            <name>Renaud Hoyoux</name>
            <email>Renaud.Hoyoux@cytomine.coop</email>
        </developer>
        <developer>
            <id>lrollus</id>
            <name>Loïc ROLLUS</name>
            <email>loic.rollus@cytomine.com</email>
        </developer>
        <developer>
            <id>urubens</id>
            <name>Ulysse Rubens</name>
            <email>urubens@uliege.be</email>
        </developer>
    </developers>

    <!-- This section is mandatory to publish jar in maven central -->
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <!-- This section is mandatory to publish jar in maven central -->
    <scm>
        <connection>scm:git:git://github.com/cytomine/Cytomine-java-client</connection>
        <developerConnection>scm:git:ssh://github.com:cytomine/Cytomine-java-client</developerConnection>
        <url>http://github.com/cytomine/Cytomine-java-client/tree/master</url>
    </scm>

    <dependencies>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.0.1</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>fluent-hc</artifactId>
            <version>4.3.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.3.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-cache</artifactId>
            <version>4.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>4.3.1</version>
        </dependency>

        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.jms</groupId>
                    <artifactId>jms</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jmx</groupId>
                    <artifactId>jmxri</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jdmk</groupId>
                    <artifactId>jmxtools</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <version>0.9.11</version>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.0.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <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://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <!-- Attach source jars-->
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>attach-source</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Attach javadocs jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <additionalOptions>
                        <additionalOption>-Xdoclint:none</additionalOption>
                    </additionalOptions>
                </configuration>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-surefire-provider</artifactId>
                        <version>1.0.1</version>
                    </dependency>
                    <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-engine</artifactId>
                        <version>5.0.0</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--<plugin>-->
            <!--<artifactId>maven-assembly-plugin</artifactId>-->
            <!--<configuration>-->
            <!--<archive>-->
            <!--<manifest>-->
            <!--<mainClass>fully.qualified.MainClass</mainClass>-->
            <!--</manifest>-->
            <!--</archive>-->
            <!--<descriptorRefs>-->
            <!--<descriptorRef>jar-with-dependencies</descriptorRef>-->
            <!--</descriptorRefs>-->
            <!--</configuration>-->
            <!--</plugin>-->
<!--            <plugin>-->
<!--                <artifactId>maven-assembly-plugin</artifactId>-->
<!--                <version>2.2</version>-->
<!--                <configuration>-->
<!--                    <descriptorRefs>-->
<!--                        <descriptorRef>jar-with-dependencies</descriptorRef>-->
<!--                    </descriptorRefs>-->
<!--                </configuration>-->
<!--                <executions>-->
<!--                    <execution>-->
<!--                        <id>make-assembly</id>-->
<!--                        <phase>package</phase>-->
<!--                        <goals>-->
<!--                            <goal>single</goal>-->
<!--                        </goals>-->
<!--                    </execution>-->
<!--                </executions>-->
<!--            </plugin>-->
        </plugins>
    </build>

    <!-- This snippet makes it so that the signing process be triggered only when building our library with the flag -Pci-cd. -->
    <profiles>
        <profile>
            <id>ci-cd</id>
<!--            <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>-->
<!--                                    &lt;!&ndash; Prevent gpg from using pinentry programs. Fixes: gpg: signing-->
<!--                                        failed: Inappropriate ioctl for device &ndash;&gt;-->
<!--                                    <gpgArguments>-->
<!--                                        <arg>&#45;&#45;pinentry-mode</arg>-->
<!--                                        <arg>loopback</arg>-->
<!--                                    </gpgArguments>-->
<!--                                </configuration>-->
<!--                            </execution>-->
<!--                        </executions>-->
<!--                    </plugin>-->
<!--                </plugins>-->
<!--            </build>-->
<!--            <build>-->
<!--                <plugins>-->
<!--                    <plugin>-->
<!--                        <groupId>org.apache.maven.plugins</groupId>-->
<!--                        <artifactId>maven-gpg-plugin</artifactId>-->
<!--                        <version>1.5</version>-->
<!--                        <executions>-->
<!--                            <execution>-->
<!--                                <id>sign-artifacts</id>-->
<!--                                <phase>verify</phase>-->
<!--                                <goals>-->
<!--                                    <goal>sign</goal>-->
<!--                                </goals>-->
<!--                            </execution>-->
<!--                        </executions>-->
<!--                    </plugin>-->
<!--                </plugins>-->
<!--            </build>-->
        </profile>
    </profiles>

<!--    <distributionManagement>-->
<!--        <snapshotRepository>-->
<!--            <id>ossrh</id>-->
<!--            <name>Sonatype Nexus Snapshots</name>-->
<!--            <url>https://oss.sonatype.org/content/repositories/snapshots</url>-->
<!--        </snapshotRepository>-->
<!--        <repository>-->
<!--            <id>ossrh</id>-->
<!--            <name>Nexus Release Repository</name>-->
<!--            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>-->
<!--        </repository>-->
<!--    </distributionManagement>-->
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
</project>