<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2017 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/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">

  <!-- including a . in the id will modify the *classifier* of the artifact, instead of the name/id of the artifact -->
  <id>ee7</id>
  <formats>
    <format>war</format>
    <format>dir</format>
  </formats>

  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>${project.basedir}/src/main/ee7-resources</directory>
      <outputDirectory>.</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>${project.basedir}/target/classes</directory>
      <outputDirectory>WEB-INF/classes</outputDirectory>
    </fileSet>
  </fileSets>

  <dependencySets>
    <dependencySet>
      <excludes>
        <exclude>org.jboss.resteasy:resteasy-jaxrs</exclude>
        <exclude>org.jboss.spec.javax.ws.rs:*</exclude>
      </excludes>
      <includes>
        <include>org.kie.server:kie-server-controller-api</include>
        <include>org.kie.server:kie-server-controller-impl</include>
        <include>org.kie.server:kie-server-controller-standalone</include>
        <include>org.kie.server:kie-server-controller-websocket</include>
        <include>org.kie.server:kie-server-controller-websocket-common</include>
        <include>com.sun.xml.bind:jaxb-impl</include>
        <include>com.sun.xml.bind:jaxb-core</include>
        <include>org.slf4j:slf4j-api</include>
      </includes>
      <outputDirectory>WEB-INF/lib</outputDirectory>
      <useTransitiveFiltering>true</useTransitiveFiltering>
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.kie:kie-swagger-ui</include>
      </includes>
      <unpack>true</unpack>
      <outputDirectory>docs</outputDirectory>
      <unpackOptions>
        <filtered>true</filtered>
        <excludes>
          <exclude>META-INF/**</exclude>
        </excludes>
      </unpackOptions>
    </dependencySet>
  </dependencySets>

</assembly>
