<?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>de.ontologizer</groupId>
	<artifactId>OntologizerLib</artifactId>
	<version>0.1</version>
	<packaging>pom</packaging>
	<name>OntologizerLib</name>
	<description>Library with data structures for ontologies and I/O for OBO files</description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<junit.version>4.12</junit.version>
	</properties>

	<modules>
		<module>ontologizerlib-core</module>
		<module>ontologizerlib-io</module>
		<module>ontologizerlib-benchmark</module>
	</modules>

	<!-- Inherit artifact from SonaType OSS pom.xml Following this article: 
		http://java.dzone.com/articles/deploy-maven-central -->
	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>9</version>
	</parent>

	<!-- License Information for Maven Central -->
	<licenses>
		<license>
			<name>3-clause BSD</name>
			<url>http://www.opensource.org/licenses/bsd-license.php</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<!-- Developers Information for Maven Central -->
	<developers>
		<developer>
			<name>Manuel Holtgrewe</name>
			<email>Manuel.Holtgrewe@bihealth.de</email>
			<organization>Berlin Institute of Health</organization>
			<organizationUrl>https://www.bihealth.de</organizationUrl>
		</developer>
		<developer>
			<name>Sebastian Bauer</name>
			<email>mail@sebastianbauer.info</email>
		</developer>
	</developers>

	<!-- SCM Information for Maven Central -->
	<scm>
		<connection>scm:git:https://github.com/ontologizer/ontologizerlib.git</connection>
		<developerConnection>scm:git:git@github.com:ontologizer/ontologizerlib.git</developerConnection>
		<url>https://github.com/ontologizer/ontologizerlib</url>
	</scm>

	<dependencies>
		<!-- JUnit testing -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- JUnit testing -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.20</version>
				<configuration>
					<forkCount>3</forkCount>
					<reuseForks>true</reuseForks>
					<argLine>${argLine} -Xms512m -Xmx1024m -Duser.language=en
						-Duser.region=US</argLine>
					<systemPropertyVariables>
						<user.language>en</user.language>
						<user.region>US</user.region>
					</systemPropertyVariables>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>1.4.1</version>
				<executions>
					<execution>
						<id>enforce</id>
						<configuration>
							<rules>
								<DependencyConvergence />
							</rules>
						</configuration>
						<goals>
							<goal>enforce</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Javadoc generation. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.4</version>
				<configuration>
					<defaultVersion>${project.version}</defaultVersion>
					<show>public</show>
					<nohelp>true</nohelp>
					<header>${project.artifactId}, ${project.version}</header>
					<footer>${project.artifactId}, ${project.version}</footer>
					<doctitle>${project.artifactId}, ${project.version}</doctitle>
					<destDir>${project.version}</destDir>
					<reportOutputDirectory>${project.reporting.outputDirectory}/apidocs/api/</reportOutputDirectory>
				</configuration>
				<executions>
					<!--  The aggregation javadoc -->
					<execution>
						<id>aggregate</id>
						<goals>
							<goal>aggregate</goal>
						</goals>
						<phase>site</phase>
						<configuration>
						</configuration>
					</execution>

					<!--  Javadoc of each single project to spot errors in the compile phase -->
					<execution>
						<id>javadoc</id>
						<goals>
							<goal>javadoc</goal>
						</goals>
						<phase>compile</phase>
						<configuration>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Source attachments -->
			<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</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Jacoco Coverage Reports -->
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.7.2.201409121644</version>
				<executions>
					<!-- Prepares the property pointing to the JaCoCo runtime agent which 
						is passed as VM argument when Maven the Surefire plugin is executed. -->
					<execution>
						<id>pre-unit-test</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<!-- Ensures that the code coverage report for unit tests is created 
						after unit tests have been run. -->
					<execution>
						<id>post-unit-test</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Compilation -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.6.1</version>
				<configuration>
					<compilerArgument>-Xlint:all</compilerArgument>
					<showWarnings>true</showWarnings>
					<showDeprecation>true</showDeprecation>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>

			<!-- Set versions into JAR -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
						</manifest>
					</archive>
				</configuration>
			</plugin>
		</plugins>

		<!-- Ignore various plugins in Eclipse/m2e -->
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-enforcer-plugin</artifactId>
										<versionRange>[1.0.0,)</versionRange>
										<goals>
											<goal>enforce</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.jacoco</groupId>
										<artifactId>
											jacoco-maven-plugin
										</artifactId>
										<versionRange>
											[0.7.2.201409121644,)
										</versionRange>
										<goals>
											<goal>prepare-agent</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

</project>
