<?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>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.1.6.RELEASE</version>
		<relativePath /> <!-- lookup parent from repository -->
	</parent>
	<groupId>uk.ac.ebi.ddi</groupId>
	<artifactId>springboot-base-master</artifactId>
	<version>1.0</version>
	<packaging>pom</packaging>

	<name>DDI master pom file</name>
	<description>Parent pom DDI project</description>

	<developers>
		<developer>
			<id>ypriverol</id>
			<name>Yasset Perez-Riverol</name>
			<email>yperez@ebi.ac.uk</email>
			<roles>
				<role>Author</role>
			</roles>
			<organization>http://www.ebi.ac.uk/ddi</organization>
		</developer>
		<developer>
			<id>tvu</id>
			<name>Manh Tu VU</name>
			<email>tvu@ebi.ac.uk</email>
			<roles>
				<role>Author</role>
			</roles>
			<organization>http://www.ebi.ac.uk/ddi</organization>
		</developer>
		<developer>
			<id>gdass</id>
			<name>Gaurhari Dass</name>
			<email>gdass@ebi.ac.uk</email>
			<roles>
				<role>Author</role>
			</roles>
			<organization>http://www.ebi.ac.uk/ddi</organization>
		</developer>
	</developers>

	<url>https://github.com/OmicsDI/springboot-base-master.git</url>

	<properties>
		<java.version>1.8</java.version>
		<maven.jar.plugin>2.3.2</maven.jar.plugin>
		<maven.compiler.plugin>2.5.1</maven.compiler.plugin>
		<maven.source.plugin>2.1.2</maven.source.plugin>
		<maven.javadoc.plugin>2.8.1</maven.javadoc.plugin>
		<maven.war.plugin>2.1.1</maven.war.plugin>
		<maven.surefire.plugin>2.12</maven.surefire.plugin>
	</properties>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:github.com/OmicsDI/springboot-base-master.git</connection>
		<developerConnection>scm:git:git@github.com:OmicsDI/springboot-base-master.git</developerConnection>
		<url>https://github.com/OmicsDI/springboot-base-master.git</url>
		<tag>springboot-base-master-1.0</tag>
	</scm>

	<profiles>
		<!-- The Configuration of the development profile -->
		<profile>
			<id>dev</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<skip.integration.tests>true</skip.integration.tests>
				<skip.unit.tests>false</skip.unit.tests>
			</properties>
		</profile>
		<!-- The Configuration of the integration-test profile -->
		<profile>
			<id>integration-test</id>
			<properties>
				<!--
                    Only integration tests are run when the integration-test profile is active
                -->
				<skip.integration.tests>false</skip.integration.tests>
				<skip.unit.tests>true</skip.unit.tests>
			</properties>
		</profile>
		<!-- GPG Signature on release -->
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
		</profile>

		<profile>
			<id>disable-java8-doclint</id>
			<activation>
				<jdk>[1.8,)</jdk>
			</activation>
			<properties>
				<additionalparam>-Xdoclint:none</additionalparam>
			</properties>
		</profile>
	</profiles>

	<build>

		<resources>
			<!--
                Placeholders that are found from the files located in the configured resource
                directories are replaced with the property values found from the profile
                specific configuration file.
            -->
			<resource>
				<filtering>true</filtering>
				<directory>src/main/resources</directory>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.9.1</version>
				<executions>
					<!-- Add a new source directory to our build -->
					<execution>
						<id>add-integration-test-sources</id>
						<phase>generate-test-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<!-- Configures the source directory of our integration tests -->
							<sources>
								<source>src/integration-test/java</source>
							</sources>
						</configuration>
					</execution>
					<!-- Add a new resource directory to our build -->
					<execution>
						<id>add-integration-test-resources</id>
						<phase>generate-test-resources</phase>
						<goals>
							<goal>add-test-resource</goal>
						</goals>
						<configuration>
							<!-- Configures the resource directory of our integration tests -->
							<resources>
								<!--
                                    Placeholders that are found from the files located in the configured resource
                                    directories are replaced with the property values found from the profile
                                    specific configuration file.
                                -->
								<resource>
									<filtering>true</filtering>
									<directory>src/integration-test/resources</directory>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- Runs unit tests -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>

				<version>2.20.1</version>
				<configuration>
					<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
					<!-- Skips unit tests if the value of skip.unit.tests property is true -->
					<skipTests>${skip.unit.tests}</skipTests>
					<!-- Excludes integration tests when unit tests are run -->
					<excludes>
						<exclude>**/IT*.java</exclude>
					</excludes>
				</configuration>
			</plugin>
			<!-- Runs integration tests -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>3.0.0-M3</version>
				<configuration>
					<!--
                        Skips integration tests if the value of skip.integration.tests
                        property is true
                    -->
					<skipITs>${skip.integration.tests}</skipITs>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-versions</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>${java.version}</version>
								</requireJavaVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>

			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.8.2</version>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<localCheckout>true</localCheckout>
					<pushChanges>false</pushChanges>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<arguments>-Dgpg.passphrase=${gpg.phrase}</arguments>
					<checkModificationExcludes>
						<checkModificationExclude>pom.xml</checkModificationExclude>
					</checkModificationExcludes>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-provider-gitexe</artifactId>
						<version>1.9.5</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</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>
		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven.jar.plugin}</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven.compiler.plugin}</version>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven.source.plugin}</version>
					<executions>
						<execution>
							<id>attach-source</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven.javadoc.plugin}</version>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
				</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>
	</distributionManagement>

</project>
