<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>dev.hloth</groupId>
	<artifactId>zgz-transport</artifactId>
	<version>1.0.0</version>
	<packaging>jar</packaging>

	<name>zgz-transport</name>
	<description>Zaragoza and Aragon transport card (Avanza, Lazo) encoder and decoder</description>
	<url>https://git.hloth.dev/hloth/zgz-transport</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>https://git.hloth.dev/hloth/zgz-transport/src/branch/main/LICENSE</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>hloth</id>
			<name>Viktor Shchelochkov</name>
			<email>hi@hloth.dev</email>
			<url>https://hloth.dev</url>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://git.hloth.dev/hloth/zgz-transport.git</connection>
		<developerConnection>scm:git:https://git.hloth.dev/hloth/zgz-transport.git</developerConnection>
		<url>https://git.hloth.dev/hloth/zgz-transport</url>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.release>17</maven.compiler.release>
		<project.build.outputTimestamp>${git.commit.time}</project.build.outputTimestamp>
		<junit.version>6.1.3</junit.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>io.github.git-commit-id</groupId>
				<artifactId>git-commit-id-maven-plugin</artifactId>
				<version>10.0.0</version>
				<configuration>
					<dateFormat>yyyy-MM-dd'T'HH:mm:ss'Z'</dateFormat>
					<dateFormatTimeZone>UTC</dateFormatTimeZone>
					<failOnNoGitDirectory>true</failOnNoGitDirectory>
					<generateGitPropertiesFile>false</generateGitPropertiesFile>
					<includeOnlyProperties>
						<includeOnlyProperty>^git.commit.time$</includeOnlyProperty>
					</includeOnlyProperties>
					<offline>true</offline>
				</configuration>
				<executions>
					<execution>
						<id>timestamp-from-the-release-commit</id>
						<goals>
							<goal>revision</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.15.0</version>
				<configuration>
					<compilerArgs>
						<arg>-Xlint:all</arg>
						<arg>-Werror</arg>
					</compilerArgs>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.5.6</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.5.1</version>
				<configuration>
					<archive>
						<manifestEntries>
							<Automatic-Module-Name>dev.hloth.zgztransport</Automatic-Module-Name>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.4.0</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>3.12.0</version>
				<configuration>
					<doclint>all,-missing</doclint>
					<failOnWarnings>true</failOnWarnings>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.diffplug.spotless</groupId>
				<artifactId>spotless-maven-plugin</artifactId>
				<version>3.10.0</version>
				<configuration>
					<java>
						<eclipse>
							<version>4.36</version>
						</eclipse>
						<removeUnusedImports/>
						<importOrder/>
					</java>
					<pom>
						<sortPom>
							<expandEmptyElements>false</expandEmptyElements>
							<nrOfIndentSpace>-1</nrOfIndentSpace>
						</sortPom>
					</pom>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>central</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.2.8</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<goals>
									<goal>sign</goal>
								</goals>
								<phase>verify</phase>
								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
						<version>0.11.0</version>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>central</publishingServerId>
							<autoPublish>true</autoPublish>
							<waitUntil>validated</waitUntil>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>forgejo</id>
			<distributionManagement>
				<repository>
					<id>forgejo</id>
					<name>Forgejo packages</name>
					<url>https://git.hloth.dev/api/packages/hloth/maven</url>
				</repository>
			</distributionManagement>
		</profile>
	</profiles>
</project>
