<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/maven-v4_0_0.xsd">

    <parent>
       <groupId>cn.geoair.devkit</groupId>
        <artifactId>geoair-framework</artifactId>
        <version>J8.1.0-RC2</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
   <groupId>cn.geoair.devkit</groupId>
    <artifactId>geoair-base-parent</artifactId>
    <name>geoair-base-parent</name>
    <version>J8.1.0-RC2</version>
    <packaging>pom</packaging>
    <description>geoair base parent 用于Gir基础库的依赖约束</description>

    <properties>
        <versions-maven-release.version>3.1.0</versions-maven-release.version>

        <geoair.version>J8.1.0-RC2</geoair.version>
        <slf4j.version>1.7.36</slf4j.version>
    </properties>

    <url>https://gitee.com/geoair/geoair</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>张逢吉</name>
            <email>1159856928@qq.com</email>
            <organization>geoair</organization>
            <organizationUrl>https://xmt.geoair.cn/</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://gitee.com/geoair/geoair.git</connection>
        <developerConnection>scm:git:git@gitee.com:geoair/geoair.git</developerConnection>
        <url>https://gitee.com/geoair/geoair</url>
        <tag>HEAD</tag>
    </scm>


    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
               <groupId>cn.geoair.devkit</groupId>
                <artifactId>geoair-geotools-dependencies</artifactId>
                <version>${geoair.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
               <groupId>cn.geoair.devkit</groupId>
                <artifactId>geoair-spring-dependencies</artifactId>
                <version>${geoair.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
               <groupId>cn.geoair.devkit</groupId>
                <artifactId>geoair-openapi-dependencies</artifactId>
                <version>${geoair.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
               <groupId>cn.geoair.devkit</groupId>
                <artifactId>geoair-common-dependencies</artifactId>
                <version>${geoair.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>


        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
           <groupId>cn.geoair.devkit</groupId>
            <artifactId>geoair-geotools-dependencies</artifactId>
            <version>${geoair.version}</version>
            <type>pom</type>
        </dependency>

        <dependency>
           <groupId>cn.geoair.devkit</groupId>
            <artifactId>geoair-spring-dependencies</artifactId>
            <version>${geoair.version}</version>
            <type>pom</type>
        </dependency>

        <dependency>
           <groupId>cn.geoair.devkit</groupId>
            <artifactId>geoair-openapi-dependencies</artifactId>
            <version>${geoair.version}</version>
            <type>pom</type>
        </dependency>

        <dependency>
           <groupId>cn.geoair.devkit</groupId>
            <artifactId>geoair-common-dependencies</artifactId>
            <version>${geoair.version}</version>
            <type>pom</type>
        </dependency>


    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${versions-maven-release.version}</version>
                <configuration>
                    <!-- 跳过自动提交（如需手动确认可关闭） -->
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <!-- 避免重复提交标签 -->
                    <tagNameFormat>${project.artifactId}-${project.version}</tagNameFormat>
                    <!-- 发布后自动推送到远程仓库 -->
                    <pushChanges>true</pushChanges>
                    <branchName>master</branchName>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
                <configuration>
                    <!--					<classifier>bak</classifier>-->
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <!-- 源码版本 -->
                    <source>8</source>
                    <!-- 目标字节码版本 -->
                    <target>8</target>
                    <!-- 编码（可选，避免中文乱码） -->
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <!--生成源码插件-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!--生成API文档插件-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <failOnError>false</failOnError> <!-- 忽略错误，继续执行 -->
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>
    <profiles>
        <profile>
            <id>central</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://central.sonatype.com/repository/maven-snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://central.sonatype.com/repository/maven-snapshots/</url>
                </repository>
            </distributionManagement>
            <build>
                <!--发布到中央SNAPSHOT仓库插件-->
                <plugins>
                    <!--gpg插件-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <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>0.9.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>java-code-format</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.spring.javaformat</groupId>
                        <artifactId>spring-javaformat-maven-plugin</artifactId>
                        <version>${spring-javaformat.version}</version>
                        <executions>
                            <execution>
                                <phase>validate</phase>
                                <goals>
                                    <goal>validate</goal>
                                </goals>
                                <inherited>true</inherited>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>geoair-group-repo</id>
            <distributionManagement>
                <repository>
                    <id>gir-release</id>
                    <url>http://xmt.geoair.cn:32000/repository/109-release/</url>
                </repository>
                <snapshotRepository>
                    <id>gir-snapshot</id>
                    <url>http://xmt.geoair.cn:32000/repository/109-snapshot/</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
    </profiles>

</project>
