<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2019-2025 "Neo4j,"
    Neo4j Sweden AB [https://neo4j.com]

    This file is part of Neo4j.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        https://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.neo4j</groupId>
		<artifactId>neo4j-cypher-dsl-codegen</artifactId>
		<version>2025.1.0</version>
	</parent>

	<artifactId>neo4j-cypher-dsl-codegen-sdn6</artifactId>
	<name>Code Generator (SDN 6)</name>
	<description>Annotation processor reading SDN 6 annotations and creating a static model of them.</description>

	<properties>
		<covered-ratio-complexity>0.7</covered-ratio-complexity>
		<covered-ratio-instructions>0.7</covered-ratio-instructions>
		<java-module-name>org.neo4j.cypherdsl.codegen.sdn6</java-module-name>
		<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.neo4j</groupId>
			<artifactId>neo4j-cypher-dsl-codegen-core</artifactId>
		</dependency>

		<!-- SDN 6 annotation proc -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-neo4j</artifactId>
		</dependency>

		<dependency>
			<groupId>com.google.testing.compile</groupId>
			<artifactId>compile-testing</artifactId>
			<scope>test</scope>
		</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.junit.vintage</groupId>
			<artifactId>junit-vintage-engine</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<testResources>
			<testResource>
				<directory>src/test/java</directory>
				<includes>
					<include>org/neo4j/cypherdsl/codegen/sdn6/models/**/*.java</include>
				</includes>
			</testResource>
			<testResource>
				<directory>src/test/resources</directory>
			</testResource>
		</testResources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration combine.self="append">
					<argLine>@{argLine}
						--add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
						--add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
						--add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
						--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
						--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
						--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</argLine>
				</configuration>
			</plugin>

			<plugin>
				<!--
				| Disable processors, otherwise Javac would already find our processors while compiling them and end up with
				| "Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider org.neo4j.cypherdsl.codegen.neo4j.SDN6AnnotationProcessor not found"
				-->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration combine.self="append">
					<compilerArgument>-proc:none</compilerArgument>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestEntries>
							<Automatic-Module-Name>${java-module-name}</Automatic-Module-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
