<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.bonitasoft.maven</groupId>
	<artifactId>image-overlay-plugin</artifactId>
	<version>1.1.2</version>
	<packaging>maven-plugin</packaging>

	<name>Image Overlay Plugin</name>
	<description>Maven plugin to create text overlays on images.</description>
	<url>https://www.bonitasoft.com</url>

	<developers>
		<developer>
			<id>bonitasoft</id>
			<name>Bonitasoft</name>
			<email>rd.user@bonitasoft.com</email>
			<organization>Bonitasoft</organization>
			<organizationUrl>https://www.bonitasoft.com</organizationUrl>
		</developer>
	</developers>

	<licenses>
		<license>
			<name>GPL-v2.0</name>
			<url>http://www.gnu.org/licenses/gpl-2.0.txt</url>
		</license>
	</licenses>

	<properties>
		<java.version>8</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		
		<maven-plugin-api.version>3.6.3</maven-plugin-api.version>
		<maven-plugin-annotations.version>3.6.0</maven-plugin-annotations.version>

		<!-- Test -->
		<junit-jupiter-engine.version>5.6.2</junit-jupiter-engine.version>
		<junit-platform-runner.version>1.6.2</junit-platform-runner.version>
		<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
		<sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
		<mockito-core.version>3.5.13</mockito-core.version>
		<assertj-core.version>3.16.1</assertj-core.version>

		<!-- Maven -->
		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
		<maven-plugin-plugin.version>3.6.0</maven-plugin-plugin.version>
		<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
		<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
		<maven-source-plugin.version>3.2.0</maven-source-plugin.version>
		<license-maven-plugin.version>4.0.rc2</license-maven-plugin.version>
		<maven-surefire-plugin.version>3.0.0-M4</maven-surefire-plugin.version>

		<!-- Sonar -->
		<sonar.projectKey>bonitasoft_image-overlay-plugin</sonar.projectKey>
		<sonar.organization>bonitasoft</sonar.organization>
		<sonar.host.url>https://sonarcloud.io</sonar.host.url>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>${maven-plugin-api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<version>${maven-plugin-annotations.version}</version>
			<scope>provided</scope>
		</dependency>


		<!-- Test -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>${junit-jupiter-engine.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-params</artifactId>
			<version>${junit-jupiter-engine.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-runner</artifactId>
			<version>${junit-platform-runner.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-junit-jupiter</artifactId>
			<version>${mockito-core.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>${assertj-core.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito-core.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>


	<build>
		<defaultGoal>verify</defaultGoal>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${license-maven-plugin.version}</version>
					<configuration>
						<licenseSets>
							<licenseSet>
								<header>${project.basedir}/src/license/header.txt</header>
								<includes>
									<include>**/*.java</include>
								</includes>
							</licenseSet>
						</licenseSets>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven-surefire-plugin.version}</version>
					<configuration>
						<enableAssertions>true</enableAssertions>
						<forkCount>1</forkCount>
						<reuseForks>true</reuseForks>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>org.junit.platform</groupId>
							<artifactId>junit-platform-runner</artifactId>
							<version>${junit-platform-runner.version}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco-maven-plugin.version}</version>
					<configuration>
						<append>true</append>
					</configuration>
					<executions>
						<execution>
							<id>prepare-agent</id>
							<goals>
								<goal>prepare-agent</goal>
							</goals>
						</execution>
						<execution>
							<id>prepare-agent-integration</id>
							<goals>
								<goal>prepare-agent-integration</goal>
							</goals>
						</execution>
						<execution>
							<id>jacoco-site</id>
							<phase>verify</phase>
							<goals>
								<goal>report</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.sonarsource.scanner.maven</groupId>
					<artifactId>sonar-maven-plugin</artifactId>
					<version>${sonar-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>${nexus-staging-maven-plugin.version}</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>false</autoReleaseAfterClose>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>license-check-file-header</id>
						<goals>
							<goal>check</goal>
						</goals>
						<phase>validate</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>${maven-plugin-plugin.version}</version>
				<executions>
					<execution>
						<id>default-descriptor</id>
						<goals>
							<goal>descriptor</goal>
						</goals>
						<phase>process-classes</phase>
					</execution>
					<execution>
						<id>help-descriptor</id>
						<goals>
							<goal>helpmojo</goal>
						</goals>
						<phase>process-classes</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<additionalOptions>
						<additionalOption>-Xdoclint:none</additionalOption>
					</additionalOptions>
				</configuration>
			</plugin>
		</plugins>
	</build>
	
	<profiles>
		<!-- Deployment profile (required so these plugins are only used when deploying) -->
		<profile>
			<id>deploy</id>
			<properties>
				<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
			</properties>
			<build>
				<plugins>
					<!-- GPG plugin -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<!-- Prevent `gpg` from using pinentry programs -->
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<distributionManagement>
		<!-- Central Repository -->
		<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>

	<scm>
		<developerConnection>scm:git:git@github.com:bonitasoft/image-overlay-plugin.git</developerConnection>
		<connection>scm:git:git@github.com:bonitasoft/image-overlay-plugin.git</connection>
		<url>https://github.com/bonitasoft/image-overlay-plugin</url>
		<tag>HEAD</tag>
	</scm>

</project>