<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2019 Red Hat, Inc. and/or its affiliates.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">

  <id>assembly-optaweb-vehicle-routing</id>
  <formats>
    <format>zip</format>
  </formats>

  <includeBaseDirectory>true</includeBaseDirectory>

  <fileSets>
    <fileSet>
      <directory>src/main/resources</directory>
      <filtered>true</filtered>
      <outputDirectory/>
    </fileSet>
    <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-vehicle-routing-frontend/.scannerwork/**</exclude>
        <exclude>optaweb-vehicle-routing-frontend/build/**</exclude>
        <exclude>optaweb-vehicle-routing-frontend/coverage/**</exclude>
        <exclude>optaweb-vehicle-routing-frontend/cypress/screenshots/**</exclude>
        <exclude>optaweb-vehicle-routing-frontend/cypress/videos/**</exclude>
        <exclude>optaweb-vehicle-routing-frontend/docker/build/**</exclude>
        <exclude>optaweb-vehicle-routing-frontend/node/**</exclude>
        <exclude>optaweb-vehicle-routing-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.vehiclerouting:optaweb-vehicle-routing-standalone</include>
      </includes>
      <outputDirectory>bin</outputDirectory>
      <useStrictFiltering>true</useStrictFiltering>
      <useProjectArtifact>false</useProjectArtifact>
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.optaweb.vehiclerouting:optaweb-vehicle-routing-docs:zip</include>
      </includes>
      <outputDirectory>reference_manual</outputDirectory>
      <unpack>true</unpack>
      <!-- Don't include the artifact produced during the current project's build. -->
      <useProjectArtifact>false</useProjectArtifact>
      <!-- Fail the build if any include/exclude patterns aren't used to filter an actual artifact. -->
      <useStrictFiltering>true</useStrictFiltering>
    </dependencySet>
  </dependencySets>
</assembly>
