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

	<parent>
		<groupId>org.ballcat</groupId>
		<artifactId>ballcat-build</artifactId>
		<version>${revision}</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<artifactId>ballcat-parent</artifactId>
	<version>${revision}</version>
	<packaging>pom</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>Parent POM for Ballcat components</description>

	<dependencyManagement>
		<dependencies>
			<!-- Import BOM for dependency management -->
			<dependency>
				<groupId>org.ballcat</groupId>
				<artifactId>ballcat-dependencies</artifactId>
				<version>${revision}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<!-- lombok 代码简化处理器 -->
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- Flatten Maven Plugin for publishing -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>flatten-maven-plugin</artifactId>
				<version>${flatten-maven-plugin.version}</version>
				<configuration>
					<!-- OSSRH mode: removes parent, resolves dependency versions, keeps required metadata -->
					<flattenMode>ossrh</flattenMode>
					<updatePomFile>true</updatePomFile>
					<pomElements>
						<dependencyManagement>extended_interpolate</dependencyManagement>
					</pomElements>
				</configuration>
				<executions>
					<execution>
						<id>flatten</id>
						<goals>
							<goal>flatten</goal>
						</goals>
						<phase>process-resources</phase>
					</execution>
					<execution>
						<id>flatten-clean</id>
						<goals>
							<goal>clean</goal>
						</goals>
						<phase>clean</phase>
					</execution>
				</executions>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven-source-plugin.version}</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-resources-plugin</artifactId>
					<version>${maven-resources-plugin.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

</project>