<?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>neo4j-jdbc-translator</artifactId>
    <groupId>org.neo4j</groupId>
    <version>6.7.3</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>neo4j-jdbc-translator-sparkcleaner</artifactId>
  <name>Neo4j JDBC Driver (Spark preparing Translator)</name>
  <description>A specialized translator unwrapping Spark subqueries</description>
  <build>
    <plugins>
      <plugin>
        <groupId>com.github.siom79.japicmp</groupId>
        <artifactId>japicmp-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.cyclonedx</groupId>
        <artifactId>cyclonedx-maven-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>org.neo4j:cypher-antlr-common</include>
                  <include>org.neo4j:cypher-v5-antlr-parser</include>
                  <include>org.antlr:antlr4-runtime</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>org.antlr</pattern>
                  <shadedPattern>org.neo4j.jdbc.translator.sparkcleaner.internal.shaded.antlr</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.neo4j.cypher.internal.parser</pattern>
                  <shadedPattern>org.neo4j.jdbc.translator.sparkcleaner.internal.shaded.parser.common</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.neo4j.cypher.internal.parser.v5</pattern>
                  <shadedPattern>org.neo4j.jdbc.translator.sparkcleaner.internal.shaded.parser.v5</shadedPattern>
                </relocation>
              </relocations>
              <transformers>
                <transformer />
              </transformers>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>LICENSE.txt</exclude>
                    <exclude>META-INF/LICENSE*.txt</exclude>
                    <exclude>META-INF/MANIFEST.MF</exclude>
                    <exclude>META-INF/NOTICE.txt</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.moditect</groupId>
        <artifactId>moditect-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-module-infos</id>
            <phase>package</phase>
            <goals>
              <goal>add-module-info</goal>
            </goals>
            <configuration>
              <overwriteExistingFiles>true</overwriteExistingFiles>
              <module>
                <moduleInfoSource>module org.neo4j.jdbc.translator.sparkcleaner {
										provides org.neo4j.jdbc.translator.spi.TranslatorFactory with org.neo4j.jdbc.translator.sparkcleaner.SparkSubqueryCleaningTranslatorFactory;
										requires org.neo4j.jdbc.translator.spi;
									}</moduleInfoSource>
              </module>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-jdbc-translator-spi</artifactId>
      <version>6.7.3</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.27.3</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>byte-buddy</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.13.4</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-params</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-engine</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>5.18.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>byte-buddy-agent</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
        <exclusion>
          <artifactId>objenesis</artifactId>
          <groupId>org.objenesis</groupId>
        </exclusion>
        <exclusion>
          <artifactId>byte-buddy</artifactId>
          <groupId>net.bytebuddy</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <sonar.coverage.jacoco.xmlReportPaths>${basedir}/../../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
  </properties>
</project>
