<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 BPM - engine - REST - Assembly</name>
  <packaging>war</packaging>

  <parent>
    <groupId>org.camunda.bpm</groupId>
    <artifactId>camunda-engine-rest-root</artifactId>
    <relativePath>../</relativePath>
    <version>7.11.0</version>
  </parent>

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

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

    <!-- dependencies only used for assemblies should be scope provided -->
    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine</artifactId>
      <scope>provided</scope>
    </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.resteasy3}</version>
      <scope>provided</scope>
    </dependency>
    
    <!-- this overrides a transitive dependency Resteasy 3.0.26;
    Resteasy depends on 1.0.1.Beta1, which was compiled with Java 8 and therefore
     does not work in Java 7 environments (e.g. JBoss 7). 1.0.1.Final
     was compiled with Java 7. -->
    <dependency>
      <groupId>org.jboss.spec.javax.ws.rs</groupId>
      <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>
      <version>1.0.1.Final</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>

  </dependencies>

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

          <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</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>was</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly-war-was.xml</descriptor>
              </descriptors>
              <finalName>camunda-engine-rest-${project.version}</finalName>
              <attach>true</attach>
              <classifier>was</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>
