<?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>org.bytemechanics</groupId>
	<artifactId>bytemechanics-maven</artifactId>
	<version>2.2.2</version>
	<packaging>pom</packaging>
	<name>ByteMechanics-Maven</name>
	<url>http://www.bytemechanics.org</url>
	<developers>
		<developer>
			<name>Albert Farré Figueras</name>
			<email>afarre@gmail.com</email>
			<url>https://www.linkedin.com/in/albert-farré-figueras-4348aa2</url>
			<roles>
				<role>Developer</role>
				<role>Product owner</role>
			</roles>
			<timezone>GMT+1</timezone>
		</developer>
	</developers>
	<licenses>
		<license>
			<name>Apache License 2.0</name>
			<url>http://opensource.org/licenses/Apache-2.0</url>
		</license>
	</licenses>
	<description>Standalone open source libraries for java commoners</description>
	<organization>
		<name>Byte Mechanics</name>
		<url>http://www.bytemechanics.org</url>
	</organization>
	<scm>
		<connection>https://github.com/bytemechanics/bytemecanics-maven.git</connection>
		<url>https://github.com/bytemechanics/bytemecanics-maven</url>
	</scm>
	
	<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>		
	
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		
		<tests.skip>false</tests.skip>
		
		<!-- test dependencies versions -->
		<version.junit.jupiter>5.5.2</version.junit.jupiter>
		<version.jmockit>1.48</version.jmockit>
		
		<!-- plugin versions -->
		<version.plugin.maven-compiler>3.8.1</version.plugin.maven-compiler>
		<version.plugin.maven-jar>3.1.2</version.plugin.maven-jar>
		<version.plugin.maven-surefire>3.0.0-M5</version.plugin.maven-surefire>
		<version.plugin.jacoco>0.8.7</version.plugin.jacoco>
		<version.plugin.maven-gpg>1.6</version.plugin.maven-gpg>
		<version.plugin.maven-source>3.1.0</version.plugin.maven-source>
		<version.plugin.maven-javadoc>3.1.1</version.plugin.maven-javadoc>
		<version.plugin.nexus-staging>1.6.8</version.plugin.nexus-staging>
		<version.plugin.felix-bundle>4.2.1</version.plugin.felix-bundle>
	</properties>
		
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-api</artifactId>
				<version>${version.junit.jupiter}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-params</artifactId>
				<version>${version.junit.jupiter}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>${version.junit.jupiter}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.jmockit</groupId>
				<artifactId>jmockit</artifactId>
				<version>${version.jmockit}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-params</artifactId>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jmockit</groupId>
			<artifactId>jmockit</artifactId>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>${version.plugin.felix-bundle}</version>
					<executions>
						<execution>
							<id>bundle-manifest</id>
							<phase>process-classes</phase>
							<goals>
								<goal>manifest</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<instructions>
							<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
						</instructions>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${version.plugin.maven-compiler}</version>
					<configuration>
						<showDeprecation>true</showDeprecation>
						<showWarnings>true</showWarnings>
						<compilerArgs>-Xlint:unchecked</compilerArgs>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${version.plugin.maven-jar}</version>
					<executions>
						<execution>
							<goals>
								<goal>test-jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${version.plugin.maven-surefire}</version>
					<configuration>
						<skipTests>${tests.skip}</skipTests>
						<trimStackTrace>false</trimStackTrace>
						<argLine>-javaagent:${settings.localRepository}/org/jmockit/jmockit/${version.jmockit}/jmockit-${version.jmockit}.jar -Dfile.encoding=UTF-8</argLine>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${version.plugin.jacoco}</version>
					<executions>
						<execution>
							<id>prepare-agent</id>
							<goals>
								<goal>prepare-agent</goal>
							</goals>
						</execution>
						<execution>
							<id>report</id>
							<phase>prepare-package</phase>
							<goals>
								<goal>report</goal>
							</goals>
						</execution>
						<execution>
							<id>post-unit-test</id>
							<phase>test</phase>
							<goals>
								<goal>report</goal>
							</goals>
						</execution>
					</executions>
				</plugin>		
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${version.plugin.maven-gpg}</version>
					<configuration>
						<keyname>BBA8B05B</keyname>
					</configuration>
					<executions>
						<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${version.plugin.maven-source}</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<goals>
								<goal>jar-no-fork</goal>
								<goal>test-jar-no-fork</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${version.plugin.maven-javadoc}</version>
					<configuration>
						<excludePackageNames>${javadoc.excluded.packages}</excludePackageNames>
						<outputDirectory>${basedir}/javadoc</outputDirectory>
						<charset>UTF-8</charset>
						<defaultAuthor>afarre</defaultAuthor>
					</configuration>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>${version.plugin.nexus-staging}</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>		
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>
	
	<profiles>
		<profile> 
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
					</plugin>		
				</plugins>
			</build>
		</profile>
		<profile> 
			<id>javadoc</id>
			<properties>
				<tests.skip>true</tests.skip>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
