<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
          http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    <!-- Assembles a package that can run schema-registry given dependency packages. This is used to
         construct packages OS packages where underlying libraries, like rest-utils, can be shared
         -->
    <id>package</id>
    <formats>
        <format>dir</format>
        <format>zip</format>
        <format>tar.gz</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <fileSets>
        <fileSet>
            <directory>${project.parent.basedir}</directory>
            <outputDirectory>share/doc/schema-registry/</outputDirectory>
            <includes>
                <include>version.txt</include>
                <include>README*</include>
                <include>LICENSE</include>
                <include>LICENSE-ConfluentCommunity</include>
                <include>NOTICE*</include>
                <include>licenses/</include>
                <include>notices/</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${project.parent.basedir}</directory>
            <outputDirectory></outputDirectory>
            <includes>
                <include>bin/*</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>${project.parent.basedir}/config</directory>
            <outputDirectory>etc/schema-registry</outputDirectory>
            <includes>
                <include>*</include>
            </includes>
        </fileSet>
    </fileSets>
    <dependencySets>
        <dependencySet>
            <outputDirectory>share/java/schema-registry</outputDirectory>
            <useProjectArtifact>true</useProjectArtifact>
            <scope>runtime</scope>
            <!-- Warning: Enabling useTransitiveFiltering is potentially unsafe,
                 cf. https://github.com/miguno/maven-assembly-transitive-deps-woes
                 and https://issues.apache.org/jira/browse/MASSEMBLY-504.  If
                 dependencies happen to be missing in the assembly you may want to
                 disable transitive filtering. -->
            <useTransitiveFiltering>true</useTransitiveFiltering>
            <excludes>
                <exclude>io.confluent:rest-utils</exclude>
                <exclude>io.confluent:common-*</exclude>
            </excludes>
        </dependencySet>
    </dependencySets>
</assembly>
