<?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>zip</format>
        <format>tar.gz</format>
    </formats>

    <files>
        <!-- include legal and other files -->
        <file>
            <source>LICENSE.txt</source>
            <outputDirectory>/</outputDirectory>
        </file>
        <file>
            <source>NOTICE.txt</source>
            <outputDirectory>/</outputDirectory>
            <filtered>true</filtered>
        </file>
    </files>

    <fileSets>
        <!-- include assembly files -->
        <fileSet>
            <directory>src/main/assembly</directory>
            <outputDirectory>/</outputDirectory>
        </fileSet>
    </fileSets>

    <dependencySets>
        <!-- copy executable commands to the bin directory without version info -->
        <dependencySet>
            <includes>
                <include>org.apache.tuscany.sca.runtime.standalone:launcher</include>
            </includes>
            <excludes>
                <exclude>org.apache.tuscany.sca.runtime.standalone:standalone-api</exclude>
            </excludes>
            <outputDirectory>bin</outputDirectory>
            <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
            <fileMode>755</fileMode>
        </dependencySet>

        <!-- copy dependencies used by the executable commands to the lib directory -->
        <dependencySet>
            <includes>
                <include>org.apache.tuscany.sca.runtime.standalone:standalone-api</include>
                <include>org.osoa:sca-api-r0.95</include>
                <include>org.apache.tuscany.sca.kernel:tuscany-api</include>
                <include>org.apache.tuscany.sca.kernel:tuscany-host-api</include>
                <!-- servlet api need to be loaded for axis  -->
                <include>javax.servlet:servlet-api</include>
            </includes>
            <outputDirectory>lib</outputDirectory>
            <outputFileNameMapping>${artifactId}-${baseVersion}.${extension}</outputFileNameMapping>
        </dependencySet>

        <!-- copy boot dependencies to launcher profile -->
        <dependencySet>
            <includes>
                <include>org.apache.tuscany.sca.runtime.standalone:standalone-host</include>
            </includes>
            <excludes>
                <exclude>org.apache.tuscany.sca.runtime.standalone:standalone-api</exclude>
                <exclude>org.apache.tuscany.sca.kernel:tuscany-host-api</exclude>
                <exclude>junit:junit</exclude>
            </excludes>
            <outputDirectory>profiles/launcher/boot</outputDirectory>
        </dependencySet>
    </dependencySets>
</assembly>

