<?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.java.tools</groupId>
    <artifactId>java-tools-pom</artifactId>
    <version>1.2.1</version>
    <packaging>pom</packaging>

    <name>${project.artifactId}</name>
    <description>Library with some useful tools.</description>
    <url>https://github.com/namics/java-tools</url>
    <licenses>
        <license>
            <name>MIT License 2.0</name>
            <url>https://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <organization>
        <name>Namics AG</name>
        <url>http://www.namics.com</url>
    </organization>

    <developers>
        <developer>
            <id>aschaefer</id>
            <name>Andre Schaefer</name>
            <email>andre.schaefer@namics.com</email>
            <organization>Namics AG</organization>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
        <developer>
            <id>bhelfenberger</id>
            <name>Beat Helfenberger</name>
            <email>beat.helfenberger@namics.com</email>
            <organization>Namics AG</organization>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
        <developer>
            <id>lboesch</id>
            <name>Lorenz Boesch</name>
            <email>lorenz.boesch@namics.com</email>
            <organization>Namics AG</organization>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
        <developer>
            <id>jdato</id>
            <name>Johannes Dato</name>
            <email>johannes.dato@namics.com</email>
            <organization>Namics AG</organization>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>

    <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>
		<main.basedir>${project.basedir}</main.basedir>

        <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>

        <sonar.language>java</sonar.language>
		<jacoco.version>0.8.0</jacoco.version>
    </properties>

    <modules>
        <module>java-tools</module>
        <module>java-tools-test</module>
    </modules>

    <dependencyManagement>
        <dependencies>
			<dependency>
				<groupId>com.namics.oss.java.tools</groupId>
				<artifactId>java-tools</artifactId>
				<version>${project.version}</version>
			</dependency>

			<dependency>
				<groupId>com.namics.oss.java.tools</groupId>
				<artifactId>java-tools-test</artifactId>
				<version>${project.version}</version>
			</dependency>


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

			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>javax.servlet-api</artifactId>
				<version>3.1.0</version>
				<scope>provided</scope>
				<optional>true</optional>
			</dependency>

            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi</artifactId>
                <version>3.15</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml</artifactId>
                <version>3.15</version>
                <optional>true</optional>
            </dependency>

            <!-- CSV -->
            <dependency>
                <groupId>net.sf.supercsv</groupId>
                <artifactId>super-csv</artifactId>
                <version>2.4.0</version>
                <optional>true</optional>
            </dependency>

			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-artifact</artifactId>
				<version>3.3.9</version>
			</dependency>


	        <!-- JUnit -->
			<dependency>
				<groupId>com.namics.oss</groupId>
				<artifactId>java-random</artifactId>
				<version>1.0.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
				<scope>test</scope>
			</dependency>
			<dependency>
	            <groupId>org.easymock</groupId>
	            <artifactId>easymock</artifactId>
	            <version>3.4</version>
	            <scope>test</scope>
			</dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>1.3</version>
                <scope>test</scope>
            </dependency>
			<dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>1.3</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.shazam</groupId>
                <artifactId>shazamcrest</artifactId>
                <version>0.11</version>
                <scope>test</scope>
            </dependency>
			
        </dependencies>
    </dependencyManagement>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>META-INF/java-*.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>META-INF/java-*.properties</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>${project.basedir}</directory>
                <includes>
                    <include>README.md</include>
                </includes>
            </resource>
        </resources>
		<plugins>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
				<configuration>
					<properties>
						<excludeTags>remoteIntegration, manually</excludeTags>
					</properties>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.junit.platform</groupId>
						<artifactId>junit-platform-surefire-provider</artifactId>
						<version>1.0.1</version>
					</dependency>
					<dependency>
						<groupId>org.junit.jupiter</groupId>
						<artifactId>junit-jupiter-engine</artifactId>
						<version>5.0.1</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<version>2.2.1</version>
				<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>
					<compilerArguments>
						<proc:none />
						<parameters/>
					</compilerArguments>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<generateBackupPoms>false</generateBackupPoms>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<resourceEncoding>${project.build.sourceEncoding}</resourceEncoding>
					<failOnMissingWebXml>false</failOnMissingWebXml>
				</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>

    <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:${main.basedir}/docs</url>
		</site>
    </distributionManagement>

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

	<profiles>
		<profile>
			<id>site</id>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>com.coderplus.maven.plugins</groupId>
							<artifactId>copy-rename-maven-plugin</artifactId>
							<version>1.0.1</version>
							<inherited>false</inherited>
						</plugin>
					</plugins>
				</pluginManagement>
				<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>
								<inherited>false</inherited>
								<goals>
									<goal>copy</goal>
								</goals>
								<configuration>
									<sourceFile>${project.basedir}/README.md</sourceFile>
									<destinationFile>${project.basedir}/src/site/markdown/index.md</destinationFile>
									<ignoreFileNotFoundOnIncremental>true</ignoreFileNotFoundOnIncremental>
								</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.1</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>
						<version>3.1.2</version>
						<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>
