<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>com.holon-platform</groupId>
	<artifactId>holon-shared</artifactId>
	<version>2.0.2</version>

	<packaging>jar</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>Holon platform shared resources</description>

	<url>https://holon-platform.com</url>

	<organization>
		<name>The Holon Platform</name>
		<url>https://holon-platform.com</url>
	</organization>

	<licenses>
		<license>
			<name>Apache License Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Holon development team</name>
			<email>dev@holon-platform.com</email>
			<organization>The Holon Platform</organization>
			<organizationUrl>https://holon-platform.com</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://github.com/holon-platform/holon-shared.git</connection>
		<url>https://github.com/holon-platform/holon-shared</url>
		<developerConnection>
			scm:git:https://github.com/holon-platform/holon-shared.git</developerConnection>
		<tag>2.0.2</tag>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<maven.compiler.release>21</maven.compiler.release>

		<maven-remote-resources-plugin.version>3.2.0</maven-remote-resources-plugin.version>

		<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.10.1</maven-javadoc-plugin.version>
		<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
		<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
		<!--
		<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version> -->
		<sonatype-maven-plugin.version>0.9.0</sonatype-maven-plugin.version>

		<!-- Git scm server id in settings.xml -->
		<project.scm.id>git-scm-server</project.scm.id>
	</properties>

	<pluginRepositories>
		<pluginRepository>
			<id>central</id>
			<name>Central Repository</name>
			<url>https://repo.maven.apache.org/maven2</url>
			<layout>default</layout>
		</pluginRepository>
	</pluginRepositories>

	<build>
		<plugins>
			<!-- Remote resources -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-remote-resources-plugin</artifactId>
				<version>${maven-remote-resources-plugin.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>bundle</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<includes>
						<include>**/*.html</include>
						<include>**/*.css</include>
						<include>**/*.jpg</include>
						<include>**/*.png</include>
						<include>**/*.yml</include>
					</includes>
				</configuration>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<!-- Sources -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven-source-plugin.version}</version>
				</plugin>
				<!-- Javadoc -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
				</plugin>
				<!-- Release -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
					<configuration>
						<tagNameFormat>@{project.version}</tagNameFormat>
						<autoVersionSubmodules>true</autoVersionSubmodules>
						<useReleaseProfile>false</useReleaseProfile>
					</configuration>
				</plugin>
				<!-- GPG -->
				<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>
						</execution>
					</executions>
				</plugin>
				
				<!-- Nexus staging (OLD)
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>${nexus-staging-maven-plugin.version}</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>sonatype-nexus-staging</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
				</plugin> 
				-->
				<plugin>
					<groupId>org.sonatype.central</groupId>
					<artifactId>central-publishing-maven-plugin</artifactId>
					<version>${sonatype-maven-plugin.version}</version>
					<extensions>true</extensions>
					<configuration>
						<publishingServerId>sonatype-nexus-staging</publishingServerId>
						<autoPublish>true</autoPublish>
					</configuration>
				</plugin>

			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<!-- Sonatype Nexus -->
			<distributionManagement>
				<repository>
					<id>sonatype-nexus-staging</id>
					<name>Nexus release repository</name>
					<url>
						https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>
			<build>
				<plugins>
					<!-- sources -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<configuration>
							<!-- Only include java files -->
							<includes>
								<include>**/*.java</include>
							</includes>
						</configuration>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<!-- Javadocs -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<phase>prepare-package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<quiet>true</quiet>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<!-- Release -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
					</plugin>
					<!-- GPG -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
					</plugin>
					<!-- Sonatype release publish-->
					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>