<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.kie</groupId>
    <artifactId>kie-server-distributions</artifactId>
    <version>7.10.0.Final</version>
  </parent>
  <artifactId>jbpm-server-distribution</artifactId>
  <packaging>pom</packaging>
  <name>jBPM server distribution</name>
  <description>Single ZIP jBPM server distribution</description>
  
  <dependencies>
    <dependency>
      <groupId>org.kie.server</groupId>
      <artifactId>kie-server</artifactId>
      <classifier>ee7</classifier>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-wb</artifactId>
      <classifier>wildfly11</classifier>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-wb-case-mgmt-showcase</artifactId>
      <classifier>wildfly11</classifier>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>repository-wildfly</artifactId>
      <type>war</type>
    </dependency>

    <!-- db drivers -->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
    </dependency>
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>process-test-classes</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.wildfly</groupId>
                  <artifactId>wildfly-dist</artifactId>
                  <version>${version.org.wildfly}</version>
                  <type>zip</type>
                  <overWrite>true</overWrite>
                  <outputDirectory>target</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <finalName>jbpm-server-${project.version}</finalName>
          <descriptors>
            <descriptor>src/main/assembly/assembly-server-dist.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>