<?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>minimal</id>
    <!-- Used as artifact discriminator -->
    <formats>
        <format>tar.gz</format>
    </formats>
    <fileSets>

        <!-- Copy license and other files from root -->
        <fileSet>
            <directory>../..</directory>
            <outputDirectory>/</outputDirectory>
            <includes>
                <include>README</include>
                <include>RELEASE*</include>
                <include>LICENSE</include>
                <include>NOTICE</include>
            </includes>
            <lineEnding>unix</lineEnding>
        </fileSet>

        <!-- Copy over everything that needs to get unix line endings -->
        <fileSet>
            <directory>src/main/distribution/text</directory>
            <outputDirectory>/</outputDirectory>
            <lineEnding>unix</lineEnding>
        </fileSet>
        <fileSet>
            <directory>src/main/distribution/unix-text</directory>
            <outputDirectory>/</outputDirectory>
            <lineEnding>unix</lineEnding>
        </fileSet>
        <fileSet>
            <directory>target/classes/bin</directory>
            <outputDirectory>/bin/</outputDirectory>
            <lineEnding>unix</lineEnding>
            <fileMode>0755</fileMode>
            <includes>
                <include>admin</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>target/classes/etc</directory>
            <excludes>
                <exclude>org.apache.karaf.features.cfg</exclude>
                <exclude>startup.properties</exclude>
            </excludes>
            <outputDirectory>/etc/</outputDirectory>
            <lineEnding>unix</lineEnding>
            <fileMode>0664</fileMode>
        </fileSet>

        <fileSet>
            <directory>target/classes/minimal</directory>
            <outputDirectory>/etc/</outputDirectory>
            <lineEnding>unix</lineEnding>
            <fileMode>0664</fileMode>
        </fileSet>

        <!-- Copy over the files that need unix line endings and also chmod to 755 -->
        <fileSet>
            <directory>src/main/distribution/unix-shell</directory>
            <outputDirectory>/</outputDirectory>
            <lineEnding>unix</lineEnding>
            <fileMode>0755</fileMode>
        </fileSet>

        <!-- Copy over jar files -->
        <fileSet>
            <directory>target/dependencies</directory>
            <excludes>
                <exclude>*.html</exclude>
                <exclude>*.pdf</exclude>
            </excludes>
            <outputDirectory>/</outputDirectory>
            <fileMode>0664</fileMode>
        </fileSet>
        <fileSet>
            <directory>target/features-repo</directory>
            <includes>
            	<include>**/*.xml</include>
            </includes>
            <outputDirectory>system</outputDirectory>
            <fileMode>0664</fileMode>
        </fileSet>

    </fileSets>

    <dependencySets>
        <dependencySet>
            <outputDirectory>/lib/endorsed</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <includes>
                <include>org.apache.karaf:org.apache.karaf.exception</include>
                <include>org.apache.karaf.bundles:org.apache.karaf.bundles.xerces-2.11.0</include>
                <include>org.apache.karaf.bundles:org.apache.karaf.bundles.xalan-2.7.1</include>
                <include>org.apache.karaf.bundles:org.apache.karaf.bundles.xalan-serializer-2.7.1</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/apache/felix/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.apache.felix:org.apache.felix.configadmin</include>
                <include>org.apache.felix:org.apache.felix.framework</include>
                <include>org.apache.felix:org.apache.felix.fileinstall</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/ops4j/pax/logging/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.ops4j.pax.logging:pax-logging-api</include>
                <include>org.ops4j.pax.logging:pax-logging-service</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/ops4j/pax/url/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.ops4j.pax.url:pax-url-mvn</include>
                <include>org.ops4j.pax.url:pax-url-wrap</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/apache/karaf/management/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.apache.karaf.management:org.apache.karaf.management.server</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/apache/karaf/features/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.apache.karaf.features:org.apache.karaf.features.core</include>
                <include>org.apache.karaf.features:org.apache.karaf.features.command</include>
                <include>org.apache.karaf.features:org.apache.karaf.features.management</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/apache/karaf/shell/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.apache.karaf.shell:org.apache.karaf.shell.console</include>
                <include>org.apache.karaf.shell:org.apache.karaf.shell.dev</include>
                <include>org.apache.karaf.shell:org.apache.karaf.shell.osgi</include>
                <include>org.apache.karaf.shell:org.apache.karaf.shell.log</include>
                <include>org.apache.karaf.shell:org.apache.karaf.shell.config</include>
                <include>org.apache.karaf.shell:org.apache.karaf.shell.packages</include>
                <include>org.apache.karaf.shell:org.apache.karaf.shell.commands</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/apache/karaf/diagnostic/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.apache.karaf.diagnostic:org.apache.karaf.diagnostic.core</include>
                <include>org.apache.karaf.diagnostic:org.apache.karaf.diagnostic.common</include>
                <include>org.apache.karaf.diagnostic:org.apache.karaf.diagnostic.command</include>
                <include>org.apache.karaf.diagnostic:org.apache.karaf.diagnostic.management</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/apache/karaf/jaas/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.apache.karaf.jaas:org.apache.karaf.jaas.config</include>
                <include>org.apache.karaf.jaas:org.apache.karaf.jaas.modules</include>
                <include>org.apache.karaf.jaas:org.apache.karaf.jaas.command</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/eclipse/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.eclipse:osgi</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/apache/aries/blueprint/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.apache.aries.blueprint:org.apache.aries.blueprint.api</include>
                <include>org.apache.aries.blueprint:org.apache.aries.blueprint.core</include>
                <include>org.apache.aries.blueprint:org.apache.aries.blueprint.cm</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/apache/aries/proxy/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.apache.aries.proxy:org.apache.aries.proxy.api</include>
                <include>org.apache.aries.proxy:org.apache.aries.proxy.impl</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/apache/aries/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.apache.aries:org.apache.aries.util</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/ow2/asm/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.ow2.asm:asm-all</include>
            </includes>
        </dependencySet>
        <dependencySet>
            <outputDirectory>/system</outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <fileMode>0664</fileMode>
            <outputFileNameMapping>
                org/apache/aries/jmx/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
            </outputFileNameMapping>
            <includes>
                <include>org.apache.aries.jmx:org.apache.aries.jmx.api</include>
                <include>org.apache.aries.jmx:org.apache.aries.jmx.core</include>
                <include>org.apache.aries.jmx:org.apache.aries.jmx.blueprint.api</include>
                <include>org.apache.aries.jmx:org.apache.aries.jmx.blueprint.core</include>
            </includes>
        </dependencySet>
    </dependencySets>
</assembly>
