<?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-cypher-dsl-parent</artifactId>
    <groupId>org.neo4j</groupId>
    <version>2025.3.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>neo4j-cypher-dsl-parser</artifactId>
  <name>Neo4j Cypher DSL (Parser)</name>
  <description>Building on top of the Neo4j 4.4 JavaCC parsers it provides a way from Cypher to Cypher-DSL Ast.</description>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <useModulePath>false</useModulePath>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <classesDirectory>${project.build.outputDirectory}</classesDirectory>
          <classpathDependencyExcludes>
            <classpathDependencyExclude>org.neo4j:neo4j-cypher-dsl-parser</classpathDependencyExclude>
          </classpathDependencyExcludes>
          <useModulePath>false</useModulePath>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>org.neo4j:cypher-ast-factory</include>
                  <include>org.neo4j:neo4j-cypher-javacc-parser</include>
                  <include>org.neo4j:cypher-parser-common</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>org.neo4j.cypher.internal</pattern>
                  <shadedPattern>org.neo4j.cypherdsl.parser.internal</shadedPattern>
                </relocation>
              </relocations>
              <createSourcesJar>true</createSourcesJar>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>module-info.class</exclude>
                    <exclude>library.properties</exclude>
                    <exclude>LICENSE.txt</exclude>
                    <exclude>rootdoc.txt</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.neo4j:cypher-ast-factory</artifact>
                  <excludes>
                    <exclude>META-INF/**/*</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.neo4j:neo4j-cypher-javacc-parser</artifact>
                  <excludes>
                    <exclude>META-INF/**/*</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>org.neo4j:cypher-parser-common</artifact>
                  <excludes>
                    <exclude>META-INF/**/*</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.cypherdsl.parser {

										requires transitive org.apiguardian.api;
										requires transitive org.neo4j.cypherdsl.core;

										// Those are shaded
										// requires org.neo4j.cypher.internal.parser;
										// requires org.neo4j.cypher.internal.parser.javacc;
										// requires org.neo4j.cypher.internal.ast.factory;

										exports org.neo4j.cypherdsl.parser;
									}</moduleInfoSource>
              </module>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/test-classes</outputDirectory>
              <resources>
                <resource>
                  <directory>${project.basedir}</directory>
                  <includes>
                    <include>README.adoc</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.siom79.japicmp</groupId>
        <artifactId>japicmp-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-cypher-dsl</artifactId>
      <version>2025.3.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.opencsv</groupId>
      <artifactId>opencsv</artifactId>
      <version>5.12.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>commons-text</artifactId>
          <groupId>org.apache.commons</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-beanutils</artifactId>
          <groupId>commons-beanutils</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-collections4</artifactId>
          <groupId>org.apache.commons</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.asciidoctor</groupId>
      <artifactId>asciidoctorj</artifactId>
      <version>3.0.1</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>test-unit</artifactId>
          <groupId>rubygems</groupId>
        </exclusion>
        <exclusion>
          <artifactId>asciidoctorj-api</artifactId>
          <groupId>org.asciidoctor</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jruby</artifactId>
          <groupId>org.jruby</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.27.7</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>6.1.3</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.neo4j.test</groupId>
      <artifactId>neo4j-harness</artifactId>
      <version>5.26.30</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>neo4j</artifactId>
          <groupId>org.neo4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>test-utils</artifactId>
          <groupId>org.neo4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>io-test-utils</artifactId>
          <groupId>org.neo4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-logging</artifactId>
          <groupId>commons-logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>neo4j-server-test-utils</artifactId>
          <groupId>org.neo4j.app</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-codec</artifactId>
          <groupId>commons-codec</groupId>
        </exclusion>
        <exclusion>
          <artifactId>neo4j-kernel</artifactId>
          <groupId>org.neo4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-vintage-engine</artifactId>
          <groupId>org.junit.vintage</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>2.0.17</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>checkstyle</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-cypher-dsl-bom</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <properties>
    <sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
    <covered-ratio-complexity>0.68</covered-ratio-complexity>
  </properties>
</project>
