<!--
  ~  Copyright (C) 2005-2016 Alfresco Software Limited.
  ~
  ~  This file is part of Alfresco Activiti Client.
  ~
  ~  Licensed under the Apache License, Version 2.0 (the "License");
  ~  you may not use this file except in compliance with the License.
  ~  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~  Unless required by applicable law or agreed to in writing, software
  ~  distributed under the License is distributed on an "AS IS" BASIS,
  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~  See the License for the specific language governing permissions and
  ~  limitations under the License.
  -->

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://maven.apache.org/POM/4.0.0"
    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>org.alfresco.client</groupId>
    <artifactId>activiti-client</artifactId>
    <version>1.6.0</version>
    <packaging>pom</packaging>

    <name>Alfresco Activiti Client (Parent)</name>
    <description>Alfresco Activiti Client generic POM file for Maven builds</description>
    <url>http://www.alfresco.org/</url>
    <inceptionYear>2005</inceptionYear>
    <organization>
        <name>Alfresco Software</name>
        <url>http://www.alfresco.org/</url>
    </organization>

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

    <developers>
        <developer>
            <name>Jean Marie Pascal</name>
            <id>jpascal</id>
            <email>jeanmarie.pascal@alfresco.com</email>
            <roles>
                <role>Committer</role>
            </roles>
        </developer>
    </developers>

    <issueManagement>
        <system>JIRA</system>
        <url>https://issues.alfresco.com/</url>
    </issueManagement>

    <ciManagement>
        <system>Bamboo</system>
        <url>https://bamboo.alfresco.com/bamboo/browse/ALF</url>
    </ciManagement>

    <distributionManagement>
        <repository>
            <id>alfresco-public-releases</id>
            <name>Alfresco Release Repository</name>
            <url>https://artifacts.alfresco.com/nexus/content/repositories/releases</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>alfresco-public</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>alfresco-public-snapshots</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>sonatype-public</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>alfresco-public</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <properties>
        <maven.deploy.skip>false</maven.deploy.skip>
        <!-- Maven build properties -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- Use 1.7 for retrocompatibility but can use 1.8 for testing -->
        <maven.compiler.target>1.7</maven.compiler.target>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.testTarget>1.8</maven.compiler.testTarget>
        <maven.compiler.testSource>1.8</maven.compiler.testSource>

        <!-- Libraries versions -->
        <retrofit.version>2.8.1</retrofit.version>
        <okhttp.version>3.14.7</okhttp.version>
        <alfresco.commons.version>1.1.0</alfresco.commons.version>
    </properties>

    <build>
        <!-- Defining version and some configuration of Maven plugins -->
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.6.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.3</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.7</version>
                    <configuration>
                        <includeEmptyDirs>true</includeEmptyDirs>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.4</version>
                </plugin>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.5.4</version>
                </plugin>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.10</version>
                </plugin>
                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.3.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-help-plugin</artifactId>
                    <version>2.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.2</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <stagingRepository>
                            alfresco-internal::default::https://artifacts.alfresco.com/nexus/content/repositories/internal-staging/
                        </stagingRepository>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.18.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.18.1</version>
                    <configuration>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <runOrder>alphabetical</runOrder>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.3</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <version>2.10</version>
                </plugin>
                <plugin>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>2.3</version>
                </plugin>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.8</version>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <skipIfEmpty>true</skipIfEmpty>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true
                                </addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true
                                </addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-Version>${project.version}</Implementation-Version>
                                <Build-Date>${maven.build.timestamp}</Build-Date>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.alfresco.maven.plugin</groupId>
                    <artifactId>alfresco-maven-plugin</artifactId>
                    <version>2.0.0</version>
                    <configuration>
                        <attachClasses>true</attachClasses>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.antlr</groupId>
                    <artifactId>antlr3-maven-plugin</artifactId>
                    <version>3.5.2</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.4.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>rpm-maven-plugin</artifactId>
                    <version>2.1.3</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.2</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.9.1</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>properties-maven-plugin</artifactId>
                    <version>1.0.0</version>
                </plugin>
                <plugin>
                    <groupId>com.google.code.maven-replacer-plugin</groupId>
                    <artifactId>replacer</artifactId>
                    <version>1.5.3</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.7.5.201505241946</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>

    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.4</version>
            </plugin>
            <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>summary</report>
                            <report>dependencies</report>
                            <report>dependency-convergence</report>
                            <report>dependency-management</report>
                            <report>license</report>
                            <report>modules</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.18.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.4</version>
            </plugin>
            <plugin>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <aggregate>false</aggregate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.1</version>
            </plugin>
        </plugins>
    </reporting>


    <profiles>
        <profile>
            <id>activiti-client-java</id>
            <modules>
                <module>client-java/client-commons</module>
                <module>client-java/activiti-java-client</module>
            </modules>
        </profile>
        <profile>
            <id>activiti-client-all</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>client-java/client-commons</module>
                <module>client-java/activiti-java-client</module>
                <module>client-android/activiti-android-client</module>
            </modules>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <!-- ALFRESCO & ACTIVITI PROJECTS -->
            <dependency>
                <groupId>org.alfresco.client</groupId>
                <artifactId>client-commons</artifactId>
                <version>${alfresco.commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.alfresco.client</groupId>
                <artifactId>activiti-java-client</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- RETROFIT & OKHTTP -->
            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>retrofit</artifactId>
                <version>${retrofit.version}</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>converter-gson</artifactId>
                <version>${retrofit.version}</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>adapter-rxjava</artifactId>
                <version>${retrofit.version}</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp</artifactId>
                <version>${okhttp.version}</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>logging-interceptor</artifactId>
                <version>${okhttp.version}</version>
            </dependency>

            <!-- RX JAVA -->
            <dependency>
                <groupId>io.reactivex</groupId>
                <artifactId>rxjava</artifactId>
                <version>1.3.8</version>
            </dependency>

            <!-- TESTS -->
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>7.1.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>