<?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">

  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-front-end-parent</artifactId>
    <version>2026.05.0</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>neo4j-ast-test-util</artifactId>
  <packaging>jar</packaging>
  <name>openCypher AST for the Cypher Query Language – test utilities</name>

  <description>Test utilities for the Abstract Syntax Tree of the Cypher query language</description>

  <scm>
    <connection>scm:git:git://github.com/openCypher/front-end.git</connection>
    <developerConnection>scm:git:git@github.com:openCypher/front-end.git</developerConnection>
    <url>https://github.com/openCypher/front-end</url>
  </scm>

  <properties>
    <dependency.analyze.failOnWarning>true</dependency.analyze.failOnWarning>
    <moduleName>org.neo4j.cypher.internal.ast</moduleName>
  </properties>

  <!--
        neo4j-ast-test-util depends on neo4j-test-util with compile scope.
        neo4j-test-util depends on org.mockito:mockito-core and org.scalatestplus:mockito-4-6_${scala.binary.version}
        also with compile scope.
        neo4j-ast-test-util effectively depends on the two mockito packages transitively with compile scope.
        The two mockito packages are listed in the dependencyManagement section of the top-level pom with test scope.
        This overrides the scope of the transitive dependencies making them appear as test dependencies.
        Explicitly adding them as dependencies leads to unused dependency warnings, rightly so.
        The solution is to override dependencyManagement.
        This wouldn't be necessary if we removed the scope information from the parent dependencyManagement section of
        the top-level pom.
     -->
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.scalatestplus</groupId>
        <artifactId>mockito-4-6_${scala.binary.version}</artifactId>
        <version>${scala.test.version}.0</version>
        <scope>compile</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-ast</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-common</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-expressions</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-test-util</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-util</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
    </dependency>

    <dependency>
      <groupId>org.scalactic</groupId>
      <artifactId>scalactic_${scala.binary.version}</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest-compatible</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest-core_${scala.binary.version}</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest-funsuite_${scala.binary.version}</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest-matchers-core_${scala.binary.version}</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest-shouldmatchers_${scala.binary.version}</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_${scala.binary.version}</artifactId>
      <scope>compile</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <!-- disable only the ban-test-dependencies-in-compile enforcer rule
                since this project creates test utilities -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>ban-test-dependencies-in-compile</id>
            <phase>none</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
