<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <parent>
    <artifactId>datastax-mgmtapi</artifactId>
    <groupId>io.k8ssandra</groupId>
    <version>0.1.115</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>datastax-mgmtapi-agent-common</artifactId>
  <version>0.1.115</version>
  <build>
    <resources>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer />
                <transformer>
                  <manifestEntries>
                    <Premain-Class>com.datastax.mgmtapi.Agent</Premain-Class>
                    <Implementation-Version>${project.version}</Implementation-Version>
                  </manifestEntries>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <createDependencyReducedPom>true</createDependencyReducedPom>
          <artifactSet>
            <includes>
              <include>*:*</include>
            </includes>
          </artifactSet>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>META-INF/*.SF</exclude>
                <exclude>META-INF/*.DSA</exclude>
                <exclude>META-INF/*.RSA</exclude>
              </excludes>
            </filter>
          </filters>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <dependencies>
        <dependency>
          <groupId>io.k8ssandra</groupId>
          <artifactId>datastax-mgmtapi-common</artifactId>
          <version>${project.version}</version>
        </dependency>
        <dependency>
          <groupId>net.bytebuddy</groupId>
          <artifactId>byte-buddy</artifactId>
          <version>${bytebuddy.version}</version>
        </dependency>
        <dependency>
          <groupId>net.bytebuddy</groupId>
          <artifactId>byte-buddy-agent</artifactId>
          <version>${bytebuddy.version}</version>
        </dependency>
        <dependency>
          <groupId>org.apache.cassandra</groupId>
          <artifactId>cassandra-all</artifactId>
          <version>${cassandra4.version}</version>
          <scope>provided</scope>
          <exclusions>
            <exclusion>
              <artifactId>*</artifactId>
              <groupId>commons-codec</groupId>
            </exclusion>
          </exclusions>
        </dependency>
        <dependency>
          <groupId>org.apache.cassandra</groupId>
          <artifactId>java-driver-query-builder</artifactId>
          <version>${driver.version}</version>
          <exclusions>
            <exclusion>
              <artifactId>snakeyaml</artifactId>
              <groupId>org.yaml</groupId>
            </exclusion>
            <exclusion>
              <artifactId>jackson-annotations</artifactId>
              <groupId>com.fasterxml.jackson.core</groupId>
            </exclusion>
            <exclusion>
              <artifactId>jackson-core</artifactId>
              <groupId>com.fasterxml.jackson.core</groupId>
            </exclusion>
            <exclusion>
              <artifactId>jackson-databind</artifactId>
              <groupId>com.fasterxml.jackson.core</groupId>
            </exclusion>
            <exclusion>
              <artifactId>jackson-dataformat-yaml</artifactId>
              <groupId>com.fasterxml.jackson.dataformat</groupId>
            </exclusion>
            <exclusion>
              <artifactId>slf4j-api</artifactId>
              <groupId>org.slf4j</groupId>
            </exclusion>
            <exclusion>
              <artifactId>netty-handler</artifactId>
              <groupId>io.netty</groupId>
            </exclusion>
          </exclusions>
        </dependency>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>${junit.version}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.assertj</groupId>
          <artifactId>assertj-core</artifactId>
          <version>${assertj.version}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.mockito</groupId>
          <artifactId>mockito-core</artifactId>
          <version>${mockito.version}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>io.prometheus</groupId>
          <artifactId>simpleclient_hotspot</artifactId>
          <version>${prometheus.version}</version>
        </dependency>
        <dependency>
          <groupId>io.prometheus</groupId>
          <artifactId>simpleclient_common</artifactId>
          <version>${prometheus.version}</version>
        </dependency>
        <dependency>
          <groupId>io.k8ssandra</groupId>
          <artifactId>datastax-mgmtapi-agent-shaded-libs</artifactId>
          <version>${project.version}</version>
          <exclusions>
            <exclusion>
              <artifactId>snakeyaml</artifactId>
              <groupId>org.yaml</groupId>
            </exclusion>
            <exclusion>
              <artifactId>jackson-annotations</artifactId>
              <groupId>com.fasterxml.jackson.core</groupId>
            </exclusion>
            <exclusion>
              <artifactId>jackson-core</artifactId>
              <groupId>com.fasterxml.jackson.core</groupId>
            </exclusion>
            <exclusion>
              <artifactId>jackson-databind</artifactId>
              <groupId>com.fasterxml.jackson.core</groupId>
            </exclusion>
            <exclusion>
              <artifactId>jackson-dataformat-yaml</artifactId>
              <groupId>com.fasterxml.jackson.dataformat</groupId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.cassandra</groupId>
      <artifactId>cassandra-all</artifactId>
      <version>4.0.20</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>*</artifactId>
          <groupId>commons-codec</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.17.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>5.5.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>objenesis</artifactId>
          <groupId>org.objenesis</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
