<!--
  ~ /*
  ~ * 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>wso2-streaming-integrator-${project.version}</baseDirectory>
    <id>WSO2 Streaming Integrator 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/server/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/server</directory>
            <outputDirectory>conf/server</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>carbon-home/conf/transports/server</directory>
            <outputDirectory>wso2/server/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/server/deployment/siddhi-files</outputDirectory>
            <fileMode>644</fileMode>
            <excludes>
                <exclude>empty.txt</exclude>
            </excludes>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/server/deployment/csv-files</outputDirectory>
            <excludes>
                <exclude>*/**</exclude>
            </excludes>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>.</directory>
            <outputDirectory>wso2/server/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>
        <fileSet>
            <directory>carbon-home/bin/bootstrap</directory>
            <outputDirectory>bin/bootstrap</outputDirectory>
            <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>
        <file>
            <source>carbon-home/runtime/default/bin/carbon.bat</source>
            <outputDirectory>wso2/server/bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>carbon-home/runtime/default/bin/carbon.sh</source>
            <outputDirectory>wso2/server/bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
    </files>
</assembly>
