<?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>
	<groupId>uk.dansiviter.juli</groupId>
	<artifactId>juli-project</artifactId>
	<version>0.5.1</version>
	<packaging>pom</packaging>
	<name>Java Util Logger Improver (JULI)</name>
	<description>Library to help simplfy and improve java.util.logger</description>

	<url>https://github.com/dansiviter/juli</url>
	<inceptionYear>2020</inceptionYear>

	<scm>
		<developerConnection>scm:git:git@github.com:dansiviter/juli.git</developerConnection>
		<connection>scm:git:git@github.com:dansiviter/juli.git</connection>
		<url>https://github.com/dansiviter/juli</url>
		<tag>juli-project-0.5.1</tag>
	</scm>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>manual</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Daniel Siviter</name>
			<email>dansiviter@gmail.com</email>
		</developer>
	</developers>

	<properties>
		<java.version>11</java.version>
		<maven.compiler.release>${java.version}</maven.compiler.release>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<surefire.useModulePath>false</surefire.useModulePath>

		<sonar.projectKey>dansiviter_juli</sonar.projectKey>
		<sonar.organization>dansiviter-github</sonar.organization>
		<sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
		<sonar.host.url>https://sonarcloud.io</sonar.host.url>

		<module.name>${project.groupId}.${project.artifactId}</module.name>
	</properties>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh-snapshot</id>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh-staging</id>
			<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<modules>
		<module>core</module>
		<module>processor</module>
		<module>cdi</module>
	</modules>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter</artifactId>
				<version>5.8.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-junit-jupiter</artifactId>
				<version>4.3.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest</artifactId>
				<version>[2.2,3.0)</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.awaitility</groupId>
				<artifactId>awaitility</artifactId>
				<version>4.1.1</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<!-- Test Dependencies -->

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

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.2.0</version>
					<configuration>
						<archive>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
							<manifestEntries>
								<Automatic-Module-Name>${module.name}</Automatic-Module-Name>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.0.0-M5</version>
					<configuration>
						<properties>
								<configurationParameters>
									junit.jupiter.execution.parallel.enabled=true
									junit.jupiter.execution.parallel.config.strategy=dynamic
									junit.jupiter.execution.parallel.mode.classes.default=concurrent
								</configurationParameters>
						</properties>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>3.0.0-M5</version>
				</plugin>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<version>3.0.0-M1</version>
					<configuration>
            <scmCommentPrefix>[skip ci]</scmCommentPrefix>
        	</configuration>
				</plugin>
				<plugin>
					<groupId>org.jboss.jandex</groupId>
					<artifactId>jandex-maven-plugin</artifactId>
					<version>1.2.1</version>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>0.8.7</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>benchmarks</id>
			<modules>
				<module>core</module>
				<module>processor</module>
				<module>cdi</module>
				<module>benchmarks</module>
			</modules>
		</profile>

		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
