<?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>log4j.properties</include>
                <include>providers.xml</include>
                <include>identity.jks</include>
                <include>trust.jks</include>
                <include>providers.xml</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>../../src/site/resources/images</directory>
            <outputDirectory>synapse-${synapse.version}/docs/images</outputDirectory>
        </fileSet>
        <fileSet>
            <directory>../../src/site/resources/logos</directory>
            <outputDirectory>synapse-${synapse.version}/docs/logos</outputDirectory>
        </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>

        <!--<fileSet>-->
        <!--<directory>target/javadoc</directory>-->
        <!--<outputDirectory>synapse-${synapse.version}/docs/api</outputDirectory>-->
        <!--<includes>-->
        <!--<include>**/*</include>-->
        <!--</includes>-->
        <!--</fileSet>-->
        <!--<fileSet>-->
        <!--<directory>target/additional-libs</directory>-->
        <!--<outputDirectory>synapse-${synapse.version}/lib</outputDirectory>-->
        <!--<includes>-->
        <!--<include>**/*</include>-->
        <!--</includes>-->
        <!--</fileSet>-->
        <!--<fileSet>-->
        <!--<directory>target</directory>-->
        <!--<outputDirectory>synapse-${synapse.version}/lib</outputDirectory>-->
        <!--<includes>-->
        <!--<include>synapse.jar</include>-->
        <!--</includes>-->
        <!--</fileSet>-->
    </fileSets>
    <files>
        <file>
            <source>../../src/site/xdoc/Synapse_Configuration_Language.xml</source>
            <outputDirectory>synapse-${synapse.version}/docs</outputDirectory>
            <destName>Synapse_Configuration_Language.html</destName>
        </file>
        <file>
            <source>../../src/site/xdoc/Synapse_Samples.xml</source>
            <outputDirectory>synapse-${synapse.version}/docs</outputDirectory>
            <destName>Synapse_Samples.html</destName>
        </file>
        <file>
            <source>../../src/site/xdoc/Synapse_Samples_Setup.xml</source>
            <outputDirectory>synapse-${synapse.version}/docs</outputDirectory>
            <destName>Synapse_Samples_Setup.html</destName>
        </file>
        <file>
            <source>../../src/site/xdoc/Synapse_QuickStart.xml</source>
            <outputDirectory>synapse-${synapse.version}/docs</outputDirectory>
            <destName>Synapse_QuickStart.html</destName>
        </file>
        <file>
            <source>../../src/site/xdoc/Synapse_Extending.xml</source>
            <outputDirectory>synapse-${synapse.version}/docs</outputDirectory>
            <destName>Synapse_Extending.html</destName>
        </file>
        <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.axis2:addressing:mar</exclude>
                <exclude>org.apache.rampart:rampart:mar</exclude>
                <exclude>org.apache.sandesha2:sandesha2:mar</exclude>
                <exclude>org.apache.ant:ant:jar</exclude>
                <exclude>org.apache.ant:ant-launcher:jar</exclude>
                <exclude>javax.servlet:servlet-api:jar</exclude>
                <exclude>xml-apis:xml-apis:jar</exclude>
                <exclude>xerces:xercesImpl:jar</exclude>
                <exclude>junit:junit:jar</exclude>
                <exclude>org.apache.mina:mina-core:jar</exclude>
                <exclude>org.slf4j:slf4j-jdk14:jar</exclude>
                <exclude>org.slf4j:jcl-over-slf4j:jar</exclude>
                <exclude>org.slf4j:log4j-over-slf4j:jar</exclude>
                <exclude>com.oopsconsultancy:xmltask:jar</exclude>
            </excludes>
        </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>xml-apis:xml-apis:jar</include>
                <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>
                <include>org.apache.sandesha2:sandesha2: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>
                <include>org.apache.sandesha2:sandesha2: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>
                <include>org.apache.sandesha2:sandesha2: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>
