<?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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>eu.michael-simons.neo4j</groupId>
	<artifactId>junit-jupiter-causal-cluster-testcontainer-extension</artifactId>
	<version>2022.1.6</version>

	<name>JUnit Jupiter Causal-Cluster-Testcontainer Extension</name>
	<description>Provides a JUnit Jupiter extension that creates Neo4j causal clusters on demand.</description>
	<url>https://github.com/michael-simons/junit-jupiter-causal-cluster-testcontainer-extension</url>

	<inceptionYear>2019</inceptionYear>
	<organization>
		<name>Neo4j, Neo4j Sweden AB</name>
		<url>https://neo4j.com</url>
	</organization>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>msimons</id>
			<name>Michael Simons</name>
			<email>michael.simons at neo4j.com</email>
			<organization>Neo Technology</organization>
			<organizationUrl>http://www.neotechnology.com</organizationUrl>
			<roles>
				<role>Project Lead</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:michael-simons/junit-jupiter-causal-cluster-testcontainer-extension.git</connection>
		<developerConnection>scm:git:git@github.com:michael-simons/junit-jupiter-causal-cluster-testcontainer-extension.git</developerConnection>
		<tag>2022.1.6</tag>
		<url>https://github.com/michael-simons/junit-jupiter-causal-cluster-testcontainer-extension</url>
	</scm>

	<properties>
		<assertj.version>3.24.2</assertj.version>
		<checkstyle.version>10.12.0</checkstyle.version>
		<exec-maven-plugin.version>3.1.0</exec-maven-plugin.version>
		<java.version>8</java.version>
		<jsr305.version>3.0.2</jsr305.version>
		<junit-jupiter.version>5.9.3</junit-jupiter.version>
		<maven-checkstyle-plugin.version>3.3.0</maven-checkstyle-plugin.version>
		<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
		<maven-enforcer-plugin.version>3.3.0</maven-enforcer-plugin.version>
		<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
		<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
		<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
		<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
		<maven-surefire-plugin.version>3.1.0</maven-surefire-plugin.version>
		<maven.compiler.debug>true</maven.compiler.debug>
		<maven.compiler.parameters>true</maven.compiler.parameters>
		<maven.compiler.release>${java.version}</maven.compiler.release>
		<maven.version>3.8.5</maven.version>
		<neo4j-java-driver.version>4.4.9</neo4j-java-driver.version>
		<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<slf4j.version>1.7.36</slf4j.version>
		<sortpom-maven-plugin.version>3.2.1</sortpom-maven-plugin.version>
		<testcontainers.version>1.18.3</testcontainers.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.junit</groupId>
				<artifactId>junit-bom</artifactId>
				<version>${junit-jupiter.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>com.google.code.findbugs</groupId>
				<artifactId>jsr305</artifactId>
				<version>${jsr305.version}</version>
			</dependency>
			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-core</artifactId>
				<version>${assertj.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-simple</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
		</dependency>

		<dependency>
			<groupId>org.testcontainers</groupId>
			<artifactId>neo4j</artifactId>
			<version>${testcontainers.version}</version>
		</dependency>

		<dependency>
			<groupId>org.testcontainers</groupId>
			<artifactId>testcontainers</artifactId>
			<version>${testcontainers.version}</version>
			<exclusions>
				<exclusion>
					<!-- This exclusion is prevents us ending up with two different jna versions on the classpath -->
					<groupId>org.rnorth.visible-assertions</groupId>
					<artifactId>visible-assertions</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-testkit</artifactId>
			<scope>test</scope>
		</dependency>

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

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>${maven-checkstyle-plugin.version}</version>
					<configuration>
						<configLocation>etc/checkstyle/config.xml</configLocation>
						<suppressionsLocation>etc/checkstyle/suppressions.xml</suppressionsLocation>
						<headerLocation>etc/checkstyle/java-header.txt</headerLocation>
						<encoding>${project.build.sourceEncoding}</encoding>
						<consoleOutput>true</consoleOutput>
						<failsOnError>true</failsOnError>
						<includeTestSourceDirectory>true</includeTestSourceDirectory>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>com.puppycrawl.tools</groupId>
							<artifactId>checkstyle</artifactId>
							<version>${checkstyle.version}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>com.github.ekryd.sortpom</groupId>
					<artifactId>sortpom-maven-plugin</artifactId>
					<version>${sortpom-maven-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
						<keepBlankLines>true</keepBlankLines>
						<nrOfIndentSpace>-1</nrOfIndentSpace>
						<sortProperties>true</sortProperties>
						<sortDependencies>scope,groupId,artifactId</sortDependencies>
						<createBackupFile>false</createBackupFile>
						<expandEmptyElements>false</expandEmptyElements>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>com.github.ekryd.sortpom</groupId>
				<artifactId>sortpom-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>sort</goal>
						</goals>
						<phase>verify</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>${nexus-staging-maven-plugin.version}</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<configuration>
					<detectOfflineLinks>false</detectOfflineLinks>
					<detectJavaApiLink>false</detectJavaApiLink>
					<source>${java.version}</source>
					<tags>
						<tag>
							<name>soundtrack</name>
							<placement>X</placement>
							<head>Soundtrack</head>
						</tag>
					</tags>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${maven-release-plugin.version}</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<tagNameFormat>@{project.version}</tagNameFormat>
					<goals>deploy</goals>
					<preparationGoals>clean exec:exec@update_readme exec:exec@delete_readme_backup scm:checkin@readme</preparationGoals>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>${exec-maven-plugin.version}</version>
				<executions>
					<execution>
						<id>update_readme</id>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>sed</executable>
							<arguments>
								<argument>-i</argument>
								<argument>.bak</argument>
								<argument>s/\(:latest_version:\) \(.*\)/\1 ${project.version}/g</argument>
								<argument>README.adoc</argument>
							</arguments>
						</configuration>
					</execution>
					<execution>
						<id>delete_readme_backup</id>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>rm</executable>
							<arguments>
								<argument>README.adoc.bak</argument>
							</arguments>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-scm-plugin</artifactId>
				<version>2.0.1</version>
				<executions>
					<execution>
						<id>readme</id>
						<configuration>
							<message>[maven-scm-plugin] Update README.adoc.</message>
							<includes>README.adoc</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>${maven-enforcer-plugin.version}</version>
				<executions>
					<execution>
						<id>enforce</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<phase>validate</phase>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>11</version>
								</requireJavaVersion>
								<DependencyConvergence/>
								<requireMavenVersion>
									<version>${maven.version}</version>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<executions>
					<execution>
						<id>validate</id>
						<goals>
							<goal>check</goal>
						</goals>
						<phase>validate</phase>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>fast</id>
			<activation>
				<property>
					<name>fast</name>
				</property>
			</activation>
			<properties>
				<asciidoctor.skip>true</asciidoctor.skip>
				<checkstyle.skip>true</checkstyle.skip>
				<docker.skip>true</docker.skip>
				<invoker.skip>true</invoker.skip>
				<jacoco.skip>true</jacoco.skip>
				<jqassistant.skip>true</jqassistant.skip>
				<license.skip>true</license.skip>
				<maven.javadoc.skip>true</maven.javadoc.skip>
				<pmd.skip>true</pmd.skip>
				<skipITs>true</skipITs>
				<skipNativeBuild>true</skipNativeBuild>
				<skipTests>true</skipTests>
			</properties>
		</profile>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<goals>
									<goal>sign</goal>
								</goals>
								<phase>verify</phase>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
