<?xml version="1.0"?>
<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">
  <id>distribution</id>
  <formats>
    <format>tar.gz</format>
    <format>zip</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <dependencySets>
      <dependencySet>
          <outputDirectory>${project.parent.artifactId}/lib</outputDirectory>
          <unpack>false</unpack>
          <scope>runtime</scope>
          <useProjectArtifact>false</useProjectArtifact>
          <useTransitiveFiltering>true</useTransitiveFiltering>
          <excludes>
            <exclude>org.apache.kafka:kafka-tools:*</exclude>
            <exclude>javax.ws.rs:javax.ws.rs-api:*</exclude>
            <exclude>org.apache.kafka:connect-file:*</exclude>
            <exclude>org.glassfish.jersey.*:*:*</exclude>
            <exclude>org.apache.maven:*:*</exclude>
            <exclude>log4j:log4j:*</exclude>
            <exclude>ch.qos.reload4j:reload4j</exclude>
            <exclude>io.debezium:debezium-scripting</exclude>
            <exclude>io.debezium:debezium-scripting-languages</exclude>
            <exclude>io.debezium:debezium-connector-cassandra-3</exclude>
            <exclude>io.debezium:debezium-connector-cassandra-4</exclude>
            <exclude>io.debezium:debezium-connector-cassandra-5</exclude>
            <exclude>io.debezium:debezium-connector-dse</exclude>
            <exclude>io.prometheus.jmx:jmx_prometheus_javaagent:*</exclude>

            <!-- Exclude Oracle JDBC driver libraries -->
            <exclude>com.oracle.database.jdbc:ojdbc8:*</exclude>
            <exclude>com.oracle.database.jdbc:ojdbc11:*</exclude>
            <exclude>com.oracle.database.nls:orai18n:*</exclude>
          </excludes>
      </dependencySet>
      <dependencySet>
          <outputDirectory>${project.parent.artifactId}/lib</outputDirectory>
          <unpack>false</unpack>
          <scope>runtime</scope>
          <useProjectArtifact>false</useProjectArtifact>
          <useTransitiveFiltering>true</useTransitiveFiltering>
          <includes>
              <include>jakarta.ws.rs:*:*</include>
              <include>jakarta.annotation:*:*</include>
              <include>jakarta.xml.bind:*:*</include>
              <include>jakarta.activation:*:*</include>
              <include>jakarta.validation:*:*</include>
          </includes>
      </dependencySet>
      <dependencySet>
          <outputDirectory>${project.parent.artifactId}/lib_metrics</outputDirectory>
          <unpack>false</unpack>
          <scope>runtime</scope>
          <useProjectArtifact>false</useProjectArtifact>
          <useTransitiveFiltering>true</useTransitiveFiltering>
          <includes>
              <include>io.prometheus.jmx:jmx_prometheus_javaagent:*</include>
          </includes>
      </dependencySet>
      <dependencySet>
          <outputDirectory>${project.parent.artifactId}/lib_opt</outputDirectory>
          <unpack>false</unpack>
          <scope>runtime</scope>
          <useProjectArtifact>false</useProjectArtifact>
          <useTransitiveFiltering>true</useTransitiveFiltering>
          <includes>
            <include>io.debezium:debezium-scripting:*</include>
            <include>io.debezium:debezium-scripting-languages:*</include>
          </includes>
      </dependencySet>
  </dependencySets>
  <fileSets>
    <fileSet>
      <!-- Get the files from the top-level directory -->
      <directory>${project.basedir}/../..</directory>
      <outputDirectory>${project.parent.artifactId}</outputDirectory>
      <includes>
        <include>README*</include>
        <include>CHANGELOG*</include>
        <include>CONTRIBUTE*</include>
        <include>COPYRIGHT*</include>
        <include>LICENSE*</include>
      </includes>
      <useDefaultExcludes>true</useDefaultExcludes>
    </fileSet>
    <fileSet>
      <!-- >directory>../${project.parent.artifactId}-core/target</directory-->
      <directory>${project.build.directory}</directory>
      <outputDirectory>${project.parent.artifactId}</outputDirectory>
      <includes>
        <include>*-runner.jar</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>src/main/resources/distro</directory>
      <outputDirectory>${project.parent.artifactId}</outputDirectory>
      <includes>
        <include>**/*</include>
      </includes>
      <excludes>
        <exclude>connectors/</exclude>
        <exclude>**/*cassandra*</exclude>
        <exclude>**/*cassandra*/*</exclude>
      </excludes>
    </fileSet>
  </fileSets>
</assembly>
