<!--
  ~ /*
  ~ * 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/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/default</directory>
            <outputDirectory>conf/default</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/transports</directory>
            <outputDirectory>wso2/default/conf/transports</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/conf/transports</directory>
            <outputDirectory>wso2/editor/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/default/deployment/siddhi-files</outputDirectory>
            <fileMode>644</fileMode>
            <excludes>
                <exclude>empty.txt</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/default/deployment/csv-files</outputDirectory>
            <excludes>
                <exclude>*/**</exclude>
            </excludes>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/default/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>
    </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>
    </files>
</assembly>
