<?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>sources</id>
  <formats>
    <format>dir</format>
    <format>zip</format>
  </formats>

  <includeBaseDirectory>true</includeBaseDirectory>

  <files>
    <file>
      <source>../LICENSE-Apache-2.0.txt</source>
      <outputDirectory />
    </file>
  </files>
  <fileSets>
    <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 -->
      <useDefaultExcludes>false</useDefaultExcludes>
      <directory>..</directory>
      <outputDirectory>sources</outputDirectory>
      <excludes>
        <exclude>**/target/**</exclude>
        <exclude>**/local/**</exclude>
        <exclude>**/.project</exclude>
        <exclude>**/.idea/**</exclude>
        <exclude>**/*.ipr</exclude>
        <exclude>**/*.iws</exclude>
        <exclude>**/*.iml</exclude>
        <exclude>**/nbproject/**</exclude>
        <exclude>**/.vscode/**</exclude>
        <exclude>**/.DS_Store</exclude>
        <exclude>.git/**</exclude>
        <exclude>optaweb-employee-rostering-frontend/.scannerwork/**</exclude>
        <exclude>optaweb-employee-rostering-frontend/build/**</exclude>
        <exclude>optaweb-employee-rostering-frontend/coverage/**</exclude>
        <exclude>optaweb-employee-rostering-frontend/cypress/screenshots/**</exclude>
        <exclude>optaweb-employee-rostering-frontend/cypress/videos/**</exclude>
        <exclude>optaweb-employee-rostering-frontend/docker/build/**</exclude>
        <exclude>optaweb-employee-rostering-frontend/node/**</exclude>
        <exclude>optaweb-employee-rostering-frontend/node_modules/**</exclude>
        <!--
          TODO: Fix Jenkins jobs that build and deploy snapshots not to clone upstream repositories
          TODO: under the root of the target repository.
        -->
        <exclude>upstream-repos/**</exclude>
      </excludes>
    </fileSet>
  </fileSets>

  <dependencySets>
    <dependencySet>
      <includes>
        <include>org.optaweb.employeerostering:optaweb-employee-rostering-standalone:jar:exec</include>
      </includes>
      <outputDirectory>bin</outputDirectory>
      <useStrictFiltering>true</useStrictFiltering>
      <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>
    <!-- Reference manual -->
    <dependencySet>
      <includes>
        <include>org.optaweb.employeerostering:optaweb-employee-rostering-docs:zip</include>
      </includes>
      <useProjectArtifact>false</useProjectArtifact>
      <outputDirectory>reference_manual</outputDirectory>
      <!-- Workaround for https://jira.codehaus.org/browse/MASSEMBLY-557 -->
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
      <unpack>true</unpack>
      <useStrictFiltering>true</useStrictFiltering>
      <useTransitiveFiltering>false</useTransitiveFiltering><!-- Only include zip -->
    </dependencySet>
  </dependencySets>

</assembly>
