<?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>

	<!-- ===================== BASIC INFO ===================== -->
	<groupId>io.github.lean2708</groupId>
	<artifactId>flygo-common</artifactId>
	<version>1.2.7</version>
	<packaging>jar</packaging>

	<name>flygo-common</name>
	<description>Common library for FlyGo microservices</description>
	<url>https://github.com/lean2708/flygo-common</url>

	<!-- ===================== PROPERTIES ===================== -->
	<properties>
		<java.version>17</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<!-- ===================== DEPENDENCIES ===================== -->
	<dependencies>

		<!-- Spring -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>6.1.6</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>6.1.6</version>
			<scope>provided</scope>
		</dependency>

		<!-- Jackson -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>2.17.1</version>
			<scope>provided</scope>
		</dependency>

		<!-- Jakarta -->
		<dependency>
			<groupId>jakarta.annotation</groupId>
			<artifactId>jakarta.annotation-api</artifactId>
			<version>2.1.1</version>
		</dependency>

		<dependency>
			<groupId>jakarta.validation</groupId>
			<artifactId>jakarta.validation-api</artifactId>
			<version>3.0.2</version>
		</dependency>

		<dependency>
			<groupId>jakarta.persistence</groupId>
			<artifactId>jakarta.persistence-api</artifactId>
			<version>3.1.0</version>
		</dependency>

		<!-- Servlet -->
		<dependency>
			<groupId>jakarta.servlet</groupId>
			<artifactId>jakarta.servlet-api</artifactId>
			<version>6.0.0</version>
			<scope>provided</scope>
		</dependency>

		<!-- Lombok -->
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.18.32</version>
			<scope>provided</scope>
		</dependency>

		<!-- Logging -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>2.0.13</version>
		</dependency>

		<!--AssertJ-->
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.9.24</version>
		</dependency>

		<!-- Optional Spring Boot Autoconfigure for better integration with Spring Boot projects -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-autoconfigure</artifactId>
			<version>3.5.4</version>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.datatype</groupId>
			<artifactId>jackson-datatype-jsr310</artifactId>
			<version>2.17.1</version>
			<optional>true</optional>
		</dependency>

	</dependencies>


	<build>
		<plugins>

			<!-- SOURCE JAR -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.3.0</version>
				<executions>
					<execution>
						<phase>verify</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- JAVADOC JAR -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.6.3</version>
				<executions>
					<execution>
						<phase>verify</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- GPG SIGNING -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>3.2.4</version>

				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>

				<configuration>
					<useAgent>false</useAgent>

					<gpgArguments>
						<arg>--batch</arg>
						<arg>--yes</arg>
						<arg>--pinentry-mode</arg>
						<arg>loopback</arg>
					</gpgArguments>
				</configuration>
			</plugin>

			<!-- MAVEN CENTRAL PUBLISH -->
			<plugin>
				<groupId>org.sonatype.central</groupId>
				<artifactId>central-publishing-maven-plugin</artifactId>
				<version>0.9.0</version>

				<extensions>true</extensions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>

		</plugins>
	</build>

	<!-- ===================== REQUIRED FOR MAVEN CENTRAL ===================== -->
	<licenses>
		<license>
			<name>MIT License</name>
			<url>https://opensource.org/licenses/MIT</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>lean2708</id>
			<name>Lean</name>
			<email>lean270804@gmail.com</email>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git://github.com/lean2708/flygo-common.git</connection>
		<developerConnection>scm:git:ssh://github.com:lean2708/flygo-common.git</developerConnection>
		<url>https://github.com/lean2708/flygo-common</url>
	</scm>

	<!-- ===================== MAVEN CENTRAL ENDPOINT ===================== -->
	<distributionManagement>
		<repository>
			<id>central</id>
			<name>central</name>
			<url>https://central.sonatype.com/api/v1/publisher</url>
		</repository>
	</distributionManagement>

	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>

			<properties>
				<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
			</properties>
		</profile>
	</profiles>

</project>