<?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>com.commercetools.sdk.jvm.spring</groupId>
    <artifactId>commercetools-spring-batch-add-ons</artifactId>
    <version>0.3.0</version>
    <packaging>jar</packaging>

    <name>commercetools-jvm-sdk-spring-add-ons</name>
    <description>tools usable with spring</description>
    <url>http://dev.commercetools.com</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <jvm.sdk.version>1.0.0-RC1</jvm.sdk.version>
        <spring.batch.version>3.0.6.RELEASE</spring.batch.version>
    </properties>

    <licenses>
        <license>
            <name>Apache</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <developerConnection>scm:git:git@github.com:sphereio/commercetools-jvm-sdk-spring-add-ons.git</developerConnection>
        <url>git@github.com:sphereio/commercetools-jvm-sdk-spring-add-ons.git</url>
        <connection>scm:git:git@github.com:sphereio/commercetools-jvm-sdk-spring-add-ons.git</connection>
        <tag>commercetools-spring-batch-add-ons-0.3.0</tag>
    </scm>
    <developers>
        <developer>
            <id>michael</id>
            <name>Michael Schleichardt</name>
            <url>https://github.com/schleichardt</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>

    <dependencies>
        <dependency>
            <groupId>org.springframework.batch</groupId>
            <artifactId>spring-batch-core</artifactId>
            <version>${spring.batch.version}</version>
        </dependency>
        <dependency>
            <groupId>com.commercetools.sdk.jvm.core</groupId>
            <artifactId>commercetools-models</artifactId>
            <version>${jvm.sdk.version}</version>
        </dependency>
        <dependency>
            <groupId>com.commercetools.sdk.jvm.core</groupId>
            <artifactId>commercetools-java-client-core</artifactId>
            <version>${jvm.sdk.version}</version>
        </dependency>
        <dependency>
            <!-- important that this is in the test scope -->
            <groupId>com.commercetools.sdk.jvm.core</groupId>
            <artifactId>commercetools-java-client</artifactId>
            <version>${jvm.sdk.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.3.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.1.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <includes>
                        <include>**/*IntegrationTest.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>failsafe-integration-tests</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <taglets>
                        <taglet>
                            <tagletClass>com.commercetools.build.taglets.FileIncludeTaglet</tagletClass>
                            <tagletArtifact>
                                <groupId>com.commercetools.build.taglets</groupId>
                                <artifactId>commercetools-taglets</artifactId>
                                <version>0.6.2</version>
                            </tagletArtifact>
                        </taglet>
                    </taglets>
                    <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>]]></bottom>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy scm-publish:publish-scm</goals>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.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-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>
                        <!--
                        idea source: http://blog.progs.be/517/publishing-javadoc-to-github-using-maven

                        https://maven.apache.org/plugins/maven-scm-publish-plugin/

                        mvn clean javadoc:javadoc scm-publish:publish-scm
                        -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-scm-publish-plugin</artifactId>
                        <version>1.1</version>
                        <configuration>
                            <checkoutDirectory>${project.build.directory}/javadoc-stage</checkoutDirectory>
                            <checkinComment>publishing Javadoc for ${project.artifactId}:${project.version}</checkinComment>
                            <content>${project.build.directory}/apidocs</content>
                            <skipDeletedFiles>true</skipDeletedFiles>
                            <pubScmUrl>scm:git:git@github.com:sphereio/commercetools-jvm-sdk-spring-add-ons.git</pubScmUrl>
                            <scmBranch>gh-pages</scmBranch>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
