<?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>com.namics.oss</groupId>
	<artifactId>java-random</artifactId>
	<version>1.1.4</version>

	<name>${project.artifactId}</name>
	<description>This modules aims to provide a universal mechanism to create random test dummies of java objects.</description>
	<url>https://github.com/namics/java-random</url>
	<licenses>
		<license>
			<name>MIT License 2.0</name>
			<url>https://opensource.org/licenses/MIT</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>André Schäfer</name>
			<email>andre.schaefer@anmcis.com</email>
			<organization>Namics AG</organization>
			<organizationUrl>http://www.namics.com</organizationUrl>
		</developer>
	</developers>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
		<site>
			<id>localSite</id>
			<url>file:${project.basedir}/docs</url>
		</site>
	</distributionManagement>

	<scm>
		<url>https://github.com/namics/java-random</url>
		<connection>scm:git:git@github.com:namics/java-random.git</connection>
		<developerConnection>scm:git:git@github.com:namics/java-random.git</developerConnection>
	</scm>

	<properties>
		<java.version>1.8</java.version>
		<java.source.version>${java.version}</java.source.version>
		<java.target.version>${java.version}</java.target.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>

		<maven.build.timestamp.format>yyyy-MM-dd-z-HH-mm-ss</maven.build.timestamp.format>

		<encoding>UTF-8</encoding>
		<project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>

		<git.build.time>${maven.build.timestamp}</git.build.time>
		<git.branch>unknown</git.branch>
		<git.commit.id>unknown</git.commit.id>
		<git.commit.time>unknown</git.commit.time>

		<jacoco.version>0.8.0</jacoco.version>
	</properties>


	<dependencies>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.25</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>1.7.25</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
			<version>2.3</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.6</version>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.6</version>
		</dependency>
		<dependency>
			<groupId>org.reflections</groupId>
			<artifactId>reflections</artifactId>
			<version>0.9.10</version>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>24.0-jre</version>
		</dependency>
		<dependency>
			<groupId>com.googlecode.gentyref</groupId>
			<artifactId>gentyref</artifactId>
			<version>1.2.0</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-core</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-library</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>META-INF/namics-random.properties</include>
				</includes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>false</filtering>
				<excludes>
					<exclude>META-INF/namics-random.properties</exclude>
				</excludes>
			</resource>
			<resource>
				<directory>${project.basedir}</directory>
				<includes>
					<include>README.md</include>
				</includes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>revision</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<prefix>git</prefix>
					<dateFormat>${maven.build.timestamp.format}</dateFormat>
					<verbose>false</verbose>
					<skipPoms>true</skipPoms>
					<generateGitPropertiesFile>false</generateGitPropertiesFile>
					<failOnNoGitDirectory>false</failOnNoGitDirectory>
					<skip>false</skip>
					<gitDescribe>
						<skip>false</skip>
						<always>false</always>
						<abbrev>7</abbrev>
						<dirty>-dirty</dirty>
						<forceLongFormat>true</forceLongFormat>
					</gitDescribe>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
						<manifestEntries>
							<Build-Timestamp>${git.build.time}</Build-Timestamp>
							<Build-SCM-Branch>${git.branch}</Build-SCM-Branch>
							<Build-SCM-Commit>${git.commit.id}</Build-SCM-Commit>
							<Build-SCM-Commit-Time>${git.commit.time}</Build-SCM-Commit-Time>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.6.0</version>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
					<source>${java.source.version}</source>
					<target>${java.source.version}</target>
					<compilerArgument>-proc:none</compilerArgument>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<generateBackupPoms>false</generateBackupPoms>
				</configuration>
			</plugin>


		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.0.0</version>
					<configuration>
						<failOnError>false</failOnError>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>
				<plugin>
					<groupId>pl.project13.maven</groupId>
					<artifactId>git-commit-id-plugin</artifactId>
					<version>2.2.1</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>



	<profiles>
		<profile>
			<id>site</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-pmd-plugin</artifactId>
						<version>3.9.0</version>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>findbugs-maven-plugin</artifactId>
						<version>3.0.5</version>
					</plugin>
					<plugin>
						<groupId>com.coderplus.maven.plugins</groupId>
						<artifactId>copy-rename-maven-plugin</artifactId>
						<version>1.0.1</version>
						<executions>
							<execution>
								<id>copy-readme-for-site</id>
								<phase>pre-site</phase>
								<goals>
									<goal>copy</goal>
								</goals>
								<configuration>
									<sourceFile>${project.basedir}/README.md</sourceFile>
									<destinationFile>${project.basedir}/src/site/markdown/index.md</destinationFile>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>${jacoco.version}</version>
						<executions>
							<execution>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>report</id>
								<phase>prepare-package</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-site-plugin</artifactId>
						<version>3.7</version>
						<executions>
							<execution>
								<id>attach-descriptor</id>
								<goals>
									<goal>attach-descriptor</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>pl.project13.maven</groupId>
						<artifactId>git-commit-id-plugin</artifactId>
					</plugin>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
			<reporting>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-project-info-reports-plugin</artifactId>
						<version>2.9</version>
						<configuration>
							<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
						</configuration>
					</plugin>
					<!--<plugin>-->
						<!--<groupId>org.owasp</groupId>-->
						<!--<artifactId>dependency-check-maven</artifactId>-->
						<!--<configuration>-->
							<!--<goal>check</goal>-->
						<!--</configuration>-->
						<!--<reportSets>-->
							<!--<reportSet>-->
								<!--<id>aggregate</id>-->
								<!--<inherited>false</inherited>-->
								<!--<reports>-->
									<!--<report>aggregate</report>-->
								<!--</reports>-->
							<!--</reportSet>-->
						<!--</reportSets>-->
					<!--</plugin>-->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jxr-plugin</artifactId>
						<version>2.5</version>
						<reportSets>
							<reportSet>
								<id>aggregate</id>
								<inherited>false</inherited>
								<reports>
									<report>aggregate</report>
								</reports>
							</reportSet>
						</reportSets>
					</plugin>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>${jacoco.version}</version>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>versions-maven-plugin</artifactId>
						<reportSets>
							<reportSet>
								<reports>
									<report>dependency-updates-report</report>
									<report>plugin-updates-report</report>
								</reports>
							</reportSet>
						</reportSets>
					</plugin>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<reportSets>
							<reportSet>
								<id>non-aggregate</id>
								<reports>
									<report>javadoc</report>
								</reports>
							</reportSet>
							<reportSet>
								<id>aggregate</id>
								<reports>
									<report>aggregate</report>
								</reports>
							</reportSet>
						</reportSets>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-report-plugin</artifactId>
						<configuration>
							<aggregate>true</aggregate>
							<outputName>Test Report</outputName>
						</configuration>
					</plugin>
				</plugins>
			</reporting>
		</profile>

		
		<profile>
			<id>ossrh</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.0.1</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-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.8</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
						<executions>
							<execution>
								<id>deploy-to-sonatype</id>
								<phase>deploy</phase>
								<goals>
									<goal>deploy</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
