<!--
  ~ /*
  ~ * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~ *
  ~ * 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>
    <includeBaseDirectory>true</includeBaseDirectory>
    <baseDirectory>wso2das-${project.version}</baseDirectory>
    <id>WSO2 Stream Processor Distribution</id>
    <formats>
        <format>zip</format>
    </formats>

    <fileSets>
        <fileSet>
            <directory>target/carbon-analytics</directory>
            <outputDirectory>.</outputDirectory>
            <excludes>
                <exclude>README.txt</exclude>
                <exclude>LICENSE.txt</exclude>
                <exclude>bin/carbon.sh</exclude>
                <exclude>bin/carbon.bat</exclude>
                <exclude>release-notes.html</exclude>
                <exclude>conf/osgi/launch.properties</exclude>
                <exclude>conf/deployment.yaml</exclude>
                <exclude>conf/worker/log4j2.xml</exclude>
                <exclude>conf/transports/netty-transports.yml</exclude>
                <exclude>**/*.ipr</exclude>
                <exclude>**/*.iwr</exclude>
                <exclude>**/*.eclipse</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>../..</directory>
            <outputDirectory>.</outputDirectory>
            <includes>
                <include>README.md</include>
                <include>LICENSE</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>carbon-home/conf/worker</directory>
            <outputDirectory>conf/worker</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/conf/manager</directory>
            <outputDirectory>conf/manager</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/conf/editor</directory>
            <outputDirectory>conf/editor</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/conf/dashboard</directory>
            <outputDirectory>conf/dashboard</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/conf/transports/worker</directory>
            <outputDirectory>wso2/worker/conf/transports</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/conf/transports/manager</directory>
            <outputDirectory>wso2/manager/conf/transports</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/conf/transports/editor</directory>
            <outputDirectory>wso2/editor/conf/transports</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/conf/transports/dashboard</directory>
            <outputDirectory>wso2/dashboard/conf/transports</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/conf/osgi</directory>
            <outputDirectory>conf/osgi</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/resources/security</directory>
            <outputDirectory>resources/security</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/bin</directory>
            <outputDirectory>bin</outputDirectory>
            <includes>
                <include>**/*.sh</include>
                <include>**/*.bat</include>
            </includes>
            <fileMode>755</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/bin</directory>
            <outputDirectory>bin</outputDirectory>
            <includes>
                <include>**/*.txt</include>
            </includes>
            <fileMode>444</fileMode>
        </fileSet>
        <fileSet>
            <directory>../samples</directory>
            <outputDirectory>samples</outputDirectory>
            <excludes>
                <exclude>target/**</exclude>
                <exclude>scripts/**</exclude>
                <exclude>pom.xml</exclude>
                <exclude>LICENSE.txt</exclude>
                <exclude>release-notes.html</exclude>
                <exclude>**/*.ipr</exclude>
                <exclude>**/*.iwr</exclude>
                <exclude>**/*.eclipse</exclude>
                <exclude>**/*.iml</exclude>
                <exclude>**/*.releaseBackup</exclude>
                <exclude>%regex[(?!.*utils/).*pom.xml]</exclude>
                <exclude>**/target/**</exclude>
            </excludes>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/deployment/siddhi-files</directory>
            <outputDirectory>wso2/worker/deployment/siddhi-files</outputDirectory>
            <fileMode>644</fileMode>
            <excludes>
                <exclude>empty.txt</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/worker/deployment/csv-files</outputDirectory>
            <excludes>
                <exclude>*/**</exclude>
            </excludes>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/worker/deployment/simulation-configs</outputDirectory>
            <excludes>
                <exclude>*/**</exclude>
            </excludes>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/manager/deployment/siddhi-files</outputDirectory>
            <excludes>
                <exclude>*/**</exclude>
            </excludes>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/manager/deployment/csv-files</outputDirectory>
            <excludes>
                <exclude>*/**</exclude>
            </excludes>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/manager/deployment/simulation-configs</outputDirectory>
            <excludes>
                <exclude>*/**</exclude>
            </excludes>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/editor/deployment/workspace</outputDirectory>
            <excludes>
                <exclude>*/**</exclude>
            </excludes>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/editor/deployment/csv-files</outputDirectory>
            <excludes>
                <exclude>*/**</exclude>
            </excludes>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/editor/deployment/simulation-configs</outputDirectory>
            <excludes>
                <exclude>*/**</exclude>
            </excludes>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>target/extensions</directory>
            <outputDirectory>lib</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/samples/artifacts/1001</directory>
            <outputDirectory>samples/artifacts/1001</outputDirectory>
            <fileMode>644</fileMode>
            <excludes>
                <exclude>empty.txt</exclude>
            </excludes>
        </fileSet>
    </fileSets>
    <files>
        <file>
            <source>target/carbon-analytics/bin/kernel-version.txt</source>
            <outputDirectory>bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>444</fileMode>
        </file>
        <file>
            <source>target/carbon-analytics/bin/README.txt</source>
            <outputDirectory>bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>444</fileMode>
        </file>
        <file>
            <source>carbon-home/bin/version.txt</source>
            <outputDirectory>bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>carbon-home/runtime/default/bin/carbon.bat</source>
            <outputDirectory>wso2/worker/bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>carbon-home/runtime/default/bin/carbon.sh</source>
            <outputDirectory>wso2/worker/bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>carbon-home/runtime/default/bin/carbon.bat</source>
            <outputDirectory>wso2/dashboard/bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>carbon-home/runtime/default/bin/carbon.sh</source>
            <outputDirectory>wso2/dashboard/bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
    </files>
</assembly>
