<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~  Licensed to the Apache Software Foundation (ASF) under one
  ~  or more contributor license agreements.  See the NOTICE file
  ~  distributed with this work for additional information
  ~  regarding copyright ownership.  The ASF licenses this file
  ~  to you 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>
    <id>bin</id>
    <includeBaseDirectory>false</includeBaseDirectory>
    <formats>
        <format>tar.gz</format>
        <format>zip</format>
    </formats>

    <fileSets>
        <fileSet>
            <directory>src/main/release</directory>
            <outputDirectory>synapse-${synapse.version}</outputDirectory>
            <includes>
                <include>LICENSE</include>
                <include>NOTICE</include>
                <include>README.txt</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>src/main/bin</directory>
            <outputDirectory>synapse-${synapse.version}/bin</outputDirectory>
            <includes>
                <include>synapse.sh</include>
                <include>synapse-config-migrator.sh</include>
                <include>ciphertool.sh</include>
                <include>synapse-daemon.sh</include>
            </includes>
            <fileMode>755</fileMode>
        </fileSet>
        <fileSet>
            <directory>src/main/bin</directory>
            <outputDirectory>synapse-${synapse.version}/bin</outputDirectory>
            <includes>
                <include>synapse.bat</include>
                <include>ciphertool.bat</include>
                <include>install-synapse-service.bat</include>
                <include>uninstall-synapse-service.bat</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>../../repository</directory>
            <outputDirectory>synapse-${synapse.version}/repository</outputDirectory>
            <excludes>
                <exclude>conf/axis2.xml</exclude>
                <exclude>conf/synapse.xml</exclude>
                <exclude>conf/web.xml</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>../../repository/conf</directory>
            <outputDirectory>synapse-${synapse.version}/repository/conf</outputDirectory>
            <includes>
                <include>axis2.xml</include>
                <include>synapse.xml</include>
            </includes>
        </fileSet>

        <fileSet>
            <directory>../../repository/conf/sample/resources/misc/client</directory>
            <outputDirectory>synapse-${synapse.version}/samples/axis2Client/client_repo/conf
            </outputDirectory>
            <includes>
                <include>axis2.xml</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>../../modules/distribution/src/main/conf</directory>
            <outputDirectory>synapse-${synapse.version}/lib</outputDirectory>
            <includes>
                <include>providers.xml</include>
                <include>identity.jks</include>
                <include>trust.jks</include>
                <include>log4j.properties</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>../../modules/migrator/src/main/resources</directory>
            <outputDirectory>synapse-${synapse.version}/resources</outputDirectory>
            <includes>
                <include>synapse-configuration-migrator.xslt</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>src/main/bin</directory>
            <outputDirectory>synapse-${synapse.version}/lib</outputDirectory>
            <includes>
                <include>wrapper-windows-x86-32.dll</include>
                <include>libwrapper-linux-x86-32.so</include>
                <include>libwrapper-linux-x86-64.so</include>
                <include>libwrapper-solaris-sparc-32.so</include>
                <include>libwrapper-solaris-sparc-64.so</include>
                <include>libwrapper-solaris-x86-32.so</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>../../repository/conf/sample/resources/misc/server</directory>
            <outputDirectory>synapse-${synapse.version}/samples/axis2Server/repository/conf
            </outputDirectory>
            <includes>
                <include>axis2.xml</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>src/main/release/docs</directory>
            <outputDirectory>synapse-${synapse.version}</outputDirectory>
            <includes>
                <include>release_notes.txt</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>src/main/bin/native</directory>
            <outputDirectory>synapse-${synapse.version}/bin/native</outputDirectory>
            <fileMode>755</fileMode>
        </fileSet>
        <fileSet>
            <directory>../../modules/samples/services</directory>
            <outputDirectory>synapse-${synapse.version}/samples/axis2Server/src</outputDirectory>
        </fileSet>
        <fileSet>
            <directory>../../modules/samples/src/main/java</directory>
            <outputDirectory>synapse-${synapse.version}/samples/axis2Client/src</outputDirectory>
            <excludes>
                <exclude>**/target</exclude>
                <exclude>**/target/**/*</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>../../modules/samples/src/main/scripts</directory>
            <outputDirectory>synapse-${synapse.version}/samples</outputDirectory>
            <excludes>
                <exclude>**/*.sh</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>../../modules/samples/src/main/scripts</directory>
            <outputDirectory>synapse-${synapse.version}/samples</outputDirectory>
            <includes>
                <include>**/*.sh</include>
            </includes>
            <fileMode>755</fileMode>
        </fileSet>
    </fileSets>
    <files>
        <file>
            <source>.empty</source>
            <outputDirectory>synapse-${synapse.version}/work/temp/sampleClient</outputDirectory>
        </file>
        <file>
            <source>.empty</source>
            <outputDirectory>synapse-${synapse.version}/work/temp/sampleServer</outputDirectory>
        </file>
        <file>
            <source>.empty</source>
            <outputDirectory>synapse-${synapse.version}/work/temp/synapse</outputDirectory>
        </file>
    </files>
    <dependencySets>
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>synapse-${synapse.version}/lib</outputDirectory>
            <excludes>
                <exclude>org.apache.synapse:synapse-patches:zip:jars</exclude>
                <exclude>org.apache.synapse:synapse-documentation:zip:docs</exclude>
                <exclude>org.apache.axis2:addressing:mar</exclude>
                <exclude>org.apache.rampart:rampart:mar</exclude>
                <exclude>javax.servlet:servlet-api:jar</exclude>
                <exclude>xml-apis:xml-apis:jar</exclude>
                <exclude>xerces:xercesImpl:jar</exclude>
                <exclude>org.quickfixj:quickfixj-*:jar</exclude>
                <exclude>org.snmp4j:snmp4j</exclude>
                <exclude>org.snmp4j:snmp4j-agent</exclude>
                <exclude>com.rabbitmq:amqp-client:jar</exclude>
                
                <!-- Dependencies that are only used by the Axis2 sample server -->
                <exclude>org.apache.axis2:axis2-jaxws:jar</exclude>
                <exclude>org.apache.axis2:axis2-metadata:jar</exclude>
                <exclude>org.apache.geronimo.specs:geronimo-annotation_1.0_spec:jar</exclude>
                <exclude>org.apache.geronimo.specs:geronimo-jaxws_2.2_spec:jar</exclude>
                <exclude>javax.xml.bind:jaxb-api:jar</exclude>
                <exclude>com.sun.xml.bind:jaxb-impl:jar</exclude>
                <exclude>com.sun.xml.bind:jaxb-xjc:jar</exclude>
            </excludes>
        </dependencySet>
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>synapse-${synapse.version}/samples/axis2Server/lib</outputDirectory>
            <includes>
                <include>org.apache.axis2:axis2-jaxws:jar</include>
                <include>org.apache.axis2:axis2-metadata:jar</include>
                <include>org.apache.geronimo.specs:geronimo-annotation_1.0_spec:jar</include>
                <include>org.apache.geronimo.specs:geronimo-jaxws_2.2_spec:jar</include>
                <include>javax.xml.bind:jaxb-api:jar</include>
                <include>com.sun.xml.bind:jaxb-impl:jar</include>
                <include>com.sun.xml.bind:jaxb-xjc:jar</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>synapse-${synapse.version}</outputDirectory>
            <unpack>true</unpack>
            <includes>
                <include>org.apache.synapse:synapse-documentation:zip:docs</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>synapse-${synapse.version}/lib/patches</outputDirectory>
            <unpack>true</unpack>
            <includes>
                <include>org.apache.synapse:synapse-patches:zip:jars</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>synapse-${synapse.version}/lib/endorsed</outputDirectory>
            <includes>
                <include>xerces:xercesImpl:jar</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>synapse-${synapse.version}/repository/modules</outputDirectory>
            <includes>
                <include>org.apache.axis2:addressing:mar</include>
                <include>org.apache.rampart:rampart:mar</include>
            </includes>
            <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
        </dependencySet>
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>synapse-${synapse.version}/samples/axis2Client/client_repo/modules
            </outputDirectory>
            <includes>
                <include>org.apache.axis2:addressing:mar</include>
                <include>org.apache.rampart:rampart:mar</include>
            </includes>
            <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
        </dependencySet>
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>synapse-${synapse.version}/samples/axis2Server/repository/modules
            </outputDirectory>
            <includes>
                <include>org.apache.axis2:addressing:mar</include>
                <include>org.apache.rampart:rampart:mar</include>
            </includes>
            <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
        </dependencySet>
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>synapse-${synapse.version}/samples/util</outputDirectory>
            <includes>
                <include>com.oopsconsultancy:xmltask:jar</include>
            </includes>
        </dependencySet>
    </dependencySets>

</assembly>
