<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">

  <id>assembly-droolsjbpm-integration</id>
  <formats>
    <format>dir</format>
    <format>zip</format>
  </formats>

  <includeBaseDirectory>true</includeBaseDirectory>

  <fileSets>
    <fileSet><!-- Note: going outside the module dir is bad, but it is not fetching generated files -->
      <includes>
        <include>../LICENSE-ASL-2.0.txt</include>
      </includes>
      <outputDirectory/>
    </fileSet>
    <fileSet>
      <directory>src/main/assembly/scripts</directory>
      <lineEnding>unix</lineEnding>
      <filtered>true</filtered>
      <outputDirectory>examples</outputDirectory>
      <includes>
        <include>**/*.sh</include>
      </includes>
      <fileMode>755</fileMode>
    </fileSet>
    <fileSet>
      <directory>src/main/assembly/scripts</directory>
      <lineEnding>dos</lineEnding>
      <filtered>true</filtered>
      <outputDirectory>examples</outputDirectory>
      <includes>
        <include>**/*.bat</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>src/main/assembly/filtered-resources</directory>
      <filtered>true</filtered>
      <outputDirectory/>
    </fileSet>
    <!-- Examples -->
    <fileSet><!-- Note: going outside the module dir is bad, but it is not fetching generated files -->
      <directory>../droolsjbpm-integration-examples</directory>
      <outputDirectory>examples/sources</outputDirectory>
      <excludes>
        <exclude>target/**</exclude>
        <exclude>local/**</exclude>
        <exclude>.*/**</exclude>
        <exclude>nbproject/**</exclude>
        <exclude>*.ipr</exclude>
        <exclude>*.iws</exclude>
        <exclude>*.iml</exclude>
        <exclude>.git/**</exclude>
      </excludes>
    </fileSet>
  </fileSets>

  <dependencySets>
    <dependencySet>
      <excludes>
        <exclude>org.drools:droolsjbpm-integration-examples</exclude>
        <exclude>ch.qos.logback:logback-core</exclude><!-- Examples dependency -->
        <exclude>ch.qos.logback:logback-classic</exclude><!-- Examples dependency -->
        <exclude>*:sources</exclude>
      </excludes>
      <outputDirectory>binaries</outputDirectory>
      <useStrictFiltering>true</useStrictFiltering>
      <useTransitiveFiltering>true</useTransitiveFiltering>
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.drools:droolsjbpm-integration-examples:jar</include>
        <include>ch.qos.logback:logback-core</include><!-- Examples dependency -->
        <include>ch.qos.logback:logback-classic</include><!-- Examples dependency -->
      </includes>
      <excludes>
        <exclude>org.drools:droolsjbpm-integration-examples:jar:sources</exclude>
      </excludes>
      <outputDirectory>examples/binaries</outputDirectory>
      <useStrictFiltering>true</useStrictFiltering>
      <useTransitiveFiltering>true</useTransitiveFiltering>
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.drools:*:jar:sources</include>
        <include>org.kie:kie-*:jar:sources</include>
      </includes>
      <excludes>
        <exclude>org.drools:droolsjbpm-integration-examples:jar:sources</exclude>
      </excludes>
      <outputDirectory>sources</outputDirectory>
      <unpack>false</unpack>
      <useStrictFiltering>true</useStrictFiltering>
      <useTransitiveFiltering>true</useTransitiveFiltering>
    </dependencySet>
  </dependencySets>

</assembly>
