<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2012 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>webc</id><!-- 'webc' for Web Container (aka Servlet Container) -->
  <formats>
    <format>war</format>
    <format>dir</format>
  </formats>

  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>${project.basedir}/src/main/webc-resources</directory>
      <outputDirectory>.</outputDirectory>
    </fileSet>
  </fileSets>

  <dependencySets>
    <dependencySet>
      <excludes>
        <exclude>org.jboss.spec.javax.transaction:*</exclude>
      </excludes>
      <includes>
        <include>org.kie.server:kie-server-services-common</include>
        <include>org.kie.server:kie-server-services-drools</include>
        <include>org.kie.server:kie-server-services-jbpm</include>
        <include>org.kie.server:kie-server-services-jbpm-ui</include>
        <include>org.kie.server:kie-server-services-case-mgmt</include>
        <include>org.kie.server:kie-server-services-optaplanner</include>
        <include>org.kie.server:kie-server-services-dmn</include>
        <include>org.kie.server:kie-server-services-swagger</include>
        <include>org.kie.server:kie-server-rest-common</include>
        <include>org.kie.server:kie-server-rest-drools</include>
        <include>org.kie.server:kie-server-rest-jbpm</include>
        <include>org.kie.server:kie-server-rest-jbpm-ui</include>
        <include>org.kie.server:kie-server-rest-case-mgmt</include>
        <include>org.kie.server:kie-server-rest-optaplanner</include>
        <include>org.kie.server:kie-server-rest-dmn</include>
        <include>org.kie.server:kie-server-rest-swagger</include>
        <include>org.kie.server:kie-server-rest-prometheus</include>
        <include>org.kie.server:kie-server-router-client</include>
        <include>org.kie.server:kie-server-client</include>
        <include>org.kie:jbpm-process-svg</include>
        
        <include>org.kie.server:kie-server-controller-websocket-client</include>
        <include>org.kie.server:kie-server-controller-websocket-common</include>

        <include>org.slf4j:slf4j-jdk14</include>

        <include>org.hibernate.common:hibernate-commons-annotations</include>
        <include>org.hibernate:hibernate-entitymanager</include>
        <include>org.hibernate:hibernate-core</include>
        <include>org.hibernate:hibernate-validator</include>
        <include>org.dom4j:dom4j</include>
        <include>xerces:xercesImpl</include>

        <include>org.jboss.spec.javax.jms:jboss-jms-api_2.0_spec</include>

        <include>org.quartz-scheduler:quartz</include>

        <include>com.google.inject.extensions:guice-servlet</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>
