<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2017 Alfresco and/or its affiliates.
  ~
  ~ 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="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>org.activiti.cloud</groupId>
  <version>7-201708-EA</version>
  <artifactId>activiti-cloud-gateway</artifactId>

  <name>Activiti Cloud :: Gateway</name>

  <properties>
    <version.activiti>${project.version}</version.activiti>
    <spring.cloud.version>Finchley.BUILD-SNAPSHOT</spring.cloud.version>

    <spring-boot-maven-plugin.version>1.5.4.RELEASE</spring-boot-maven-plugin.version>
    <maven.release.plugin.version>2.5.3</maven.release.plugin.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.activiti</groupId>
        <artifactId>activiti-dependencies</artifactId>
        <version>${version.activiti}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${spring.cloud.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-zuul</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-eureka</artifactId>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-services-identity-keycloak</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>


  <build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${spring-boot-maven-plugin.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven.release.plugin.version}</version>
        <configuration>
          <releaseProfiles>sign</releaseProfiles>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <tagNameFormat>activiti-@{project.version}</tagNameFormat>
          <!-- Necessary until keycloak releases boot2 adaptor -->
          <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <repository>
      <id>spring-milestones</id>
      <name>Spring Milestones</name>
      <url>https://repo.spring.io/libs-milestone</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>spring-snapshots</id>
      <name>Spring Snapshots</name>
      <url>https://repo.spring.io/libs-snapshot</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <repository> <!-- Using snapshot repo to temporarily keep keycloak adapter -->
      <id>activiti-snapshots</id>
      <name>Activiti Snapshots</name>
      <url>https://artifacts.alfresco.com/nexus/content/repositories/activiti-snapshots/</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>


  <profiles>
    <!-- Profile to sign artifacts, triggered when releasing -->
    <profile>
      <id>sign</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <distributionManagement>
    <repository>
      <id>activiti-enterprise-snapshots</id>
      <name>Alfresco internal repo</name>
      <url>https://artifacts.alfresco.com/nexus/content/repositories/activiti-releases/</url>
    </repository>
    <snapshotRepository>
      <id>activiti-enterprise-snapshots</id>
      <name>Activiti Snapshots</name>
      <url>https://artifacts.alfresco.com/nexus/content/repositories/activiti-snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

  <!-- Various information, not used by the build -->

  <url>http://activiti.org</url>
  <licenses>
    <license>
      <name>Apache v2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
    </license>
  </licenses>
  <organization>
    <name>Alfresco</name>
    <url>http://www.alfresco.com</url>
  </organization>
  <inceptionYear>2017</inceptionYear>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/Activiti/Activiti/issues</url>
  </issueManagement>
  <ciManagement>
    <system>Travis</system>
    <url>http://bamboo.ci.codehaus.org/browse/ACT</url>
  </ciManagement>
  <scm>
    <url>https://github.com/Activiti/activiti-cloud-gateway</url>
    <connection>scm:git:https://github.com/Activiti/activiti-cloud-gateway.git</connection>
    <developerConnection>scm:git:https://github.com/Activiti/activiti-cloud-gateway.git</developerConnection>
    <tag>activiti-7-201708-EA</tag>
  </scm>
  <developers>
    <developer>
      <id>salaboy</id>
      <name>Mauricio Salatino</name>
      <email>mauricio.salatino@alfresco.com</email>
      <organization>Alfresco</organization>
      <organizationUrl>http://alfresco.com</organizationUrl>
    </developer>
    <developer>
      <id>erdemedeiros</id>
      <name>Elias De Medeiros</name>
      <email>elias.demedeiros@alfresco.com</email>
      <organization>Alfresco</organization>
      <organizationUrl>http://alfresco.com</organizationUrl>
    </developer>
    <developer>
      <id>ryandawsonuk</id>
      <name>Ryan Dawson</name>
      <email>ryan.dawson@alfresco.com</email>
      <organization>Alfresco</organization>
      <organizationUrl>http://alfresco.com</organizationUrl>
    </developer>
  </developers>

</project>
