<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.sentrysoftware.maven</groupId>
	<artifactId>metricshub-connector-maven-plugin</artifactId>
	<name>MetricsHub Connector Maven Plugin</name>
	<version>1.0.02</version>
	<description>
		The MetricsHub Connector Maven Plugin is a Maven report plugin that
		helps generate documentation for MetricsHub connectors.
		It is invoked during the Maven site generation process, and it takes the
		source code of the connectors as input.
		The plugin then generates a reference guide that describes the
		connectors in detail.
	</description>

	<packaging>maven-plugin</packaging>

	<organization>
		<name>Sentry Software</name>
		<url>https://sentrysoftware.com</url>
	</organization>

	<url>https://sentrysoftware.github.io/metricshub-connector-maven-plugin</url>
	<inceptionYear>2023</inceptionYear>

	<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>

	<licenses>
		<license>
			<name>Apache-2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/sentrysoftware/metricshub-connector-maven-plugin/issues/</url>
	</issueManagement>

	<scm>
		<connection>scm:git:https://github.com/sentrysoftware/metricshub-connector-maven-plugin.git</connection>
		<url>https://github.com/sentrysoftware/metricshub-connector-maven-plugin</url>
		<tag>v1.0.02</tag>
	</scm>

	<developers>
		<developer>
			<name>Bertrand Martin (@bertysentry)</name>
			<email>bertrand@sentrysoftware.com</email>
			<roles>
				<role>maintainer</role>
			</roles>
		</developer>
		<developer>
			<name>Nassim Boutekedjiret (@NassimBtk)</name>
			<email>nassim@sentrysoftware.com</email>
			<roles>
				<role>maintainer</role>
			</roles>
		</developer>
	</developers>

	<properties>
		<!-- Java 11 -->
		<maven.compiler.release>11</maven.compiler.release>

		<!-- UTF-8 -->
		<project.build.encoding>UTF-8</project.build.encoding>
		<project.build.sourceEncoding>${project.build.encoding}</project.build.sourceEncoding>
		<project.build.resourceEncoding>${project.build.encoding}</project.build.resourceEncoding>

		<!-- Reproducible Build -->
		<!-- See https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
		<project.build.outputTimestamp>2024-05-22T14:01:50Z</project.build.outputTimestamp>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.junit</groupId>
				<artifactId>junit-bom</artifactId>
				<version>5.10.1</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>

		<!-- lombok -->
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.18.30</version>
			<scope>compile</scope>
			<optional>true</optional>
		</dependency>

		<!-- maven-reporting-impl -->
		<dependency>
			<groupId>org.apache.maven.reporting</groupId>
			<artifactId>maven-reporting-impl</artifactId>
			<version>4.0.0-M13</version>
			<exclusions>
				<exclusion>
					<groupId>org.apache.maven</groupId>
					<artifactId>maven-core</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.maven</groupId>
					<artifactId>maven-artifact</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- maven-reporting-api -->
		<dependency>
			<groupId>org.apache.maven.reporting</groupId>
			<artifactId>maven-reporting-api</artifactId>
			<version>4.0.0-M9</version>
		</dependency>

		<!-- maven-plugin-api -->
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>3.9.6</version>
			<scope>provided</scope>
		</dependency>

		<!-- maven-plugin-annotations -->
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<version>3.10.2</version>
			<scope>provided</scope>
		</dependency>

		<!-- maven-project -->
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-project</artifactId>
			<version>3.0-alpha-2</version>
			<scope>provided</scope>
		</dependency>

		<!-- Jackson -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>2.17.0</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-core</artifactId>
			<version>2.17.0</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.dataformat</groupId>
			<artifactId>jackson-dataformat-yaml</artifactId>
			<version>2.17.0</version>
		</dependency>

		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-launcher</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- Junit -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>

		<!-- Common configuration for plugins -->
		<pluginManagement>
			<plugins>

				<!-- javadoc -->
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.6.3</version>
					<configuration>
						<detectJavaApiLink>false</detectJavaApiLink>
						<source>${maven.compiler.target}</source>
						<show>public</show>
						<notimestamp>true</notimestamp>
					</configuration>
				</plugin>

				<!--  maven-invoker-plugin -->
				<plugin>
					<artifactId>maven-invoker-plugin</artifactId>
					<version>3.6.0</version>
				</plugin>

			</plugins>
		</pluginManagement>

		<!-- Actual build plugins -->
		<plugins>

			<!-- compiler -->
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.13.0</version>
			</plugin>

			<!-- source -->
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.3.0</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- resource -->
			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.3.1</version>
			</plugin>

			<!-- license -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>2.3.0</version>
				<configuration>
					<licenseName>apache_v2</licenseName>
					<copyrightOwners>Sentry Software</copyrightOwners>
					<copyrightStringFormat>Copyright %1$s %2$s</copyrightStringFormat>
					<includes>
						<include>main/java/**/*.java</include>
					</includes>
					<trimHeaderLine>true</trimHeaderLine>
					<canUpdateCopyright>true</canUpdateCopyright>
					<canUpdateDescription>true</canUpdateDescription>
					<processStartTag>╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲</processStartTag>
					<sectionDelimiter>჻჻჻჻჻჻</sectionDelimiter>
					<processEndTag>╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱</processEndTag>
				</configuration>
				<executions>
					<execution>
						<id>check-license</id>
						<phase>process-sources</phase>
						<goals>
							<goal>check-file-header</goal>
						</goals>
						<configuration>
							<failOnMissingHeader>true</failOnMissingHeader>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- javadoc -->
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- surefire -->
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.2.3</version>
			</plugin>

			<!-- site -->
			<plugin>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.12.1</version>
				<dependencies>
					<dependency>
						<groupId>org.sentrysoftware.maven</groupId>
						<artifactId>maven-skin-tools</artifactId>
						<version>1.3.00</version>
					</dependency>
				</dependencies>
			</plugin>

			<!-- jar -->
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.3.0</version>
			</plugin>

			<!-- deploy -->
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>3.1.1</version>
			</plugin>

			<!-- maven-plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>3.10.2</version>
				<configuration>
					<goalPrefix>metricshub-connector</goalPrefix>
					<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
				</configuration>
				<executions>
					<execution>
						<id>mojo-descriptor</id>
						<goals>
							<goal>descriptor</goal>
						</goals>
					</execution>
					<execution>
						<id>help-goal</id>
						<goals>
							<goal>helpmojo</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Prettier -->
			<plugin>
				<groupId>com.hubspot.maven.plugins</groupId>
				<artifactId>prettier-maven-plugin</artifactId>
				<version>0.21</version>
				<configuration>
					<prettierJavaVersion>2.5.0</prettierJavaVersion>
					<ignoreConfigFile>false</ignoreConfigFile>
					<ignoreEditorConfig>false</ignoreEditorConfig>
					<inputGlobs>
						<inputGlob>src/main/java/**/*.java</inputGlob>
						<inputGlob>src/test/java/**/*.java</inputGlob>
					</inputGlobs>
				</configuration>
			</plugin>

			<!--  maven-invoker-plugin -->
			<plugin>
				<artifactId>maven-invoker-plugin</artifactId>
				<configuration>
					<debug>true</debug>
					<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
					<pomIncludes>
						<pomInclude>**/pom.xml</pomInclude>
					</pomIncludes>
					<postBuildHookScript>verify</postBuildHookScript>
					<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
					<settingsFile>src/it/settings.xml</settingsFile>
					<goals>
						<goal>clean</goal>
						<goal>site</goal>
					</goals>
				</configuration>
				<executions>
					<execution>
						<id>integration-test</id>
						<goals>
							<goal>install</goal>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>

			<!-- jxr: creates XRef links -->
			<plugin>
				<artifactId>maven-jxr-plugin</artifactId>
				<version>3.3.2</version>
			</plugin>

			<!-- checkstyle -->
			<plugin>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>3.3.1</version>
				<configuration>
					<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
					<linkXref>true</linkXref>
					<configLocation>checkstyle.xml</configLocation>
					<sourceDirectories>
						<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
						<sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory> 
					</sourceDirectories>
				</configuration>
			</plugin>

			<!-- pmd -->
			<plugin>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>3.21.2</version>
				<configuration>
					<linkXref>true</linkXref>
					<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
					<minimumTokens>50</minimumTokens>
					<targetJdk>${maven.compiler.target}</targetJdk>
					<rulesets>
						<ruleset>pmd.xml</ruleset>
					</rulesets>
					<excludeRoots>
						<excludeRoot>${project.build.directory}/generated-sources/plugin</excludeRoot>
					</excludeRoots>
				</configuration>
			</plugin>

			<!-- spotbugs -->
			<plugin>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-maven-plugin</artifactId>
				<version>4.8.2.0</version>
			</plugin>

			<!-- changelog -->
			<plugin>
				<artifactId>maven-changelog-plugin</artifactId>
				<version>2.3</version>
			</plugin>

			<!-- surefire -->
			<plugin>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>3.2.3</version>
			</plugin>

			<!-- javadoc -->
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports>
							<report>javadoc</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<!-- Default project-info-reports -->
			<plugin>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>3.5.0</version>
				<reportSets>
					<reportSet>
						<reports>
							<report>ci-management</report>
							<report>dependencies</report>
							<report>dependency-info</report>
							<report>distribution-management</report>
							<report>issue-management</report>
							<report>licenses</report>
							<report>plugins</report>
							<report>scm</report>
							<report>summary</report>
							<report>team</report>
						</reports>
					</reportSet>
				</reportSets>
			</plugin>

			<!--  maven-invoker-plugin -->
			<plugin>
				<artifactId>maven-invoker-plugin</artifactId>
			</plugin>
		</plugins>
	</reporting>

	<profiles>

		<!-- Profile for releasing the project -->
		<profile>
			<id>release</id>
			<build>
				<plugins>

					<!-- artifact (Reproducible Build) -->
					<plugin>
						<artifactId>maven-artifact-plugin</artifactId>
						<version>3.5.0</version>
						<executions>
							<execution>
								<id>buildinfo</id>
								<phase>verify</phase>
								<goals>
									<goal>buildinfo</goal>
								</goals>
								<configuration>
									<reproducible>true</reproducible>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- gpg to sign the released artifacts -->
					<plugin>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.1.0</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<updateReleaseInfo>true</updateReleaseInfo>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- nexus-staging (Sonatype) -->
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.13</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
							<autoReleaseAfterClose>${env.AUTO_RELEASE_AFTER_CLOSE}</autoReleaseAfterClose>
						</configuration>
					</plugin>

					<!-- release -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
						<version>3.0.1</version>
						<configuration>
							<tagNameFormat>v@{project.version}</tagNameFormat>
						</configuration>
						<executions>
							<execution>
								<id>default</id>
								<goals>
									<goal>perform</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>