<?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>
  <parent>
    <groupId>org.activiti.cloud</groupId>
    <artifactId>activiti-cloud-parent</artifactId>
    <version>7-201802-EA</version>
    <relativePath>../activiti-cloud-parent</relativePath>
  </parent>
  <artifactId>activiti-cloud-uservices-parent</artifactId>
  <packaging>pom</packaging>
  <name>Activiti Cloud :: uServices Parent</name>
  <url>http://activiti.org/</url>
  <build>
    <plugins>
      <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>external.atlassian.jgitflow</groupId>
        <artifactId>jgitflow-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <distributionManagement>
    <!-- publish to alfresco repository for tagging -->
    <repository>
      <id>activiti-enterprise-snapshots</id>
      <name>Alfresco internal repo</name>
      <url>https://artifacts.alfresco.com/nexus/content/repositories/activiti-releases/</url>
    </repository>
  </distributionManagement>
  <profiles>
    <profile>
      <id>docker</id>
      <activation>
        <file>
          <exists>Dockerfile</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <configuration>
              <images>
                <image>
                  <name>activiti/${project.artifactId}</name>
                  <alias>${project.artifactId}</alias>
                  <build>
                    <from>openjdk:alpine</from>
                    <assembly>
                      <descriptorRef>artifact</descriptorRef>
                    </assembly>
                    <cmd>java ${JAVA_OPTS} -jar maven/${project.artifactId}-${project.version}.jar</cmd>
                  </build>
                </image>
              </images>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>build</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
