<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.neo4j</groupId>
		<artifactId>neo4j-cypher-dsl-parent</artifactId>
		<version>2021.3.2</version>
	</parent>
	<groupId>org.neo4j</groupId>
	<artifactId>neo4j-cypher-dsl-parser</artifactId>
	<version>2021.3.2</version>
	<name>Neo4j Cypher DSL (Parser)</name>
	<description>Building on top of the Neo4j 4.3 JavaCC parsers it provides a way from Cypher to Cypher-DSL Ast.</description>
	<licenses>
		<license>
			<name>GNU General Public License, Version 3</name>
			<url>http://www.gnu.org/licenses/gpl-3.0-standalone.html</url>
			<comments>The software ("Software") developed and owned by Neo4j Sweden AB (referred to in this notice as "Neo4j") is
				licensed under the GNU GENERAL PUBLIC LICENSE Version 3 to all third
				parties and that license is included below.

				However, if you have executed an End User Software License and Services
				Agreement or an OEM Software License and Support Services Agreement, or
				another commercial license agreement with Neo4j or one of its
				affiliates (each, a "Commercial Agreement"), the terms of the license in
				such Commercial Agreement will supersede the GNU GENERAL PUBLIC LICENSE
				Version 3 and you may use the Software solely pursuant to the terms of
				the relevant Commercial Agreement.</comments>
		</license>
	</licenses>
	<properties>
		<java-module-name>org.neo4j.cypherdsl.parser</java-module-name>
		<java.version>11</java.version>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.neo4j</groupId>
			<artifactId>neo4j-cypher-dsl</artifactId>
			<version>2021.3.2</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.jetbrains</groupId>
			<artifactId>annotations</artifactId>
			<version>20.1.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>io.projectreactor</groupId>
			<artifactId>reactor-core</artifactId>
			<version>3.4.5</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.asciidoctor</groupId>
			<artifactId>asciidoctorj</artifactId>
			<version>2.4.2</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<artifactId>asciidoctorj-api</artifactId>
					<groupId>org.asciidoctor</groupId>
				</exclusion>
				<exclusion>
					<artifactId>jruby</artifactId>
					<groupId>org.jruby</groupId>
				</exclusion>
				<exclusion>
					<artifactId>jcommander</artifactId>
					<groupId>com.beust</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>3.15.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>5.7.1</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.reactivestreams</groupId>
			<artifactId>reactive-streams</artifactId>
			<version>1.0.3</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-shade-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<artifactSet>
								<includes>
									<include>org.scala-lang:scala-library</include>
									<include>org.neo4j:cypher-ast-factory</include>
									<include>org.neo4j:neo4j-cypher-javacc-parser</include>
								</includes>
							</artifactSet>
							<relocations>
								<relocation>
									<pattern>org.neo4j.cypher.internal</pattern>
									<shadedPattern>org.neo4j.cypherdsl.parser.internal</shadedPattern>
								</relocation>
								<relocation>
									<pattern>scala</pattern>
									<shadedPattern>org.neo4j.cypherdsl.parser.internal.scala</shadedPattern>
								</relocation>
							</relocations>
							<createSourcesJar>true</createSourcesJar>
							<filters>
								<filter>
									<artifact>*:*</artifact>
									<excludes>
										<exclude>module-info.class</exclude>
										<exclude>META-INF/*</exclude>
										<exclude>library.properties</exclude>
										<exclude>LICENSE</exclude>
										<exclude>rootdoc.txt</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 static org.jetbrains.annotations;

									requires org.apiguardian.api;

									requires org.neo4j.cypherdsl.core;
									// Those are shaded
									// requires org.neo4j.cypher.internal.ast.factory;
									// requires org.neo4j.cypher.internal.parser.javacc;
									// requires scala.library;

									exports org.neo4j.cypherdsl.parser;
									}</moduleInfoSource>
							</module>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<configuration combine.self="append">
					<headerLocation>../etc/checkstyle/java-header-gpl.txt</headerLocation>
				</configuration>
			</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>
		</plugins>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports>
							<report>checkstyle</report>
						</reports>
					</reportSet>
				</reportSets>
				<configuration combine.self="append">
					<headerLocation>../etc/checkstyle/java-header-gpl.txt</headerLocation>
				</configuration>
			</plugin>
		</plugins>
	</reporting>
</project>
