<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.smartling.api</groupId>
    <artifactId>smartling-sdk-parent</artifactId>
    <packaging>pom</packaging>
    <version>1.2.0</version>
    <name>Smartling API Parent</name>
    <description>Smartling API SDK</description>
    <url>https://api-reference.smartling.com</url>

    <scm>
        <url>https://github.com/Smartling/java-api-sdk</url>
        <developerConnection>scm:git:ssh://git@github.com/Smartling/java-api-sdk</developerConnection>
        <tag>v1.2.0</tag>
    </scm>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <org.powermock.version>2.0.4</org.powermock.version>
        <org.jboss.resteasy.version>4.6.1.Final</org.jboss.resteasy.version>
        <apache.httpclient.version>4.5.14</apache.httpclient.version>
        <jackson.version>2.12.3</jackson.version>
        <okhttp.version>4.9.3</okhttp.version>
        <wiremock.version>2.26.0</wiremock.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${apache.httpclient.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.10</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-client</artifactId>
            <version>${org.jboss.resteasy.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jackson2-provider</artifactId>
            <version>${org.jboss.resteasy.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-multipart-provider</artifactId>
            <version>${org.jboss.resteasy.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.spec.javax.ws.rs</groupId>
            <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
            <version>1.0.1.Final</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-kotlin</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.28</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.28</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>2.28.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>mockwebserver</artifactId>
            <version>${okhttp.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock</artifactId>
            <version>${wiremock.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <release>8</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <configuration>
                    <gpgArguments>
                        <gpgArgument>--no-tty</gpgArgument>
                        <gpgArgument>--batch</gpgArgument>
                        <gpgArgument>--pinentry-mode</gpgArgument>
                        <gpgArgument>loopback</gpgArgument>
                    </gpgArguments>
                </configuration>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <links>
                        <link>https://docs.oracle.com/javaee/7/api/</link>
<!--                        <link>https://docs.jboss.org/resteasy/docs/3.0.24.Final/javadocs/</link>-->
                        <link>https://fasterxml.github.io/jackson-core/javadoc/2.8/</link>
                        <link>https://fasterxml.github.io/jackson-databind/javadoc/2.8/</link>
                        <link>https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/</link>
                    </links>
                    <defaultAuthor>Smartling, Inc.</defaultAuthor>
                    <version>true</version>
                    <name>Smartling API SDK</name>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- list in alphabetical order, except api-sdk-all -->
    <modules>
        <module>samrtling-api-test-utils</module>
        <module>smartling-api-commons</module>
        <module>smartling-attachments-api</module>
        <module>smartling-issues-api</module>
        <module>smartling-jobs-api</module>
        <module>smartling-locales-api</module>
        <module>smartling-job-batches-api</module>
        <module>smartling-files-api</module>
        <module>smartling-projects-api</module>
        <module>smartling-strings-api</module>
        <module>smartling-contexts-api</module>
        <module>smartling-reports-api</module>
        <module>smartling-api-sdk-all</module> <!-- keep last -->
    </modules>

    <developers>
        <developer>
            <name>Smartling</name>
            <organization>Smartling, Inc.</organization>
            <url>https://github.com/Smartling/</url>
            <roles>
                <role>Organization</role>
            </roles>
        </developer>
        <developer>
            <name>Scott Rossillo</name>
            <organization>Smartling, Inc.</organization>
            <url>https://github.com/foo4u/</url>
        </developer>
    </developers>

    <distributionManagement>
        <repository>
            <id>sonatype-oss-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>github</id>
            <url>https://maven.pkg.github.com/smartling/java-api-sdk</url>
        </snapshotRepository>
   </distributionManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.smartling.cc4j</groupId>
                        <artifactId>conventional-commits-maven-plugin</artifactId>
                        <version>0.1.0</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <dryRun>false</dryRun>
                            <pushChanges>true</pushChanges>
                            <tagNameFormat>v@{project.version}</tagNameFormat>
                            <allowTimestampedSnapshots>false</allowTimestampedSnapshots>
                            <scmCommentPrefix xml:space="preserve">ci: </scmCommentPrefix>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>github</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
