<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.bonitasoft.maven</groupId>
	<artifactId>bonita-project-maven-plugin-parent</artifactId>
	<version>0.0.2</version>
    <packaging>pom</packaging>

	<name>Bonita Project Maven Plugin Parent</name>
    <description>Maven plug-in used by Bonita to manage project dependencies.</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>
		<project.scm.id>github</project.scm.id> 

		<java.version>11</java.version>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<jackson.version>2.12.3</jackson.version>

		<!-- Maven plugins -->
		<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
		<jacoco-maven-plugin.version>0.8.7</jacoco-maven-plugin.version>
		<sonar-maven-plugin.version>3.9.0.2155</sonar-maven-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.1</maven-source-plugin.version>
		<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>

		<!-- Test -->
		<junit-jupiter-engine.version>5.7.1</junit-jupiter-engine.version>
		<junit-platform-runner.version>1.7.0</junit-platform-runner.version>
		<maven-invoker-plugin.version>3.2.2</maven-invoker-plugin.version>
		<mockito-junit-jupiter.version>3.11.2</mockito-junit-jupiter.version>
		<assertj-core.version>3.19.0</assertj-core.version>
		<logback-classic.version>1.2.3</logback-classic.version>

		<!-- Sonar -->
		<sonar.projectKey>${sonar.organization}_bonita-project-maven-plugin</sonar.projectKey>
		<sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
		<sonar.organization>bonitasoft</sonar.organization>
		<sonar.host.url>https://sonarcloud.io</sonar.host.url>

		<sonar.coverage.jacoco.xmlReportPaths>
			${project.basedir}/../jacoco-coverage-report/target/site/jacoco-aggregate/jacoco.xml,
			${project.basedir}/jacoco-coverage-report/target/site/jacoco-aggregate/jacoco.xml
		</sonar.coverage.jacoco.xmlReportPaths>
	</properties>

	<modules>
		<module>report-model</module>
		<module>plugin</module>
		<module>jacoco-coverage-report</module>
	</modules>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.junit</groupId>
				<artifactId>junit-bom</artifactId>
				<version>${junit-jupiter-engine.version}</version>
				<type>pom</type>
				<scope>import</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-junit-jupiter</artifactId>
				<version>${mockito-junit-jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${logback-classic.version}</version>
				<scope>test</scope>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<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>
						<includes>
							<include>**/*IT.java</include>
							<include>**/*Test.java</include>
						</includes>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco-maven-plugin.version}</version>
				</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>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-invoker-plugin</artifactId>
					<version>${maven-invoker-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>3.0.0-M1</version>
				</plugin>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
					<configuration>
						<tagNameFormat>@{project.version}</tagNameFormat>
                        <releaseProfiles>release</releaseProfiles>
					</configuration>
				</plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.version}</version>
                </plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>prepare-agent-ut</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonarsource.scanner.maven</groupId>
				<artifactId>sonar-maven-plugin</artifactId>
			</plugin>
            <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>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<properties>
				<maven.javadoc.skip>false</maven.javadoc.skip>
			</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:https://github.com/bonitasoft/bonita-project-maven-plugin.git</developerConnection>
        <connection>scm:git:https://github.com/bonitasoft/bonita-project-maven-plugin.git</connection>
        <url>https://github.com/bonitasoft/bonita-project-maven-plugin</url>
		<tag>0.0.2</tag>
	</scm>
</project>
