<?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>parent</artifactId>
    <version>2026.09.0</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <artifactId>neo4j-codegen</artifactId>

  <packaging>jar</packaging>
  <name>Neo4j - Code Generator</name>
  <description>Simple library for generating code.</description>
  <url>http://components.neo4j.org/${project.artifactId}/${project.version}</url>

  <scm>
    <connection>scm:git:git://github.com/neo4j/neo4j.git</connection>
    <developerConnection>scm:git:git@github.com:neo4j/neo4j.git</developerConnection>
    <url>https://github.com/neo4j/neo4j</url>
  </scm>

  <properties>
    <mixed.language.allowed>true</mixed.language.allowed>
    <moduleName>org.neo4j.codegen</moduleName>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
    </dependency>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-common</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-cypher-config</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-exceptions</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-util</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-values</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm</artifactId>
      <version>${asm.version}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-analysis</artifactId>
      <version>${asm.version}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-tree</artifactId>
      <version>${asm.version}</version>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-util</artifactId>
      <version>${asm.version}</version>
    </dependency>
    <!-- scala -->

    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
    </dependency>
    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-reflect</artifactId>
    </dependency>
    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala3-library_3</artifactId>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- test  -->

    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-test-util</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.scalactic</groupId>
      <artifactId>scalactic_${scala.binary.version}</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <configuration>
          <artifactSet>
            <includes>
              <include>org.ow2.asm:*</include>
            </includes>
          </artifactSet>
          <relocations>
            <relocation>
              <pattern>org.objectweb.asm</pattern>
              <shadedPattern>org.neo4j.codegen.asm</shadedPattern>
            </relocation>
          </relocations>
          <createDependencyReducedPom>false</createDependencyReducedPom>
        </configuration>
        <!--
         The ASM library is notorious for making breaking changes to their API, so
         we shade (embed) it under an org.neo4j package root to avoid version clashes.
        -->
        <executions>
          <execution>
            <id>build-shaded-jar</id>
            <goals>
              <goal>shade</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>scala-fatal-warnings</id>
      <activation>
        <property>
          <name>scalaFatalWarnings</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <configuration>
              <args combine.children="append">
                <arg>-Xfatal-warnings</arg>
                <arg>-feature</arg>
              </args>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
