<?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>

	<parent>
        <groupId>com.itemis</groupId>
        <artifactId>org-parent</artifactId>
        <version>5.4.1</version>
    </parent>
    
	<artifactId>fluffyj</artifactId>
	<version>1.8.1</version>

	<name>Fluffy J</name>
	<description>A library that tries to put a little fluff ❤ into the daily life of Java developers</description>

	<packaging>jar</packaging>

	<licenses>
		<license>
			<name>Eclipse Public License - v2.0</name>
			<url>https://www.eclipse.org/legal/epl-2.0</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>JMO</id>
			<name>Jan Mosig</name>
			<organization>itemis AG</organization>
			<organizationUrl>www.itemis.com</organizationUrl>
			<email>jan.mosig@itemis.de</email>
			<timezone>Europe/Berlin</timezone>
			<url>https://github.com/JanMosigItemis</url>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://github.com/itemis/fluffyj.git</connection>
		<tag>HEAD</tag>
		<url>https://github.com/itemis/fluffyj.git</url>
	</scm>

	<organization>
		<name>itemis AG</name>
		<url>www.itemis.com</url>
	</organization>

	<url>https://github.com/itemis/fluffyj</url>

	<properties>
		<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
		<maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
		<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
		<maven-compiler-plugin.version>3.9.0</maven-compiler-plugin.version>
		<java.version>17</java.version>
		<maven.compiler.release>11</maven.compiler.release>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
		<build.timestamp.formatted>${maven.build.timestamp}</build.timestamp.formatted>
		<maven.build.timestamp.format>yyyy-MM-dd HH:mm.ssZ</maven.build.timestamp.format>
		<resource.delimiter>${*}</resource.delimiter>
		<guava.version>31.0.1-jre</guava.version>
		<mockito.version>4.3.1</mockito.version>
		<hamcrest.version>2.2</hamcrest.version>
        <!-- Be aware: Spotbugs seems incompatible to JDK < 17 since 4.4.2 -->
        <spotbugs.plugin.version>4.5.3.0</spotbugs.plugin.version>
		<spotbugs.version>4.5.3</spotbugs.version>
		<junit.version>5.8.2</junit.version>
		<jacoco.plugin.version>0.8.7</jacoco.plugin.version>
		<git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
		<assertj.version>3.22.0</assertj.version>
		<logback.version>1.2.10</logback.version>
		<awaitility.version>4.1.1</awaitility.version>
		<arch.unit.version>0.22.0</arch.unit.version>
		<!-- Disable class data sharing (CDS) to avoid a nasty JVM warning. -->
        <!-- This usually has only a very small impact on performance and memory usage. -->
        <!-- See https://stackoverflow.com/a/57957031 -->
        <!-- See https://kupczynski.info/2018/05/29/jvm-class-data-sharing.html -->
        <custom.jvm.options>-Xshare:off</custom.jvm.options>
	</properties>

	<dependencyManagement>
		<dependencies>
			<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>${guava.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${logback.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-api</artifactId>
				<version>${junit.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine -->
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>${junit.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/com.tngtech.archunit/archunit-junit5 -->
			<dependency>
				<groupId>com.tngtech.archunit</groupId>
				<artifactId>archunit-junit5</artifactId>
				<version>${arch.unit.version}</version>
				<scope>test</scope>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${mockito.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter -->
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-junit-jupiter</artifactId>
				<version>${mockito.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest -->
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest</artifactId>
				<version>${hamcrest.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-core</artifactId>
				<version>${assertj.version}</version>
			</dependency>
			<!-- https://mvnrepository.com/artifact/org.awaitility/awaitility -->
			<dependency>
				<groupId>org.awaitility</groupId>
				<artifactId>awaitility</artifactId>
				<version>${awaitility.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>
		<!-- Required for archunit to be able to log -->
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.tngtech.archunit</groupId>
			<artifactId>archunit-junit5</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-junit-jupiter</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.awaitility</groupId>
			<artifactId>awaitility</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco.plugin.version}</version>
					<executions>
						<execution>
							<id>prepare-unit-tests</id>
							<goals>
								<goal>prepare-agent</goal>
							</goals>
						</execution>
						<execution>
							<id>jacoco-site</id>
							<phase>verify</phase>
							<goals>
								<goal>report</goal>
								<goal>check</goal>
							</goals>
							<configuration>
								<rules>
									<rule>
										<element>CLASS</element>
										<excludes>
											<exclude>*Test</exclude>
										</excludes>
										<limits>
											<limit>
												<counter>LINE</counter>
												<value>COVEREDRATIO</value>
												<minimum>80%</minimum>
											</limit>
										</limits>
									</rule>
								</rules>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>com.github.spotbugs</groupId>
					<artifactId>spotbugs-maven-plugin</artifactId>
					<version>${spotbugs.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>pl.project13.maven</groupId>
					<artifactId>git-commit-id-plugin</artifactId>
					<version>${git-commit-id-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.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven-jar-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>revision</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<verbose>false</verbose>
					<excludeProperties>
						<excludeProperty>git.user.*</excludeProperty>
						<excludeProperty>git.build.user.*</excludeProperty>
						<excludeProperty>git.closest.tag.*</excludeProperty>
						<excludeProperty>git.commit.message.*</excludeProperty>
						<excludeProperty>git.commit.user.*</excludeProperty>
					</excludeProperties>
					<dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
					<generateGitPropertiesFile>true</generateGitPropertiesFile>
					<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<!-- Try to avoid concurrency issues as much as possible. -->
					<!-- This will have a negative impact on memory consumption an build 
						speed. -->
					<reuseForks>false</reuseForks>
					<!-- $argLine is 'injected' by JaCoCo and contains instructions to setup 
						its agent -->
					<argLine>${argLine} ${custom.jvm.options}</argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>
			<!-- For warnings about illegal reflective access see https://issues.apache.org/jira/browse/GROOVY-8339 -->
			<plugin>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
			</plugin>
			<!-- Show active profiles during build -->
			<plugin>
				<artifactId>maven-help-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

</project>
