<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.llmrix</groupId>
    <artifactId>orion-boxes</artifactId>
    <version>1.0.2</version>

    <modules>
        <module>orion-dependencies</module>
        <module>orion-common</module>
        <module>orion-dollar</module>
        <module>orion-fusion</module>
        <module>orion-open</module>
    </modules>

    <packaging>pom</packaging>

    <name>orion-boxes</name>

    <description>spring-boot3-version</description>

    <url>http://www.llmrix.com</url>

    <licenses>
        <license>
            <name>GNU Library or Lesser General Public License (LGPL)</name>
            <url>http://www.gnu.org/licenses/lgpl.html</url>
        </license>
    </licenses>

    <organization>
        <name>llmrix</name>
        <url>https://www.llmrix.com</url>
    </organization>

    <scm>
        <connection>scm:git:git@github.com:llmrix/orion-boxes.git</connection>
        <developerConnection>scm:git:git@github.com:llmrix/orion-boxes.git</developerConnection>
        <url>https://github.com/llmrix/orion-boxes</url>
    </scm>

    <developers>
        <developer>
            <id>llmrix</id>
            <name>llmrix</name>
            <email>ailab@llmrix.com</email>
            <url>https://github.com/llmrix/orion-boxes/</url>
            <organizationUrl>https://www.llmrix.com</organizationUrl>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/llmrix/orion-boxes/issues</url>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.java.version>17</maven.java.version>
        <maven.compiler.version>3.13.0</maven.compiler.version>
        <maven.surefire.version>3.0.0-M5</maven.surefire.version>
        <spring.checkstyle.plugin>0.0.38</spring.checkstyle.plugin>
        <springboot.maven.version>2.7.5</springboot.maven.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <!--mvn versions:set -DnewVersion=1.9.2 -DprocessAllModules=true-->
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.13.0</version>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>io.spring.javaformat</groupId>
                    <artifactId>spring-javaformat-maven-plugin</artifactId>
                    <version>${spring.checkstyle.plugin}</version>
                </plugin>
                <!--<plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>${springboot.maven.version}</version>
                </plugin>-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.version}</version>
                    <configuration>
                        <skipTests>true</skipTests>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.3.0</version>
                    <configuration>
                        <charset>${project.build.sourceEncoding}</charset>
                        <docencoding>${project.build.sourceEncoding}</docencoding>
                        <additionalJOption>-Xdoclint:none</additionalJOption>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.2.4</version>
                    <executions>
                        <execution>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <!-- CI 环境禁用交互式 pinentry，走 loopback -->
                        <gpgArguments>
                            <arg>--pinentry-mode</arg>
                            <arg>loopback</arg>
                        </gpgArguments>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.0</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-compiler-plugin</artifactId>
                    <version>${maven.compiler.version}</version>
                    <configuration>
                        <verbose>true</verbose>
                        <fork>true</fork>
                        <source>${maven.java.version}</source>
                        <target>${maven.java.version}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>0.7.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <publishingServerId>sonatype</publishingServerId>
                        <!-- 如果你想让它在上传校验成功后全自动发布，可以改为 true；设为 false 则会在网页端生成记录等你手动点 -->
                        <autoPublish>true</autoPublish>
                    </configuration>
                </plugin>
                <!--<plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.1</version>
                    <inherited>false</inherited>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>-->
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <modules>
                <module>orion-dependencies</module>
                <module>orion-open</module>
                <module>orion-dollar</module>
            </modules>
            <build>
                <plugins>
                    <plugin>
                        <!--mvn versions:set -DnewVersion=1.8.8 -DprocessAllModules=true-->
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <source>${maven.java.version}</source>
                            <target>${maven.java.version}</target>
                            <encoding>${project.build.sourceEncoding}</encoding>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <!-- 让顶级父工程本身跳过 deploy 阶段 -->
                   <!-- <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                    </plugin>-->
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <!--mvn -Dmaven.test.skip=true clean deploy -Prelease -Dgpg.passphrase=gpg密码-->
    <!--mac下用如下命令-->
    <!--mvn -Dmaven.test.skip=true clean deploy -Prelease -Dgpg.executable=gpg2 -Dgpg.passphrase=gpg密码-->
    <!--mvn -Dmaven.test.skip=true clean deploy -Prelease -Dgpg.executable=gpg -Dgpg.passphrase='xxx'-->
    <distributionManagement>
        <repository>
            <id>sonatype</id>
            <name>Central Portal</name>
            <url>https://central.sonatype.com/api/v1/publisher/deployments/maven2/</url>
        </repository>
    </distributionManagement>

</project>
