<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.github.skjolber.3d-bin-container-packing</groupId>
	<artifactId>parent</artifactId>
	<version>1.2.6</version>
	<packaging>pom</packaging>
	<name>3D Bin Container Packing</name>
	<description>Library for 3D rectangular bin packing</description>
	<url>https://github.com/skjolber/3d-bin-container-packing</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.version>1.8</java.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		
		<mockito.version>3.0.0</mockito.version>
		<ascii-renderer.version>2.1.0</ascii-renderer.version>

		<google-truth.version>1.0</google-truth.version>
		<junit.version>5.5.1</junit.version>
        <jmh.version>1.21</jmh.version>
		
		<!-- plugins -->
		<build-helper-maven-plugin.version>1.9.1</build-helper-maven-plugin.version>
		<jacoco-maven-plugin.version>0.8.1</jacoco-maven-plugin.version>
		<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
		<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
		<maven-source-plugin.version>3.1.0</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<maven-dependency-plugin.version>2.10</maven-dependency-plugin.version>
		<jacoco-maven-plugin.version>0.7.8</jacoco-maven-plugin.version>
		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
		<maven-shade-plugin.version>3.1.1</maven-shade-plugin.version>
		<maven-war-plugin.version>3.2.2</maven-war-plugin.version>
		<jqwik.version>1.1.6</jqwik.version>
		<assertj.version>3.12.2</assertj.version>
		<owasp-dependency-check.version>5.2.0</owasp-dependency-check.version>
		<pitest.version>1.4.9</pitest.version>
	</properties>
	
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git@github.com:skjolber/3d-bin-container-packing.git</connection>
		<developerConnection>scm:git:git@github.com:skjolber/3d-bin-container-packing.git</developerConnection>
 		<url>git@github.com:skjolber/3d-bin-container-packing.git</url>
		<tag>parent-1.2.6</tag>
	</scm>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/skjolber/3d-bin-container-packing/issues</url>
	</issueManagement>

	<ciManagement>
		<system>Travis CI</system>
		<url>https://travis-ci.org/skjolber/3d-bin-container-packing</url>
	</ciManagement>

	<developers>
		<developer>
			<name>Thomas Skjølberg</name>
			<email>thomas.skjolberg@gmail.com</email>
		</developer>
	</developers>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.github.skjolber.3d-bin-container-packing</groupId>
				<artifactId>core</artifactId>
				<version>${project.version}</version>
			</dependency>
			<!-- test -->
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-api</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>${junit.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>com.indvd00m.ascii.render</groupId>
				<artifactId>ascii-render</artifactId>
				<version>${ascii-renderer.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>com.google.truth</groupId>
				<artifactId>truth</artifactId>
				<version>${google-truth.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>com.google.truth.extensions</groupId>
				<artifactId>truth-java8-extension</artifactId>
				<version>${google-truth.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${mockito.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>net.jqwik</groupId>
				<artifactId>jqwik</artifactId>
				<version>${jqwik.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-core</artifactId>
				<version>${assertj.version}</version>
				<scope>test</scope>
			</dependency>
            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-core</artifactId>
                <version>${jmh.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-generator-annprocess</artifactId>
                <version>${jmh.version}</version>
            </dependency>
		</dependencies>
	</dependencyManagement>
    <modules>
		<module>core</module>
    </modules>
	<build>
		<defaultGoal>clean test</defaultGoal>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<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>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>false</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>
				<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>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.pitest</groupId>
				<artifactId>pitest-maven</artifactId>
				<version>${pitest.version}</version>
			</plugin>
			<plugin>
				<groupId>org.owasp</groupId>
				<artifactId>dependency-check-maven</artifactId>
				<version>${owasp-dependency-check.version}</version>
				<configuration>
					<failBuildOnCVSS>7</failBuildOnCVSS>
					<failOnError>false</failOnError>
					<!-- suppressionFiles: see https://jeremylong.github.io/DependencyCheck/general/suppression.html -->
				</configuration>
				<executions>
					<execution>
						<!-- run only using explicit command -->
						<phase>none</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.4</version>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.2.1</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                            <configuration>
                                <finalName>benchmark</finalName>
                                <transformers>
                                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                        <mainClass>org.openjdk.jmh.Main</mainClass>
                                    </transformer>
                                </transformers>
                                <filters>
                                    <filter>
                                        <!--
                                            Shading signed JARs will fail without this.
                                            http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
                                        -->
                                        <artifact>*:*</artifact>
                                        <excludes>
                                            <exclude>META-INF/*.SF</exclude>
                                            <exclude>META-INF/*.DSA</exclude>
                                            <exclude>META-INF/*.RSA</exclude>
                                        </excludes>
                                    </filter>
                                </filters>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
		</plugins>
	</build>

	<profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>jmh</module>
            </modules>
        </profile>

		<profile>
			<!-- mvn -P release release:perform -->
			<id>release</id>
			<properties>
				<!-- this is useful when the desired key is not the default (first) export 
					GPG_KEY_NAME=ABCDEF01 -->
				<gpg.executable>gpg</gpg.executable>
				<gpg.keyname>${env.GPG_KEY_NAME}</gpg.keyname>
			</properties>
			<build>
				<plugins>
					<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>
				</plugins>
			</build>
		</profile>
	</profiles>

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

	<repositories>
		<repository>
			<id>mavenCentral</id>
			<url>https://repo1.maven.org/maven2</url>
		</repository>
		<repository>
			<id>indvd00m-github-repo</id>
			<url>https://github.com/indvd00m/maven-repo/raw/master/repository</url>
		</repository>
	</repositories>
</project>
