<?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.finos.fluxnova.bpm.run</groupId>
    <artifactId>fluxnova-bpm-run-root</artifactId>
    <version>2.0.3</version>
    <relativePath>..</relativePath>
  </parent>

  <artifactId>fluxnova-bpm-run-assembly</artifactId>
  <name>Fluxnova Platform - Run - Assembly</name>
  <packaging>pom</packaging>
  
  <properties>
    <!-- generate a bom of compile time dependencies for the license book.
    Note: Every compile time dependency will end up in the license book. Please
    declare only dependencies that are actually needed -->
    <skip-third-party-bom>true</skip-third-party-bom>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- override the Spring Boot Groovy version with the Camunda Groovy version -->
      <dependency>
        <groupId>org.apache.groovy</groupId>
        <artifactId>groovy-bom</artifactId>
        <version>${version.groovy}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>
  
  <dependencies>
    <!-- make sure the assembly runs after the REST module -->
    <dependency>
      <groupId>org.finos.fluxnova.bpm.run</groupId>
      <artifactId>fluxnova-bpm-run-modules-rest</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
      <exclusions>
        <!-- do not add transitive dependencies to generated dependency list -->
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- make sure this runs after the oauth2 module -->
    <dependency>
      <groupId>org.finos.fluxnova.bpm.run</groupId>
      <artifactId>fluxnova-bpm-run-modules-oauth2</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
      <exclusions>
        <!-- we don't need any transitive dependencies -->
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.finos.fluxnova.bpm.run</groupId>
      <artifactId>fluxnova-bpm-run-modules-example-invoice</artifactId>
      <version>${project.version}</version>
      <type>jar</type>
      <exclusions>
        <!-- do not add transitive dependencies to generated dependency list -->
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.finos.fluxnova.bpm.run</groupId>
      <artifactId>fluxnova-bpm-run-core</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <!-- we consume an uberjar that contains all of its dependencies -->
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.finos.fluxnova.bpm</groupId>
      <artifactId>license-book</artifactId>
      <version>${project.version}</version>
      <type>zip</type>
    </dependency>

    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.groovy</groupId>
      <artifactId>groovy-jsr223</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.groovy</groupId>
      <artifactId>groovy-json</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.groovy</groupId>
      <artifactId>groovy-xml</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.groovy</groupId>
      <artifactId>groovy-templates</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.groovy</groupId>
      <artifactId>groovy-dateutil</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.groovy</groupId>
      <artifactId>groovy-datetime</artifactId>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <appendAssemblyId>false</appendAssemblyId>
          <outputDirectory>target/</outputDirectory>
          <tarLongFileMode>gnu</tarLongFileMode>
        </configuration>
        <executions>
          <execution>
            <id>assemble</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly.xml</descriptor>
              </descriptors>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>