<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>
  <artifactId>camunda-engine-rest</artifactId>
  <name>Camunda Platform - engine - REST - Assembly</name>
  <packaging>war</packaging>

  <parent>
    <groupId>org.camunda.bpm</groupId>
    <artifactId>camunda-engine-rest-root</artifactId>
    <relativePath>../</relativePath>
    <version>7.19.0</version>
  </parent>
  
  <properties>
    <!-- generate a bom of dependencies for the license book.
    We include compile and provided scope dependencies; 
    all the dependencies that we include in only one of the 
    runtime-specific-WARs are in provided scope -->
    <skip-third-party-bom>false</skip-third-party-bom>
    <third-party-bom-scopes>compile|provided</third-party-bom-scopes>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine-rest-core</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- dependencies only used for assemblies should be scope provided -->
    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine-rest-core</artifactId>
      <version>${project.version}</version>
      <classifier>sources</classifier>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine-rest-core</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jaxrs</artifactId>
      <version>${version.resteasy}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-servlet</artifactId>
      <version>${version.jersey2}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.inject</groupId>
      <artifactId>jersey-hk2</artifactId>
      <version>${version.jersey2}</version>
      <scope>provided</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>wildfly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <archive>
                <manifestEntries>
                  <!-- module dependencies for deployment on wildfly  -->
                  <Dependencies>org.camunda.bpm.camunda-engine,org.camunda.bpm.dmn.camunda-engine-dmn,org.camunda.commons.camunda-commons-logging,org.camunda.spin.camunda-spin-core,org.graalvm.js.js-scriptengine services</Dependencies>
                </manifestEntries>
              </archive>
              <descriptors>
                <descriptor>assembly-war-wildfly.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <classifier>wildfly</classifier>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>tomcat</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-war-tomcat.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <classifier>tomcat</classifier>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>was9</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-war-was9.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <classifier>was9</classifier>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>wls</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-war-wls.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <classifier>wls</classifier>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>classes</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-classes.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>sources</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-sources.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>

          <execution>
            <id>tests</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-tests.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <outputDirectory>target/</outputDirectory>
              <workDirectory>target/assembly/work</workDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>
</project>
