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

    <groupId>pub.mgl</groupId>
    <artifactId>mgl-build-parent</artifactId>
    <version>2026.1.8</version>

    <packaging>pom</packaging>

    <name>mgl-build-parent</name>
    <description>Bill of Materials for Maven plugins used in MGL projects</description>
    <url>https://github.com/mgl-base-plugin-bom/mgl-base-plugin-bom</url>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>hotpot</id>
            <name>hotpot</name>
            <email>mgl@mgz.email</email>
            <organization>MGL</organization>
            <organizationUrl>https://mgl.pub</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/mgl-pub/mgl-base-plugin-bom.git</connection>
        <developerConnection>scm:git:ssh://github.com:mgl-pub/mgl-base-plugin-bom.git</developerConnection>
        <url>https://github.com/mgl-pub/mgl-base-plugin-bom/tree/main</url>
    </scm>

    <properties>
        <java.version>25</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.release>${java.version}</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <resource.delimiter>@</resource.delimiter>

        <kotlin-maven-plugin.version>2.3.0</kotlin-maven-plugin.version>
        <kotlin.version>2.3.0</kotlin.version>

        <!-- 一些插件版本 -->
        <maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
        <maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
        <maven-antrun-plugin.version>3.2.0</maven-antrun-plugin.version>
        <maven-assembly-plugin.version>3.8.0</maven-assembly-plugin.version>
        <maven-clean-plugin.version>3.5.0</maven-clean-plugin.version>
        <maven-dependency-plugin.version>3.9.0</maven-dependency-plugin.version>
        <maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
        <maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
        <maven-failsafe-plugin.version>3.5.4</maven-failsafe-plugin.version>
        <maven-help-plugin.version>3.5.1</maven-help-plugin.version>
        <maven-install-plugin.version>3.1.4</maven-install-plugin.version>
        <maven-invoker-plugin.version>3.9.1</maven-invoker-plugin.version>
        <maven-resources-plugin.version>3.4.0</maven-resources-plugin.version>
        <maven-shade-plugin.version>3.6.1</maven-shade-plugin.version>
        <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
        <maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
        <maven-war-plugin.version>3.5.1</maven-war-plugin.version>
        <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
        <flatten-maven-plugin.version>1.7.3</flatten-maven-plugin.version>
        <maven-javadoc-plugin.vserion>3.12.0</maven-javadoc-plugin.vserion>

        <central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>

        <native-maven-plugin.version>0.11.3</native-maven-plugin.version>


        <lombok.version>1.18.42</lombok.version>

    </properties>

    <dependencyManagement>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin.vserion}</version>
                    <executions>
                        <execution>
                            <id>attach-javadoc</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <charset>UTF-8</charset>
                        <encoding>UTF-8</encoding>
                        <docencoding>UTF-8</docencoding>
                        <failOnError>false</failOnError>
                    </configuration>
                </plugin>
                <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</goal>-->
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <excludes>
                            <exclude>**/pub/**</exclude>
                            <exclude>**/tech/**</exclude>
                        </excludes>
                        <excludeResources>
                            true
                        </excludeResources>
                    </configuration>
                </plugin>
                <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>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>${central-publishing-maven-plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <publishingServerId>${deploy.account}</publishingServerId>
                        <autoPublish>true</autoPublish>
                        <excludeArtifacts>
                            <excludeArtifact>admin</excludeArtifact>
                            <excludeArtifact>extend</excludeArtifact>
                            <excludeArtifact>generator</excludeArtifact>
                            <excludeArtifact>job</excludeArtifact>
                            <excludeArtifact>demo</excludeArtifact>
                            <excludeArtifact>test</excludeArtifact>
                            <artifact>admin</artifact>
                            <artifact>extend</artifact>
                            <artifact>generator</artifact>
                            <artifact>job</artifact>
                            <artifact>demo</artifact>
                            <artifact>test</artifact>
                        </excludeArtifacts>
                    </configuration>
                </plugin>
                <!-- 统一版本号管理 -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>flatten-maven-plugin</artifactId>
                    <version>${flatten-maven-plugin.version}</version>
                    <configuration>
                        <updatePomFile>true</updatePomFile>
                        <flattenMode>ossrh</flattenMode>
                    </configuration>
                    <executions>
                        <execution>
                            <id>flatten</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>flatten</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>flatten.clean</id>
                            <phase>clean</phase>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <!--                    <configuration>
                                            <annotationProcessorPaths>
                                                <path>
                                                    <groupId>org.springframework.boot</groupId>
                                                    <artifactId>spring-boot-configuration-processor</artifactId>
                                                </path>
                                            </annotationProcessorPaths>
                                        </configuration>-->
                </plugin>
                <plugin>
                    <groupId>org.graalvm.buildtools</groupId>
                    <artifactId>native-maven-plugin</artifactId>
                    <version>${native-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-maven-plugin</artifactId>
                    <version>${kotlin.version}</version>
                    <configuration>
                        <args>
                            <arg>-Xjsr305=strict</arg>
                            <arg>-Xannotation-default-target=param-property</arg>
                        </args>
                        <compilerPlugins>
                            <plugin>spring</plugin>
                            <plugin>jpa</plugin>
                            <plugin>all-open</plugin>
                        </compilerPlugins>
                        <pluginOptions>
                            <option>all-open:annotation=jakarta.persistence.Entity</option>
                            <option>all-open:annotation=jakarta.persistence.MappedSuperclass</option>
                            <option>all-open:annotation=jakarta.persistence.Embeddable</option>
                        </pluginOptions>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.jetbrains.kotlin</groupId>
                            <artifactId>kotlin-maven-allopen</artifactId>
                            <version>${kotlin.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.jetbrains.kotlin</groupId>
                            <artifactId>kotlin-maven-noarg</artifactId>
                            <version>${kotlin.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${maven-war-plugin.version}</version>
                    <configuration>
                        <failOnMissingWebXml>false</failOnMissingWebXml>
                        <warName>${project.artifactId}</warName>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>