<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>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>3.2.6</version>
		<relativePath /> <!-- lookup parent from repository -->
	</parent>
	<groupId>ch.nexsol-tech.spring</groupId>
	<artifactId>spring-parent</artifactId>
	<version>1.0.0</version>
	<packaging>pom</packaging>

	<name>Nexsol Spring Parent</name>
	<description>Nexsol Spring Parent</description>
	<url>https://github.com/nexsol-technologies/spring-parent/</url>

	<organization>
		<name>Nexsol Technologies</name>
		<url>https://nexsol-tech.ch</url>
	</organization>
	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
		</license>
	</licenses>
	<scm>
		<connection>
			scm:git:git://github.com/nexsol-technologies/spring-parent.git</connection>
		<developerConnection>
			scm:git:ssh://git@ggithub.com/nexsol-technologies/spring-parent.git</developerConnection>
		<url>https://github.com/nexsol-technologies/spring-parent</url>
	</scm>
	<developers>
		<developer>
			<name>Nexsol Technologies</name>
			<email>info@nexsol.tech</email>
			<url>https://nexsol-tech.ch</url>
		</developer>
	</developers>


	<properties>
		<revision>1.0.0-SNAPSHOT</revision>
		
		<!-- project -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.version>21</java.version>

		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<nexus-staging-maven-plugin>1.6.8</nexus-staging-maven-plugin>
	</properties>

	<modules>
		<module>spring-build</module>
		<module>spring-dependencies</module>
		<module>spring-security-test</module>
		<module>spring-security</module>
	</modules>

	<distributionManagement>
		<snapshotRepository>
			<id>github</id>
			<name>GitHub Packages</name>
			<url>https://maven.pkg.github.com/nexsol-technologies/spring-parent</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<name>Nexus Release Repository</name>
			<url>
				https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<profiles>
		<profile>
			<id>coverage</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<executions>
							<!-- Prepares the property pointing to the JaCoCo
							runtime agent which is passed as
                                 VM argument when Maven the Surefire plugin is executed. -->
							<execution>
								<id>pre-unit-test</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<!-- Ensures that the code coverage report for unit
							tests is created after unit tests have
                                 been run. -->
							<execution>
								<id>post-unit-test</id>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>central-deploy</id>
			<build>
				<plugins>
					<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>
									<!-- This is necessary for gpg to not try to
									use
								the pinentry programs -->
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!--					<plugin>-->
					<!--						<groupId>org.apache.maven.plugins</groupId>-->
					<!--						<artifactId>maven-deploy-plugin</artifactId>-->
					<!--						<configuration>-->
					<!--							<skip>true</skip>-->
					<!--						</configuration>-->
					<!--					</plugin>-->
<!--					<plugin>-->
<!--						<groupId>org.sonatype.plugins</groupId>-->
<!--						<artifactId>nexus-staging-maven-plugin</artifactId>-->
<!--						<version>${nexus-staging-maven-plugin}</version>-->
<!--						<extensions>true</extensions>-->
<!--						<configuration>-->
<!--							<serverId>ossrh</serverId>-->
<!--							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>-->
<!--							<autoReleaseAfterClose>true</autoReleaseAfterClose>-->
<!--						</configuration>-->
<!--					</plugin>-->
					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
						<version>0.5.0</version>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>ossrh</publishingServerId>
							<autoPublish>true</autoPublish>
							<waitUntil>published</waitUntil>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>