<?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>
        <groupId>org.neo4j</groupId>
        <artifactId>parent</artifactId>
        <version>5.26.20</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <properties>
        <moduleName>org.neo4j.codegen</moduleName>
    </properties>

    <modelVersion>4.0.0</modelVersion>
    <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>

    <dependencies>
        <!-- scala -->

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

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

        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-unsafe</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-util</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-util</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.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-values</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-cypher-config</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- test  -->

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

    </dependencies>

    <build>
        <plugins>
           <plugin>
               <groupId>net.alchim31.maven</groupId>
               <artifactId>scala-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <!--
         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>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <artifactId>maven-shade-plugin</artifactId>
                <groupId>org.apache.maven.plugins</groupId>
                <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>
            </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>
