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

	<parent>
		<groupId>org.sentrysoftware</groupId>
		<artifactId>oss-parent</artifactId>
		<version>5</version>
	</parent>

	<groupId>org.sentrysoftware.maven</groupId>
	<artifactId>sentry-maven-skin</artifactId>
	<version>8.0.00</version>

	<name>Sentry Maven Skin</name>
	<description>
		The Sentry Maven Skin is a Maven skin for Maven-generated sites.
		It is based on the excellent Maven Reflow Skin developed by Andrius Velykis (http://andriusvelykis.github.io/reflow-maven-skin/).
		However, because Reflow is no longer maintained, we had to fork the projet and go with our own!
	</description>
	<inceptionYear>2017</inceptionYear>
	<url>https://sentrysoftware.org/sentry-maven-skin</url>

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

	<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/sentry-maven-skin/issues/</url>
	</issueManagement>

	<scm>
		<connection>scm:git:https://github.com/sentrysoftware/sentry-maven-skin.git</connection>
		<url>https://github.com/sentrysoftware/sentry-maven-skin</url>
		<tag>v8.0.00</tag>
	</scm>

	<developers>
		<developer>
			<name>Bertrand Martin (@bertysentry)</name>
			<email>bertrand@sentrysoftware.com</email>
			<roles>
				<role>Project founder</role>
			</roles>
		</developer>
	</developers>

	<properties>
		<maven.compiler.release>8</maven.compiler.release>

		<!-- UTF-8 -->
		<project.reporting.outputEncoding>${project.build.encoding}</project.reporting.outputEncoding>

		<!-- maven-skin-tools version (used in docs and integration tests) -->
		<skinToolsVersion>1.7.00</skinToolsVersion>

		<!-- Reproducible Build -->
		<!-- See https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
		<project.build.outputTimestamp>2026-03-04T17:38:27Z</project.build.outputTimestamp>

		<!-- How to execute the Node.js section -->
		<!-- On GitHub Actions, we will use the exec-maven-plugin -->
		<!-- On local dev PC, we will use the frontend-maven-plugin -->
		<skipFrontendPlugin>false</skipFrontendPlugin>
		<skipExecPlugin>true</skipExecPlugin>
		<npmCiCommand>ci</npmCiCommand>
		<npmCiAuditFlag>--no-audit</npmCiAuditFlag>
		<npmCiFundFlag>--no-fund</npmCiFundFlag>
		<npmCiLoglevelFlag>--loglevel=error</npmCiLoglevelFlag>

		<!-- Disable code analysis plugins (not useful for this project) -->
		<checkstyle.skip>true</checkstyle.skip>
		<pmd.skip>true</pmd.skip>
		<cpd.skip>true</cpd.skip>
		<spotbugs.skip>true</spotbugs.skip>

	</properties>

	<build>

		<sourceDirectory>${project.basedir}/src/main/webapp</sourceDirectory>

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

			<!-- site -->
			<!-- Sentry Maven Skin requires maven-skin-tools as a dependency -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>4.0.0-M16</version>
				<dependencies>
					<dependency>
						<groupId>org.sentrysoftware.maven</groupId>
						<artifactId>maven-skin-tools</artifactId>
						<version>${skinToolsVersion}</version>
					</dependency>
				</dependencies>
			</plugin>

			<!-- frontend -->
			<plugin>
				<groupId>com.github.eirslett</groupId>
				<artifactId>frontend-maven-plugin</artifactId>
				<version>2.0.0</version>
				<executions>

					<!-- initialize -->
					<!-- Install Node.js -->
					<execution>
						<id>install-nodejs</id>
						<phase>initialize</phase>
						<goals>
							<goal>install-node-and-npm</goal>
						</goals>
						<!-- optional: default phase is "generate-resources" -->
						<configuration>
							<nodeVersion>v20.18.0</nodeVersion>
						</configuration>
					</execution>

					<!-- generate-resources -->
					<!-- Run "npm ci" -->
					<execution>
						<id>npm-install</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>${npmCiCommand} ${npmCiAuditFlag} ${npmCiFundFlag}
								${npmCiLoglevelFlag}</arguments>
						</configuration>
					</execution>

					<!-- prepare-package -->
					<!-- Run "gulp" -->
					<execution>
						<id>gulp</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>gulp</goal>
						</goals>
					</execution>

				</executions>
				<configuration>
					<workingDirectory>${project.basedir}</workingDirectory>
					<skip>${skipFrontendPlugin}</skip>
				</configuration>
			</plugin>

			<!-- exec -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>3.6.3</version>
				<executions>

					<!-- generate-resources -->
					<!-- Run "npm ci" -->
					<execution>
						<id>exec-npm-ci</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>npm</executable>
							<arguments>
								<argument>${npmCiCommand}</argument>
								<argument>${npmCiAuditFlag}</argument>
								<argument>${npmCiFundFlag}</argument>
								<argument>${npmCiLoglevelFlag}</argument>
							</arguments>
						</configuration>
					</execution>

					<!-- prepare-package -->
					<!-- Run "gulp" -->
					<execution>
						<id>gulp</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>gulp</executable>
						</configuration>
					</execution>

				</executions>
				<configuration>
					<skip>${skipExecPlugin}</skip>
				</configuration>

			</plugin>

			<!-- assembly -->
			<!-- build a fake javadoc JAR to workaround Maven Central rules -->
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>

					<execution>
						<id>javadoc</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
								<descriptor>assembly-javadoc.xml</descriptor>
							</descriptors>
							<attach>true</attach>
						</configuration>
					</execution>

				</executions>
			</plugin>

			<!-- jar -->
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<classesDirectory>${project.build.directory}/dist</classesDirectory>
				</configuration>
			</plugin>

			<!--  maven-invoker-plugin -->
			<plugin>
				<artifactId>maven-invoker-plugin</artifactId>
				<version>3.9.1</version>
				<dependencies>
					<dependency>
						<groupId>org.jsoup</groupId>
						<artifactId>jsoup</artifactId>
						<version>1.22.1</version>
					</dependency>
				</dependencies>
				<configuration>
					<addTestClassPath>true</addTestClassPath>
					<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>
					<extraArtifacts>
						<extraArtifact>org.sentrysoftware.maven:maven-skin-tools:${skinToolsVersion}</extraArtifact>
					</extraArtifacts>
					<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>

		<!-- Release plugin configuration -->
		<!-- Override preparationGoals to include "install" before "site" -->
		<!-- This is needed because this project uses itself as its own skin -->
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<configuration>
						<preparationGoals>clean install site</preparationGoals>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

	</build>

	<!-- Reporting: disable useless reports inherited from parent -->
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports />
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports />
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs-maven-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports />
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<artifactId>maven-jxr-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports />
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports />
					</reportSet>
				</reportSets>
			</plugin>
			<plugin>
				<artifactId>maven-changelog-plugin</artifactId>
				<reportSets>
					<reportSet>
						<reports />
					</reportSet>
				</reportSets>
			</plugin>
		</plugins>
	</reporting>

	<profiles>

		<!-- Profile for CI (GitHub Actions) -->
		<!-- We will execute Node.js stuff directly, as we're guaranteed a proper environment -->
		<!-- This is much faster than installing Node.js with the frontend Maven plugin -->
		<profile>
			<id>CI</id>
			<activation>
				<property>
					<name>env.CI</name>
				</property>
			</activation>
			<properties>
				<skipFrontendPlugin>true</skipFrontendPlugin>
				<skipExecPlugin>false</skipExecPlugin>
			</properties>
		</profile>

	</profiles>

</project>
