<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>
		<!-- Import dependency management from Spring Boot -->
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-dependencies</artifactId>
		<version>2.6.7</version>
		<!-- http://stackoverflow.com/questions/6003831/parent-relativepath-points-at-my-com-mycompanymyproject-instead-of-org-apache -->
		<relativePath />
	</parent>

	<groupId>io.github.solven-eu.pepper</groupId>
	<artifactId>pepper-metadata</artifactId>
	<version>4.1</version>

    <packaging>pom</packaging>
    
	<developers>
		<developer>
			<id>blacelle</id>
			<name>Benoit Lacelle</name>
			<email>benoit.lacelle at gmail.com</email>
			<roles>
				<role>Project lead</role>
			</roles>
		</developer>
	</developers>

	<properties>
		<!-- set encoding to something not platform dependent -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<compiler.targetVersion>1.8</compiler.targetVersion>

		<scm.developerConnection>scm:git:ssh://git@github.com/cormoran-io/pepper-core.git</scm.developerConnection>
		<scm.connection>scm:git:ssh://github.com/cormoran-io/pepper-core.git</scm.connection>
		<scm.url>https://github.com/cormoran-io/pepper-core</scm.url>
	</properties>

	<profiles>
		<profile>
			<!-- http://central.sonatype.org/pages/apache-maven.html#deploying-to-ossrh-with-apache-maven-introduction -->
			<id>Sonatype</id>

			<!--Requires in settings.xml: <settings> <servers> <server> <id>ossrh</id> <username>your-jira-id</username> <password>your-jira-pwd</password> </server> </servers> 
				</settings> -->
			<distributionManagement>
				<snapshotRepository>
					<id>ossrh</id>
					<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
				<repository>
					<id>ossrh</id>
					<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>

			<build>
				<plugins>
					<!-- http://central.sonatype.org/pages/working-with-pgp-signatures.html -->
					<!-- http://stackoverflow.com/questions/14114528/avoid-gpg-signing-prompt-when-using-maven-release-plugin -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<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-javadoc-plugin</artifactId>
						<version>3.3.2</version>
						<configuration>
							<!-- http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html -->
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<!-- https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin -->
					<!-- http://www.sonatype.org/nexus/2014/10/08/distribute-project-artifacts-in-maven-central-with-nexus-oss/ -->
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
						<!-- https://issues.sonatype.org/browse/NEXUS-31214 -->
						<!-- 1.6.10 is broken (and 1.6.9 looks ill anyway) -->
						<version>1.6.13</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>jdk9</id>
			<activation>
				<jdk>9</jdk>
			</activation>
			<properties>
				<plexus-archiver.version>4.2.1</plexus-archiver.version>
			</properties>
			<dependencyManagement>
				<dependencies>
					<dependency>
						<groupId>org.codehaus.plexus</groupId>
						<artifactId>plexus-archiver</artifactId>
						<version>${plexus-archiver.version}</version>
					</dependency>
				</dependencies>
			</dependencyManagement>
			<build>
				<pluginManagement>
					<!-- https://stackoverflow.com/questions/36583118/is-maven-ready-for-jdk9 -->
					<plugins>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-assembly-plugin</artifactId>
							<version>3.3.0</version>
							<dependencies>
								<dependency>
									<groupId>org.codehaus.plexus</groupId>
									<artifactId>plexus-archiver</artifactId>
									<version>${plexus-archiver.version}</version>
								</dependency>
							</dependencies>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-jar-plugin</artifactId>
							<version>3.2.2</version>
							<dependencies>
								<dependency>
									<groupId>org.codehaus.plexus</groupId>
									<artifactId>plexus-archiver</artifactId>
									<version>${plexus-archiver.version}</version>
								</dependency>
							</dependencies>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-source-plugin</artifactId>
							<version>3.2.1</version>
							<dependencies>
								<dependency>
									<groupId>org.codehaus.plexus</groupId>
									<artifactId>plexus-archiver</artifactId>
									<version>${plexus-archiver.version}</version>
								</dependency>
							</dependencies>
						</plugin>
						<plugin>
							<!-- https://github.com/trautonen/coveralls-maven-plugin -->
							<groupId>org.eluder.coveralls</groupId>
							<artifactId>coveralls-maven-plugin</artifactId>
							<version>4.3.0</version>
							<dependencies>
								<!-- We need to ensure the plugin is functional, even if we want to skip its execution -->
								<dependency>
									<groupId>org.codehaus.plexus</groupId>
									<artifactId>plexus-archiver</artifactId>
									<version>${plexus-archiver.version}</version>
								</dependency>
							</dependencies>
							<configuration>
								<!-- As of 3.1.0, coveralls is not compatible with JDK9 -->
								<!-- https://github.com/trautonen/coveralls-maven-plugin/issues/112 -->
								<skip>true</skip>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>
	</profiles>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<!-- https://github.com/trautonen/coveralls-maven-plugin -->
				<groupId>org.eluder.coveralls</groupId>
				<artifactId>coveralls-maven-plugin</artifactId>
				<version>4.3.0</version>
			</plugin>
		</plugins>
	</build>

	<scm>
		<!-- SCM is in properties as we can't configure it directly in profile -->
		<!-- Do not add developperConnection as parent is not a SNAPSHOT -->
		<connection>${scm.connection}</connection>
		<url>${scm.url}</url>
		<tag>pepper-4.1</tag>
	</scm>
</project>
