<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Xlint="http://www.w3.org/2001/XMLSchema" 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.commercetools.sdk.jvm.core</groupId>
    <artifactId>commercetools-jvm-sdk</artifactId>
    <packaging>pom</packaging>
    <version>1.41.0</version>
    <name>commercetools JVM SDK</name>
    <description>Java bindings for the commercetools platform</description>
    <url>https://github.com/commercetools/commercetools-jvm-sdk</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>michaelschleichardt</id>
            <name>Michael Schleichardt</name>
            <url>https://github.com/schleichardt</url>
        </developer>
        <developer>
            <id>lauraluiz</id>
            <name>Laura Luiz</name>
            <url>https://github.com/lauraluiz</url>
        </developer>
        <developer>
            <id>matthiaskoester</id>
            <name>Matthias Köster</name>
            <url>https://github.com/katmatt</url>
        </developer>
        <developer>
            <id>achrafbeniasaad</id>
            <name>Achraf Beniasaad</name>
            <url>https://github.com/acbeni</url>
        </developer>
        <developer>
            <id>aleksandarpetrovic</id>
            <name>Aleksandar Petrovic</name>
            <url>https://github.com/alex-ct</url>
        </developer>
    </developers>
    <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>
    <modules>
        <module>commercetools-convenience</module>
        <module>commercetools-internal-docs</module>
        <module>commercetools-internal-processors</module>
        <module>commercetools-java-client</module>
        <module>commercetools-java-client-ahc-1_8</module>
        <module>commercetools-java-client-ahc-1_9</module>
        <module>commercetools-java-client-ahc-2_0</module>
        <module>commercetools-java-client-ahc-2_5</module>
        <module>commercetools-java-client-apache-async</module>
        <module>commercetools-java-client-core</module>
        <module>commercetools-java-client-internal-test</module>
        <module>commercetools-models</module>
        <module>commercetools-sdk-base</module>
        <module>commercetools-test-lib</module>
        <module>sdk-http</module>
        <module>sdk-http-ahc-1_8</module>
        <module>sdk-http-ahc-1_9</module>
        <module>sdk-http-ahc-2_0</module>
        <module>sdk-http-ahc-2_5</module>
        <module>sdk-http-apache-async</module>
        <module>osgi-support</module>
    </modules>
    <scm>
        <url>git@github.com:commercetools/commercetools-jvm-sdk.git</url>
        <connection>scm:git:git@github.com:commercetools/commercetools-jvm-sdk.git</connection>
        <tag>HEAD</tag>
    </scm>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.major.version>8</java.major.version>
        <java.version>1.${java.major.version}</java.version>

        <jackson.version>2.9.8</jackson.version>
        <gson.version>2.5</gson.version>
        <asynchttpclient18.version>1.8.16</asynchttpclient18.version>
        <asynchttpclient19.version>1.9.33</asynchttpclient19.version>
        <asynchttpclient20.version>2.0.38</asynchttpclient20.version>
        <asynchttpclient25.version>2.5.4</asynchttpclient25.version>
        <httpasyncclient.version>4.1.1</httpasyncclient.version>
        <netty.version>4.0.54.Final</netty.version>
        <nv-i18n.version>1.18</nv-i18n.version>
        <commons-lang3>3.4</commons-lang3>
        <commons-io.version>2.4</commons-io.version>
        <moneta.version>1.1</moneta.version>
        <slf4j.version>1.7.21</slf4j.version>
        <logback.version>1.1.7</logback.version>
        <jsr305.version>3.0.1</jsr305.version>
        <junit.version>4.12</junit.version>
        <assertj.version>3.8.0</assertj.version>
        <mockito.version>2.9.0</mockito.version>
        <commercetools-taglets.version>0.8.4</commercetools-taglets.version>
        <jacoco.version>0.7.5.201505241946</jacoco.version>
        <maven-scm-publish-plugin.version>1.1</maven-scm-publish-plugin.version>
        <maven-scm-publish-plugin.scm.url>scm:git:git@github.com:commercetools/commercetools-jvm-sdk.git
        </maven-scm-publish-plugin.scm.url>
        <maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
        <maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
        <maven-failsafe-plugin.version>2.19.1</maven-failsafe-plugin.version>
        <maven-release-plugin.version>2.5</maven-release-plugin.version>
        <maven-source-plugin.version>3.0.0</maven-source-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.6</nexus-staging-maven-plugin.version>
        <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <handlebars.version>4.0.6</handlebars.version>
        <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
        <money-api.version>1.0.1</money-api.version>
        <moneta.version>1.1</moneta.version>
        <apache.httpclient.version>4.1.3</apache.httpclient.version>
        <pax-exam.version>4.11.0</pax-exam.version>
        <pax-exam.logging.version>1.10.1</pax-exam.logging.version>
        <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
        <felix.maven.version>3.3.0</felix.maven.version>
        <felix.version>5.6.2</felix.version>
        <javadoc.additionalparams/>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.4</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.4</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-parameter-names</artifactId>
            <version>${jackson.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
            <version>${jackson.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-cbor</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <!-- contains @Nullable annotation -->
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>${jsr305.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.jcip</groupId>
            <artifactId>jcip-annotations</artifactId>
            <version>1.0</version>
            <scope>test</scope>
        </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>${java.version}</source>
                        <target>${java.version}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <compilerArguments>
                            <parameters/>
                            <!--<Werror />--><!--  actually this setting breaks the build for annotation processing -->
                            <Xlint:all xmlns:Xlint=""/>
                            <!--<arg>-Xlint:unchecked</arg>-->
                            <!--<arg>-Xlint:-options</arg>-->
                            <!--<arg>-Xlint:-path</arg>-->
                            <!--<arg>-parameters</arg>-->
                        </compilerArguments>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <docfilessubdirs>true</docfilessubdirs>
                        <excludePackageNames>*.internal:*.priv</excludePackageNames>
                        <quiet>true</quiet>
                        <notimestamp>true</notimestamp>
                        <bottom><![CDATA[
                            <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.8.0/styles/default.min.css'>
                            <script src='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.8.0/highlight.min.js'></script>
                            <script>hljs.initHighlightingOnLoad();</script>
                            <script src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'></script>
                            <span id='custom-javascripts'></span>
                            <script src='{@docRoot}/resources/javascripts/main.js'></script>
                            <link rel='stylesheet' href='{@docRoot}/resources/stylesheets/main.css'>
                        ]]></bottom>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <charset>${project.build.sourceEncoding}</charset>
                        <docencoding>${project.build.sourceEncoding}</docencoding>
                        <additionalparam>-Xdoclint:missing,syntax,accessibility,reference ${javadoc.additionalparams}
                        </additionalparam>
                        <taglets>
                            <!-- see https://github.com/commercetools/commercetools-taglets -->
                            <taglet>
                                <tagletClass>com.commercetools.sdk.jvm.taglets.DocumentationTaglet</tagletClass>
                                <tagletArtifact>
                                    <groupId>com.commercetools.build.taglets</groupId>
                                    <artifactId>commercetools-taglets</artifactId>
                                    <version>${commercetools-taglets.version}</version>
                                </tagletArtifact>
                            </taglet>
                            <taglet>
                                <tagletClass>com.commercetools.sdk.jvm.taglets.CodeTaglet</tagletClass>
                                <tagletArtifact>
                                    <groupId>com.commercetools.build.taglets</groupId>
                                    <artifactId>commercetools-taglets</artifactId>
                                    <version>${commercetools-taglets.version}</version>
                                </tagletArtifact>
                            </taglet>
                            <taglet>
                                <tagletClass>com.commercetools.build.taglets.FileIncludeTaglet</tagletClass>
                                <tagletArtifact>
                                    <groupId>com.commercetools.build.taglets</groupId>
                                    <artifactId>commercetools-taglets</artifactId>
                                    <version>${commercetools-taglets.version}</version>
                                </tagletArtifact>
                            </taglet>
                        </taglets>
                        <excludedocfilessubdir>
                            commercetools-internal-docs:commercetools-java-client-internal-test:commercetools-test-lib
                        </excludedocfilessubdir>
                        <excludePackageNames>test</excludePackageNames>
                        <sourceFileExcludes>
                            <sourceFileExclude>**/*Test.java</sourceFileExclude>
                            <sourceFileExclude>**/test/*.java</sourceFileExclude>
                        </sourceFileExcludes>
                        <javaApiLinks>
                            <property>
                                <name>api_${java.version}</name>
                                <value>http://docs.oracle.com/javase/${java.major.version}/docs/api/</value>
                            </property>
                        </javaApiLinks>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                    <configuration>
                        <excludes>
                            <exclude>**/*IntegrationTest*</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${maven-failsafe-plugin.version}</version>
                    <configuration>
                        <includes>
                            <include>**/*IntegrationTest.java</include>
                            <include>**/*IT.java</include>
                        </includes>
                        <parallel>methods</parallel>
                        <threadCount>10</threadCount>
                    </configuration>
                    <executions>
                        <execution>
                            <id>failsafe-integration-tests</id>
                            <phase>integration-test</phase>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</version>

                    <executions>
                        <execution>
                            <id>pre-integration-test</id>
                            <phase>pre-integration-test</phase>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                            <configuration>
                                <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
                                <propertyName>failsafeArgLine</propertyName>
                            </configuration>
                        </execution>
                        <execution>
                            <id>post-integration-test</id>
                            <phase>post-integration-test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                            <configuration>
                                <dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
                                <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
                            </configuration>
                        </execution>
                        <execution>
                            <id>default-prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-prepare-agent-integration</id>
                            <goals>
                                <goal>prepare-agent-integration</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-report</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>default-report-integration</id>
                            <goals>
                                <goal>report-integration</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>1.12</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>
                                test-jar
                            </goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            <plugin>
                <!--
                http://revapi.org/modules/revapi-maven-plugin/examples/comparing-specific-artifacts.html

                mvn clean package -Darguments="-DskipTests" -DskipTests -Pjavadoc-jdk-8u121

                mvn revapi:report-aggregate -Darguments="-DskipTests" -DskipTests -Pjavadoc-jdk-8u121

                open target/site/revapi-aggregate-report.html
                -->
                <groupId>org.revapi</groupId>
                <artifactId>revapi-maven-plugin</artifactId>
                <version>0.9.1</version>
                <configuration>
                    <newArtifacts>
                        <artifact>${project.groupId}:${project.artifactId}:${project.version}</artifact>
                    </newArtifacts>
                </configuration>
<!--                <executions>-->
<!--                    <execution>-->
<!--                        <phase>package</phase>-->
<!--                        <goals>-->
<!--                            <goal>report</goal>-->
<!--                        </goals>-->
<!--                    </execution>-->
<!--                </executions>-->
                <dependencies>
                    <dependency>
                        <groupId>org.revapi</groupId>
                        <artifactId>revapi-java</artifactId>
                        <version>0.14.0</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <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>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</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>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org</nexusUrl>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>publish-site</id>
            <build>
                <plugins>
                    <plugin>
                        <!--
                        mvn clean javadoc:aggregate scm-publish:publish-scm -P publish-site
                        -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-scm-publish-plugin</artifactId>
                        <version>${maven-scm-publish-plugin.version}</version>
                        <configuration>
                            <checkoutDirectory>${project.build.directory}/javadoc-stage</checkoutDirectory>
                            <checkinComment>publishing Javadoc for ${project.artifactId}:${project.version}
                            </checkinComment>
                            <content>${project.build.directory}/site</content>
                            <skipDeletedFiles>false</skipDeletedFiles>
                            <pubScmUrl>${maven-scm-publish-plugin.scm.url}</pubScmUrl>
                            <scmBranch>gh-pages</scmBranch>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>javadoc-jdk-8u121</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <jdk>1.8.0_121</jdk>
            </activation>
            <properties>
                <javadoc.additionalparams>--allow-script-in-comments</javadoc.additionalparams>
            </properties>
        </profile>
        <profile>
            <id>third-party-licenses</id>
            <!--
                This profile generates third party licenses files for each module under <module-dir>/target/generated-sources/license
                and for the whole project under target/generated-sources/license

                This profile currently isn't activated by default, but can be activated by passing the -Pthird-party-licenses option
                to maven.
            -->
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <configuration>
                            <licenseMerges>
                                <licenseMerge>Apache License 2.0|The Apache Software License, Version 2.0|Apache
                                    License, Version 2.0|Apache 2 License|Apache 2.0|Apache 2
                                </licenseMerge>
                                <licenseMerge>Eclipse Public License 1.0|Eclipse Public License - v 1.0</licenseMerge>
                            </licenseMerges>
                            <excludedScopes>test,provided</excludedScopes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>aggregate-third-party-licenses</id>
                                <goals>
                                    <goal>add-third-party</goal>
                                    <goal>aggregate-add-third-party</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
