<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.reactome.release</groupId>
	<artifactId>release-common-lib</artifactId>
	<version>2.0.0</version>
	<packaging>jar</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>Common components used throughout the Release process</description>
	<url>https://github.com/reactome/release-common-lib</url>
	<organization>
		<name>Reactome</name>
		<url>https://reactome.org</url>
	</organization>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Solomon Shorser</name>
			<organization>Ontario Institute for Cancer Research</organization>
			<organizationUrl>https://oicr.on.ca</organizationUrl>
			<roles>
				<role>Alumni</role>
			</roles>
		</developer>

		<developer>
			<name>Joel Weiser</name>
			<email>joel.weiser@oicr.on.ca</email>
			<organization>Ontario Institute for Cancer Research</organization>
			<organizationUrl>https://oicr.on.ca</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git://github.com/reactome/release-common-lib.git</connection>
		<developerConnection>scm:git:ssh://github.com/reactome/release-common-lib.git</developerConnection>
		<url>https://github.com/reactome/release-common-lib</url>
		<tag>develop</tag>
	</scm>
	<!-- defines repositories that releases and snapshots are deployed -->
	<distributionManagement>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<properties>
		<!-- dependencies -->
		<commons.lang.version>2.5</commons.lang.version>
		<commons.net.version>3.8.0</commons.net.version>
		<hamcrest.version>2.2</hamcrest.version>
		<httpclient.version>4.5.13</httpclient.version>
		<log4j.version>2.17.0</log4j.version>
		<json.simple.version>1.1.1</json.simple.version>
		<junit.version>5.8.2</junit.version>
		<junit.platform.version>1.8.2</junit.platform.version>
		<mockito.version>3.12.4</mockito.version>
		<reactome.base.core.version>1.0.1</reactome.base.core.version>

		<!-- build -->
		<jdk.version>11</jdk.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- maven build and plugins -->
		<maven.compiler.version>3.8.1</maven.compiler.version>
		<maven.gpg.version>3.0.1</maven.gpg.version>
		<maven.javadoc.version>3.11.2</maven.javadoc.version>
		<maven.release.version>2.5.3</maven.release.version>
		<maven.source.version>3.2.1</maven.source.version>
		<maven.surefire.version>2.22.2</maven.surefire.version>
		<maven.tidy.version>1.3.0</maven.tidy.version>
		<nexus-staging-maven-plugin>1.6.8</nexus-staging-maven-plugin>
	</properties>

	<dependencies>
		<!-- Main dependencies -->
		<dependency>
			<groupId>org.reactome.base</groupId>
			<artifactId>reactome-base-core</artifactId>
			<version>${reactome.base.core.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>${log4j.version}</version>
		</dependency>

		<dependency>
			<groupId>com.googlecode.json-simple</groupId>
			<artifactId>json-simple</artifactId>
			<version>${json.simple.version}</version>
		</dependency>

		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>${commons.lang.version}</version>
		</dependency>

		<dependency>
			<groupId>commons-net</groupId>
			<artifactId>commons-net</artifactId>
			<version>${commons.net.version}</version>
		</dependency>

		<!-- Test dependencies -->
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest</artifactId>
			<version>${hamcrest.version}</version>
			<scope>test</scope>
		</dependency>

		<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>org.junit.platform</groupId>
			<artifactId>junit-platform-launcher</artifactId>
			<version>${junit.platform.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-runner</artifactId>
			<version>${junit.platform.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-inline</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-junit-jupiter</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<repositories>
		<!-- Sonatype repository from which to obtain SNAPSHOT dependencies created by Reactome (or others sources) -->
		<repository>
			<id>oss.sonatype.org-snapshot</id>
			<url>http://oss.sonatype.org/content/repositories/snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<build>
		<plugins>
			<!-- sets the Java compiler version targeted by Maven -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven.compiler.version}</version>
				<configuration>
					<source>${jdk.version}</source>
					<target>${jdk.version}</target>
				</configuration>
			</plugin>

			<!-- creates jar file containing JavaDocs for the project-->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven.javadoc.version}</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<source>11</source>
					<additionalOptions>-Xdoclint:none</additionalOptions>

					<links>
						<link>https://docs.oracle.com/en/java/javase/11/docs/api/</link>
					</links>
				</configuration>
			</plugin>

			<!-- creates jar file containing source (*.java) files for the project-->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven.source.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- signs the artifacts (i.e. POM file, JavaDoc, Source, and Class jars) with GPG program -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>${maven.gpg.version}</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
						<configuration>
							<keyname>${gpg.key}</keyname>
							<passphraseServerId>${gpg.key}</passphraseServerId>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- allows 'mvn deploy' command to stage a release to Sonatype -->
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>${nexus-staging-maven-plugin}</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>false</autoReleaseAfterClose>
				</configuration>
			</plugin>

			<!-- executes unit tests -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven.surefire.version}</version>
			</plugin>

			<!-- executes IT tests -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.15</version>
				<executions>
					<execution>
						<id>integration-test</id>
						<goals>
							<goal>integration-test</goal>
						</goals>
					</execution>
					<execution>
						<id>verify</id>
						<goals>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- allows 'mvn release' command to create a new release of the project https://maven.apache.org/maven-release/maven-release-plugin/ -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${maven.release.version}</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
					<tagNameFormat>v@{project.version}</tagNameFormat>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>tidy-maven-plugin</artifactId>
				<version>${maven.tidy.version}</version>
				<executions>
					<execution>
						<id>validate</id>
						<phase>validate</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
