<?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>
    <packaging>pom</packaging>

    <groupId>io.github.xrfzh.cn</groupId>
    <artifactId>xr-satoken-boot</artifactId>
    <version>2.0.0-RELEASE</version>

    <modules>
        <module>xr-common</module>
        <module>xr-system</module>
        <module>xr-log</module>
        <module>xr-file</module>
        <module>xr-generator</module>
        <module>xr-api</module>
        <module>xr-biz</module>
        <module>xr-job</module>
        <module>xr-monitor</module>
        <module>xr-satoken-vue</module>
    </modules>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <maven.test.skip>true</maven.test.skip>
        <maven.javadoc.skip>true</maven.javadoc.skip>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spring-javaformat-maven-plugin.version>0.0.10</spring-javaformat-maven-plugin.version>
        <xr-satoken-boot.version>2.0.0-RELEASE</xr-satoken-boot.version>
        <xr-file-service-starter.version>2.8.9-RELEASE</xr-file-service-starter.version>
        <xrfzh-spring-boot-starter.version>2.7.10.5-RELEASE</xrfzh-spring-boot-starter.version>
    </properties>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.10</version>
        <relativePath/>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-undertow</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!-- 引入外部封装Jar父依赖包 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xr-file-service-starter</artifactId>
                <version>${xr-file-service-starter.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- 引入外部封装Jar父依赖包 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xrfzh-spring-boot-starter</artifactId>
                <version>${xrfzh-spring-boot-starter.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- 公共模块 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xr-common</artifactId>
                <version>${xr-satoken-boot.version}</version>
            </dependency>
            <!-- 系统模块 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xr-system</artifactId>
                <version>${xr-satoken-boot.version}</version>
            </dependency>
            <!-- 日志模块 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xr-log</artifactId>
                <version>${xr-satoken-boot.version}</version>
            </dependency>
            <!-- 文件模块 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xr-file</artifactId>
                <version>${xr-satoken-boot.version}</version>
            </dependency>
            <!-- 代码生成器模块 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xr-generator</artifactId>
                <version>${xr-satoken-boot.version}</version>
            </dependency>
            <!-- 实体存放模块 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xr-api</artifactId>
                <version>${xr-satoken-boot.version}</version>
            </dependency>
            <!-- 业务存放模块 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xr-biz</artifactId>
                <version>${xr-satoken-boot.version}</version>
            </dependency>
            <!-- 分布式调度框架模块 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xr-job</artifactId>
                <version>${xr-satoken-boot.version}</version>
            </dependency>
            <!-- 监控模块 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xr-monitor</artifactId>
                <version>${xr-satoken-boot.version}</version>
            </dependency>
            <!-- 前端模块 -->
            <dependency>
                <groupId>io.github.xrfzh.cn</groupId>
                <artifactId>xr-satoken-vue</artifactId>
                <version>${xr-satoken-boot.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <!--
            	代码格式插件，默认使用spring 规则，可运行命令进行项目格式化：./mvnw spring-javaformat:apply 或 mvn spring-javaformat:apply，可在IDEA中安装插件以下插件进行自动格式化：
            	https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-intellij-idea-plugin
            -->
            <plugin>
                <groupId>io.spring.javaformat</groupId>
                <artifactId>spring-javaformat-maven-plugin</artifactId>
                <version>${spring-javaformat-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <inherited>true</inherited>
                        <goals>
                            <goal>validate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>cn.xrfzh.XrfzhSpringBootStarterApplication</mainClass>
                    <classifier>execute</classifier>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/**</include>
                </includes>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/**</include>
                </includes>
                <excludes>
                    <exclude>**/*.properties</exclude>
                    <exclude>**/*.yaml</exclude>
                    <exclude>**/*.yml</exclude>
                </excludes>
            </resource>
        </resources>
    </build>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <scm>
        <connection>https://github.com/xrfzh/xrfzh-spring-boot-starter.git</connection>
        <url>https://github.com/xrfzh/xrfzh-spring-boot-starter</url>
    </scm>
    <developers>
        <developer>
            <name>xrfzh</name>
            <email>e_341877120_mail@163.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
    </developers>
    <profiles>
        <profile>
            <id>dev</id>
            <properties>
                <activeEnv>dev</activeEnv>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>pro</id>
            <properties>
                <activeEnv>pro</activeEnv>
            </properties>
        </profile>
        <profile>
            <id>release</id>
            <properties>
                <activeEnv>dev</activeEnv>
            </properties>
            <build>
                <resources>
                    <resource>
                        <directory>src/main/java</directory>
                        <includes>
                            <include>**/**</include>
                        </includes>
                        <excludes>
                            <exclude>**/*.java</exclude>
                        </excludes>
                    </resource>
                    <resource>
                        <directory>src/main/resources</directory>
                        <includes>
                            <include>**/**</include>
                        </includes>
                        <excludes>
                            <exclude>**/*.properties</exclude>
                            <exclude>**/*.yaml</exclude>
                            <exclude>**/*.yml</exclude>
                        </excludes>
                    </resource>
                </resources>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <show>private</show>
                            <nohelp>true</nohelp>
                            <charset>UTF-8</charset>
                            <encoding>UTF-8</encoding>
                            <docencoding>UTF-8</docencoding>
                        </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>1.6</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <source>1.8</source>
                            <target>1.8</target>
                            <fork>true</fork>
                            <verbose>true</verbose>
                            <encoding>UTF-8</encoding>
                            <showWarnings>false</showWarnings>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                    </plugin>
                </plugins>
            </build>
            <!-- 第一次发布使用 -->
            <!--            <distributionManagement>-->
            <!--                <snapshotRepository>-->
            <!--                    <id>nexus-snapshots</id>-->
            <!--                    <name>Nexus Snapshots Repository</name>-->
            <!--                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>-->
            <!--                </snapshotRepository>-->
            <!--                <repository>-->
            <!--                    <id>nexus-releases</id>-->
            <!--                    <name>Nexus Releases Repository</name>-->
            <!--                    <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>-->
            <!--                </repository>-->
            <!--            </distributionManagement>-->
            <distributionManagement>
                <snapshotRepository>
                    <id>nexus-snapshots</id>
                    <name>Nexus Snapshots Repository</name>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>nexus-releases</id>
                    <name>Nexus Releases Repository</name>
                    <url>https://s01.oss.sonatype.org/content/repositories/releases/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>

    <repositories>
<!--        <repository>-->
<!--            <id>aliyun-nexus</id>-->
<!--            <name>aliyun-nexus</name>-->
<!--            <url>https://maven.aliyun.com/repository/public/</url>-->
<!--            <releases>-->
<!--                <enabled>true</enabled>-->
<!--            </releases>-->
<!--            <snapshots>-->
<!--                <enabled>false</enabled>-->
<!--            </snapshots>-->
<!--        </repository>-->
        <repository>
            <id>maven-central-1</id>
            <name>maven-central-1</name>
            <url>https://repo1.maven.org/maven2/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>maven-central-2</id>
            <name>maven-central-2</name>
            <url>https://repo.maven.apache.org/maven2/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

</project>
