<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.jbpm</groupId>
    <artifactId>jbpm</artifactId>
    <version>5.5.0-SNAPSHOT</version>
  </parent>

  <artifactId>jbpm-distribution</artifactId>
  <packaging>pom</packaging>

  <name>jBPM distribution</name>
  <description>
    Builds the download zip of jBPM.
  </description>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>javadoc-javadoc</id>
            <phase>package</phase>
            <goals>
              <goal>javadoc</goal>
            </goals>
            <configuration>
              <reportOutputDirectory>${project.build.directory}/aggregated-javadocs</reportOutputDirectory>
              <includeDependencySources>true</includeDependencySources>
              <dependencySourceIncludes>
                <dependencySourceInclude>org.jbpm:*</dependencySourceInclude>
                <dependencySourceInclude>org.drools:knowledge-api</dependencySourceInclude>
              </dependencySourceIncludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>zips</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <finalName>jbpm-${project.version}</finalName>
              <descriptors>
                <!-- basic zips -->
                <descriptor>src/main/assembly/pre-bin.xml</descriptor>
                <descriptor>src/main/assembly/bin.xml</descriptor>
                <descriptor>src/main/assembly/src.xml</descriptor>
                <descriptor>src/main/assembly/docs-build.xml</descriptor>
                <descriptor>src/main/assembly/docs.xml</descriptor>
                <descriptor>src/main/assembly/assembly-jbpm.xml</descriptor>
                <!-- installer and examples -->
                <descriptor>src/main/assembly/installer.xml</descriptor>
                <descriptor>src/main/assembly/examples.xml</descriptor>
                <!-- war zips -->
                <descriptor>src/main/assembly/gwt-console.xml</descriptor>
                <descriptor>src/main/assembly/human-task-war.xml</descriptor>
                <!--descriptor>src/main/assembly/form-builder.xml</descriptor-->
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <!-- Binaries and sources -->
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-flow</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-flow</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-flow-builder</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-flow-builder</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-persistence-jpa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-persistence-jpa</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-bpmn2</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-bpmn2</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
        <groupId>org.jbpm</groupId>
        <artifactId>jbpm-test</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-test</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-bam</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-bam</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-mina</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-hornetq</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-jms</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-core</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-mina</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-hornetq</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-jms</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-workitems</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-workitems</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-examples</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-examples</artifactId>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-human-task-war</artifactId>
      <type>war</type>
    </dependency>
    
    <!-- The old assembly also included this optional dependency -->
    <dependency>
      <groupId>com.thoughtworks.xstream</groupId>
      <artifactId>xstream</artifactId>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.btm</groupId>
      <artifactId>btm</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
    </dependency>

    <!-- Javadocs and documentation -->
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-docs</artifactId>
      <type>jdocbook</type>
    </dependency>
    <dependency><!-- Workaround for http://jira.codehaus.org/browse/MJAVADOC-340 -->
      <groupId>org.apache.felix</groupId>
      <artifactId>org.osgi.core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency><!-- Workaround for http://jira.codehaus.org/browse/MJAVADOC-340 -->
      <groupId>org.apache.felix</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency><!-- Workaround, maybe for http://jira.codehaus.org/browse/MJAVADOC-340 -->
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>
</project>
