<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <groupId>software.amazon.aws.clients.swf.flux</groupId>
    <artifactId>flux-swf-client-pom</artifactId>
    <version>2.0.7</version>
    <packaging>pom</packaging>
    <name>Flux SWF Client POM</name>
    <description>Flux is a client library that simplifies usage of Amazon Simple Workflow Service.</description>
    <url>https://github.com/awslabs/flux-swf-client</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://aws.amazon.com/apache2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>amazonwebservices</id>
            <organization>Amazon Web Services</organization>
            <organizationUrl>https://aws.amazon.com</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <modules>
        <module>flux</module>
        <module>flux-common</module>
        <module>flux-guice</module>
        <module>flux-integration-tests</module>
        <module>flux-spring</module>
        <module>flux-testutils</module>
    </modules>

    <scm>
        <connection>scm:git:https://github.com/awslabs/flux-swf-client.git</connection>
        <developerConnection>scm:git:git@github.com:awslabs/flux-swf-client.git</developerConnection>
        <url>https://github.com/awslabs/flux-swf-client</url>
    </scm>
    <properties>
        <flux.version>${project.version}</flux.version>
        <awssdk.version>2.17.100</awssdk.version>
        <jackson.version>2.13.0</jackson.version>
        <slf4j.version>1.7.32</slf4j.version>

        <junit.version>4.13.2</junit.version>
        <junit5.version>5.7.2</junit5.version>
        <easymock.version>4.3</easymock.version>

        <mavenplugin.compiler.version>3.8.1</mavenplugin.compiler.version>
        <mavenplugin.checkstyle.version>3.1.2</mavenplugin.checkstyle.version>
        <mavenplugin.surefire.version>2.22.2</mavenplugin.surefire.version>
        <mavenplugin.source.version>3.2.1</mavenplugin.source.version>
        <mavenplugin.javadoc.version>3.3.0</mavenplugin.javadoc.version>
        <mavenplugin.gpg.version>3.0.1</mavenplugin.gpg.version>
        <mavenplugin.nexusstaging.version>1.6.8</mavenplugin.nexusstaging.version>

        <checkstyle.version>8.45</checkstyle.version>

        <jre.version>1.8</jre.version>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${mavenplugin.compiler.version}</version>
                <configuration>
                    <source>${jre.version}</source>
                    <target>${jre.version}</target>
                    <encoding>UTF-8</encoding>
                    <forceJavacCompilerUse>true</forceJavacCompilerUse>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${mavenplugin.checkstyle.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <configLocation>checkstyle-rules.xml</configLocation>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <linkXRef>false</linkXRef>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${mavenplugin.surefire.version}</version>
                <configuration>
                    <argLine>-Duser.timezone=UTC</argLine>
                    <parallel>classes</parallel>
                    <threadCount>3</threadCount>
                    <includes>
                        <include>**/*Test.java</include>
                        <include>**/*Tests.java</include>
                    </includes>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${mavenplugin.checkstyle.version}</version>
                <configuration>
                    <configLocation>checkstyle-rules.xml</configLocation>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <linkXRef>false</linkXRef>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>checkstyle</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
    <profiles>
        <profile>
            <id>release</id>
            <properties>
                <!-- Used here to allow overriding from the command line -->
                <publishing.autoReleaseAfterClose>false</publishing.autoReleaseAfterClose>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${mavenplugin.source.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-javadoc-plugin</artifactId>
                        <version>${mavenplugin.javadoc.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${mavenplugin.gpg.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <keyname>A9C2E0DFFED2658D75A64D7A7C5DC8336806E60E</keyname>
                            <passphrase>${env.GPG_PASSPHRASE}</passphrase>
                            <gpgArguments>
                                <arg>--batch</arg>
                                <arg>--pinentry</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${mavenplugin.nexusstaging.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>sonatype-nexus-staging</serverId>
                            <nexusUrl>https://aws.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>${publishing.autoReleaseAfterClose}</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>