<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2025 the original author or authors.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         https://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>eu.michael-simons.maven</groupId>
	<artifactId>native-image-config-transformer</artifactId>
	<version>1.0.2</version>

	<packaging>jar</packaging>
	<name>Native image config transformer</name>
	<description>Additional transformers for the Maven shade plugin dealing with GraalVM native image configuration files.</description>
	<url>https://codeberg.org/michael-simons/native-image-config-transformer</url>

	<inceptionYear>2025</inceptionYear>
	<organization>
		<name>michael-simons.eu</name>
		<url>http://michael-simons.eu</url>
	</organization>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>msimons</id>
			<name>Michael Simons</name>
			<email>michael at simons.ac</email>
			<roles>
				<role>Project Lead</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@codeberg.org:michael-simons/native-image-config-transformer.git</connection>
		<developerConnection>scm:git:git@codeberg.org:michael-simons/native-image-config-transformer.git</developerConnection>
		<tag>1.0.2</tag>
		<url>https://codeberg.org/michael-simons/native-image-config-transformer</url>
	</scm>

	<issueManagement>
		<system>Codeberg</system>
		<url>https://codeberg.org/michael-simons/native-image-config-transformer/issues</url>
	</issueManagement>

	<properties>
		<assertj.version>3.27.7</assertj.version>
		<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
		<central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>
		<checkstyle.version>13.4.0</checkstyle.version>
		<commons-io.version>2.21.0</commons-io.version>
		<duplicate-finder-maven-plugin.version>2.0.1</duplicate-finder-maven-plugin.version>
		<exec-maven-plugin.version>3.6.3</exec-maven-plugin.version>
		<git-commit-id-maven-plugin.version>9.1.0</git-commit-id-maven-plugin.version>
		<jackson.version>2.21.2</jackson.version>
		<java.version>17</java.version>
		<junit-jupiter.version>6.0.3</junit-jupiter.version>
		<license-maven-plugin.version>5.0.0</license-maven-plugin.version>
		<maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
		<maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
		<maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
		<maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
		<maven-failsafe-plugin.version>3.5.5</maven-failsafe-plugin.version>
		<maven-install-plugin.version>3.1.4</maven-install-plugin.version>
		<maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
		<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
		<maven-release-plugin.version>3.3.1</maven-release-plugin.version>
		<maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
		<maven-shade-plugin.version>3.6.2</maven-shade-plugin.version>
		<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
		<maven-surefire-plugin.version>3.5.5</maven-surefire-plugin.version>
		<maven.compiler.release>${java.version}</maven.compiler.release>
		<maven.version>3.9.9</maven.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<skipITs>${skipTests}</skipITs>
		<skipTests>false</skipTests>
		<skipUTs>${skipTests}</skipUTs>
		<slf4j.version>2.0.17</slf4j.version>
		<sortpom-maven-plugin.version>4.0.0</sortpom-maven-plugin.version>
		<spring-javaformat.version>0.0.47</spring-javaformat.version>
		<versions-maven-plugin.version>2.21.0</versions-maven-plugin.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.fasterxml.jackson</groupId>
				<artifactId>jackson-bom</artifactId>
				<version>${jackson.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-bom</artifactId>
				<version>${assertj.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.junit</groupId>
				<artifactId>junit-bom</artifactId>
				<version>${junit-jupiter.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-bom</artifactId>
				<version>${slf4j.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<!-- Managed due to non-convergence from shade to compress respectively directly to io -->
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>${commons-io.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-shade-plugin</artifactId>
			<version>${maven-shade-plugin.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>${maven-assembly-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${license-maven-plugin.version}</version>
					<configuration>
						<licenseSets>
							<licenseSet>
								<header>etc/license.tpl</header>
								<properties>
									<year>2025</year>
								</properties>
								<includes>
									<include>**</include>
								</includes>
								<excludes>
									<exclude>**/*.adoc</exclude>
									<exclude>**/*.conf</exclude>
									<exclude>**/*.csv</exclude>
									<exclude>**/*.cypher</exclude>
									<exclude>**/*.script</exclude>
									<exclude>**/*.tpl</exclude>
									<exclude>**/.env</exclude>
									<exclude>**/org.mockito.plugins.MockMaker</exclude>
									<exclude>LICENSE.txt</exclude>
									<exclude>**/README</exclude>
								</excludes>
							</licenseSet>
						</licenseSets>
						<dependencyEnforce>true</dependencyEnforce>
						<dependencyExceptionMessage>One or more dependencies are licensed under a non-approved
							license.</dependencyExceptionMessage>
						<dependencyPolicies>
							<dependencyPolicy>
								<type>LICENSE_URL</type>
								<rule>APPROVE</rule>
								<value>https://www.apache.org/licenses/LICENSE-2.0</value>
							</dependencyPolicy>
							<dependencyPolicy>
								<type>LICENSE_NAME</type>
								<rule>APPROVE</rule>
								<value>Apache License, Version 2</value>
							</dependencyPolicy>
							<dependencyPolicy>
								<type>LICENSE_NAME</type>
								<rule>APPROVE</rule>
								<value>Apache License, Version 2.0</value>
							</dependencyPolicy>
							<dependencyPolicy>
								<type>LICENSE_NAME</type>
								<rule>APPROVE</rule>
								<value>The Apache Software License, Version 2.0</value>
							</dependencyPolicy>
							<dependencyPolicy>
								<type>LICENSE_NAME</type>
								<rule>APPROVE</rule>
								<value>The Apache Software License, version 2.0</value>
							</dependencyPolicy>
							<dependencyPolicy>
								<type>LICENSE_NAME</type>
								<rule>APPROVE</rule>
								<value>Apache-2.0</value>
							</dependencyPolicy>
							<dependencyPolicy>
								<type>LICENSE_NAME</type>
								<rule>APPROVE</rule>
								<value>Apache License 2.0</value>
							</dependencyPolicy>
							<dependencyPolicy>
								<type>LICENSE_NAME</type>
								<rule>APPROVE</rule>
								<value>Apache 2</value>
							</dependencyPolicy>
							<dependencyPolicy>
								<type>LICENSE_NAME</type>
								<rule>APPROVE</rule>
								<value>MIT</value>
							</dependencyPolicy>
						</dependencyPolicies>
						<mapping>
							<factories>SCRIPT_STYLE</factories>
						</mapping>
						<strictCheck>true</strictCheck>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.github.ekryd.sortpom</groupId>
					<artifactId>sortpom-maven-plugin</artifactId>
					<version>${sortpom-maven-plugin.version}</version>
					<configuration>
						<encoding>${project.build.sourceEncoding}</encoding>
						<keepBlankLines>true</keepBlankLines>
						<nrOfIndentSpace>-1</nrOfIndentSpace>
						<sortProperties>true</sortProperties>
						<sortDependencies>scope,groupId,artifactId</sortDependencies>
						<createBackupFile>false</createBackupFile>
						<expandEmptyElements>false</expandEmptyElements>
						<verifyFail>stop</verifyFail>
						<verifyFailOn>strict</verifyFailOn>
						<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>${maven-enforcer-plugin.version}</version>
					<configuration>
						<rules>
							<requireJavaVersion>
								<version>${java.version}</version>
							</requireJavaVersion>
							<requireMavenVersion>
								<version>${maven.version}</version>
							</requireMavenVersion>
							<DependencyConvergence />
						</rules>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>versions-maven-plugin</artifactId>
					<version>${versions-maven-plugin.version}</version>
					<configuration>
						<generateBackupPoms>false</generateBackupPoms>
						<ruleSet>
							<ignoreVersions>
								<ignoreVersion>
									<type>regex</type>
									<version>(?i)(.+-SNAPSHOT|.+-M\d+|.+-?RC\d+|.+CR\d+)</version>
								</ignoreVersion>
								<ignoreVersion>
									<type>regex</type>
									<version>.+-(alpha|beta).+</version>
								</ignoreVersion>
							</ignoreVersions>
						</ruleSet>
					</configuration>
				</plugin>
				<plugin>
					<groupId>io.spring.javaformat</groupId>
					<artifactId>spring-javaformat-maven-plugin</artifactId>
					<version>${spring-javaformat.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>${maven-checkstyle-plugin.version}</version>
					<configuration>
						<excludes>**/module-info.java</excludes>
						<includeTestSourceDirectory>true</includeTestSourceDirectory>
						<configLocation>etc/checkstyle/config.xml</configLocation>
						<suppressionsLocation>etc/checkstyle/suppressions.xml</suppressionsLocation>
						<inputEncoding>${project.build.sourceEncoding}</inputEncoding>
						<consoleOutput>true</consoleOutput>
						<failsOnError>true</failsOnError>
						<includeTestSourceDirectory>true</includeTestSourceDirectory>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>com.puppycrawl.tools</groupId>
							<artifactId>checkstyle</artifactId>
							<version>${checkstyle.version}</version>
						</dependency>
						<dependency>
							<groupId>io.spring.javaformat</groupId>
							<artifactId>spring-javaformat-checkstyle</artifactId>
							<version>${spring-javaformat.version}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
					<configuration>
						<forceLegacyJavacApi>true</forceLegacyJavacApi>
						<showWarnings>true</showWarnings>
						<compilerArgs>
							<arg>-Xlint:all,-options,-path,-processing,-classfile</arg>
							<arg>-Werror</arg>
							<arg>-parameters</arg>
						</compilerArgs>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven-surefire-plugin.version}</version>
					<configuration>
						<argLine>-Xverify:all</argLine>
						<skipTests>${skipUTs}</skipTests>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven-jar-plugin.version}</version>
					<configuration>
						<archive>
							<manifest>
								<addDefaultEntries>true</addDefaultEntries>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
								<addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
							</manifest>
							<manifestEntries>
								<Artifact-Id>${project.artifactId}</Artifact-Id>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>${maven-failsafe-plugin.version}</version>
					<configuration>
						<skipTests>${skipTests}</skipTests>
						<skipITs>${skipITs}</skipITs>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>${maven-install-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>${maven-deploy-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
					<configuration>
						<quiet>true</quiet>
						<detectOfflineLinks>false</detectOfflineLinks>
						<detectJavaApiLink>true</detectJavaApiLink>
						<release>${java.version}</release>
					</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-resources-plugin</artifactId>
					<version>${maven-resources-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.basepom.maven</groupId>
					<artifactId>duplicate-finder-maven-plugin</artifactId>
					<version>${duplicate-finder-maven-plugin.version}</version>
					<configuration>
						<failBuildInCaseOfDifferentContentConflict>true</failBuildInCaseOfDifferentContentConflict>
						<failBuildInCaseOfEqualContentConflict>true</failBuildInCaseOfEqualContentConflict>
						<failBuildInCaseOfConflict>true</failBuildInCaseOfConflict>
						<checkCompileClasspath>true</checkCompileClasspath>
						<checkRuntimeClasspath>true</checkRuntimeClasspath>
						<checkTestClasspath>false</checkTestClasspath>
						<preferLocal>true</preferLocal>
						<useResultFile>true</useResultFile>
						<resultFile>${project.build.directory}/duplicate-finder-result.xml</resultFile>
					</configuration>
				</plugin>
				<plugin>
					<groupId>io.github.git-commit-id</groupId>
					<artifactId>git-commit-id-maven-plugin</artifactId>
					<version>${git-commit-id-maven-plugin.version}</version>
					<configuration>
						<generateGitPropertiesFile>false</generateGitPropertiesFile>
						<commitIdGenerationMode>full</commitIdGenerationMode>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
					<version>${exec-maven-plugin.version}</version>
					<configuration>
						<skip>true</skip>
					</configuration>
					<executions>
						<execution>
							<id>prepare-release</id>
							<goals>
								<goal>exec</goal>
							</goals>
							<configuration>
								<executable>bin/prepare-release.sh</executable>
								<arguments>
									<argument>${project.version}</argument>
									<!--suppress MavenModelInspection -->
									<argument>${isDryRun}</argument>
								</arguments>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>io.github.git-commit-id</groupId>
				<artifactId>git-commit-id-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>get-the-git-infos</id>
						<goals>
							<goal>revision</goal>
						</goals>
						<phase>initialize</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<phase>validate</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.basepom.maven</groupId>
				<artifactId>duplicate-finder-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>default</id>
						<goals>
							<goal>check</goal>
						</goals>
						<phase>validate</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.github.ekryd.sortpom</groupId>
				<artifactId>sortpom-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>verify</goal>
						</goals>
						<phase>validate</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>validate</id>
						<goals>
							<goal>check</goal>
						</goals>
						<phase>validate</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>io.spring.javaformat</groupId>
				<artifactId>spring-javaformat-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>validate</goal>
						</goals>
						<phase>validate</phase>
						<inherited>true</inherited>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<executions>
					<execution>
						<id>checkstyle-validation</id>
						<goals>
							<goal>check</goal>
						</goals>
						<phase>validate</phase>
						<inherited>true</inherited>
					</execution>
				</executions>
			</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>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<inherited>false</inherited>
				<executions>
					<execution>
						<id>prepare-release</id>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration combine.self="append">
							<skip>false</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${maven-release-plugin.version}</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<tagNameFormat>@{project.version}</tagNameFormat>
					<goals>deploy</goals>
					<preparationGoals>clean exec:exec@prepare-release verify</preparationGoals>
					<pushChanges>false</pushChanges>
					<localCheckout>true</localCheckout>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.sonatype.central</groupId>
				<artifactId>central-publishing-maven-plugin</artifactId>
				<version>${central-publishing-maven-plugin.version}</version>
				<extensions>true</extensions>
				<configuration>
					<publishingServerId>central</publishingServerId>
					<autoPublish>true</autoPublish>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>fast</id>
			<activation>
				<property>
					<name>fast</name>
				</property>
			</activation>
			<properties>
				<checkstyle.skip>true</checkstyle.skip>
				<license.skip>true</license.skip>
				<maven.javadoc.skip>true</maven.javadoc.skip>
				<skipTests>true</skipTests>
				<sort.skip>true</sort.skip>
				<spring-javaformat.skip>true</spring-javaformat.skip>
			</properties>
		</profile>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<goals>
									<goal>sign</goal>
								</goals>
								<phase>verify</phase>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
