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

    <groupId>com.yaoyicloud</groupId>
    <artifactId>easier-render</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>easier-render</name>
    <description>easier-render</description>
    <modules>
<!--        <module>easier-common</module>-->
        <module>easier-report-biz</module>
        <module>easier-report-api</module>
    </modules>

    <properties>
        <maven.compiler.version>3.11.0</maven.compiler.version>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spring-boot.version>2.7.18</spring-boot.version>
        <spring-cloud.version>2021.0.8</spring-cloud.version>
        <spring-cloud-alibaba.version>2021.0.5.0</spring-cloud-alibaba.version>
        <checkstyle.skip>false</checkstyle.skip>
        <spring.checkstyle.version>0.0.34</spring.checkstyle.version>
        <git.commit.version>2.2.5</git.commit.version>
        <jasypt.version>3.0.5</jasypt.version>
        <spring-boot-admin.version>2.7.14</spring-boot-admin.version>
        <cas.sdk.version>3.6.4</cas.sdk.version>
    </properties>

    <dependencies>
        <!--feign 依赖-->
<!--        <dependency>-->
<!--            <groupId>org.springframework.cloud</groupId>-->
<!--            <artifactId>spring-cloud-starter-openfeign</artifactId>-->
<!--        </dependency>-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-context</artifactId>
        </dependency>
        <!--配置文件处理器-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <!--jasypt配置文件加解密-->
        <dependency>
            <groupId>com.github.ulisesbocchio</groupId>
            <artifactId>jasypt-spring-boot-starter</artifactId>
            <version>${jasypt.version}</version>
        </dependency>
        <!--监控-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <!--监控客户端-->
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-client</artifactId>
            <version>${spring-boot-admin.version}</version>
        </dependency>
        <!--Lombok-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <!--测试依赖-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>

            <!--spring boot 公共版本定义-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!--spring cloud 公共版本定义-->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!--spring cloud alibaba-->
            <dependency>
                <groupId>com.alibaba.cloud</groupId>
                <artifactId>spring-cloud-alibaba-dependencies</artifactId>
                <version>${spring-cloud-alibaba.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!--web 模块-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
                <version>${spring-boot.version}</version>
<!--                <exclusions>-->
<!--                    &lt;!&ndash;排除tomcat依赖&ndash;&gt;-->
<!--                    <exclusion>-->
<!--                        <artifactId>spring-boot-starter-tomcat</artifactId>-->
<!--                        <groupId>org.springframework.boot</groupId>-->
<!--                    </exclusion>-->
<!--                </exclusions>-->
            </dependency>


        </dependencies>
    </dependencyManagement>


    <build>
        <finalName>${project.name}</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <!--spring boot 默认插件-->
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>${spring-boot.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!--checkstyle插件-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.6.0</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>9.3</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <outputEncoding>UTF-8</outputEncoding>
                    <skip>${checkstyle.skip}</skip>
                    <configLocation>.style/alibaba.xml</configLocation>
                    <suppressionsLocation>.style/suppressions.xml</suppressionsLocation>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>false</failsOnError>
                    <linkXRef>false</linkXRef>
                    <includeTestSourceDirectory>false</includeTestSourceDirectory>
                    <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                </configuration>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--&lt;!&ndash;代码格式插件，默认使用spring 规则&ndash;&gt;-->
            <plugin>
                <groupId>io.spring.javaformat</groupId>
                <artifactId>spring-javaformat-maven-plugin</artifactId>
                <version>${spring.checkstyle.version}</version>
            </plugin>
            <!--代码编译指定版本插件-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
                <configuration>
                    <target>${maven.compiler.target}</target>
                    <source>${maven.compiler.source}</source>
                    <encoding>UTF-8</encoding>
                    <skip>false</skip>
                </configuration>
            </plugin>
            <!--打包关联最新 git commit 信息插件-->
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>${git.commit.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.3</version>
            </plugin>
            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.6.1</version>
                <configuration>
                <!--
                <protocExecutable>/usr/local/bin/protoc</protocExecutable>
                -->
                    <clearOutputDirectory>false</clearOutputDirectory>
                    <protoSourceRoot>${project.basedir}/src/main/proto</protoSourceRoot>
                    <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
                </configuration>
                <executions>
                <execution>
                    <goals>
                    <goal>compile</goal>
                    </goals>
                </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <!--  增加云效nexus示例仓库 （演示使用，可自行删除）  -->
    <distributionManagement>
        <repository>
            <id>rdc-releases</id>
            <url>https://packages.aliyun.com/maven/repository/2161442-release-DcBZC1/</url>
        </repository>
        <snapshotRepository>
            <id>rdc-snapshots</id>
            <url>https://packages.aliyun.com/maven/repository/2161442-snapshot-FzKqZK/</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>public</id>
            <name>aliyun nexus</name>
            <url>https://maven.aliyun.com/repository/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>aliyun-plugin</id>
            <url>https://maven.aliyun.com/repository/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <profiles>
        <!-- 默认环境 -->
        <profile>
            <id>loc</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <profiles.active>loc</profiles.active>
                <nacos.username>nacos</nacos.username>
                <nacos.password>nacos</nacos.password>
                <nacos.server-addr>127.0.0.1:8848</nacos.server-addr>
                <nacos.namespace>f9b40f1d-c7e6-4be2-b0bc-f08375368dcb</nacos.namespace>
                <profiles.gateway.port>14010</profiles.gateway.port>
                <profiles.auth.port>14020</profiles.auth.port>
                <profiles.workspace.biz.port>14030</profiles.workspace.biz.port>
                <profiles.filerepo.biz.port>14050</profiles.filerepo.biz.port>
                <profiles.warehouse.biz.port>14080</profiles.warehouse.biz.port>
                <profiles.quartz.biz.port>14090</profiles.quartz.biz.port>
                <profiles.report.biz.port>14070</profiles.report.biz.port>
            </properties>
        </profile>

        <profile>
            <id>pre</id>
            <properties>
                <profiles.active>pre</profiles.active>
                <nacos.username>nacos</nacos.username>
                <nacos.password>n1a2c3o4s5</nacos.password>
                <nacos.server-addr>nacos2.yaoyi.net:57260</nacos.server-addr>
                <nacos.namespace>ef23465c-e198-4ada-a3f2-88e014c69a3f</nacos.namespace>
                <profiles.gateway.port>14010</profiles.gateway.port>
                <profiles.auth.port>14020</profiles.auth.port>
                <profiles.workspace.biz.port>14030</profiles.workspace.biz.port>
                <profiles.filerepo.biz.port>14050</profiles.filerepo.biz.port>
                <profiles.warehouse.biz.port>14080</profiles.warehouse.biz.port>
                <profiles.quartz.biz.port>14090</profiles.quartz.biz.port>
                <profiles.report.biz.port>14070</profiles.report.biz.port>
            </properties>
        </profile>

        <profile>
            <id>demo</id>
            <properties>
                <profiles.active>demo</profiles.active>
                <nacos.username>nacos</nacos.username>
                <nacos.password>n1a2c3o4s5</nacos.password>
                <nacos.server-addr>nacos2.yaoyi.net:57260</nacos.server-addr>
                <nacos.namespace>ef23465c-e198-4ada-a3f2-88e014c69a3f</nacos.namespace>
                <profiles.gateway.port>14010</profiles.gateway.port>
                <profiles.auth.port>14020</profiles.auth.port>
                <profiles.workspace.biz.port>14030</profiles.workspace.biz.port>
                <profiles.filerepo.biz.port>14050</profiles.filerepo.biz.port>
                <profiles.warehouse.biz.port>14080</profiles.warehouse.biz.port>
                <profiles.quartz.biz.port>14090</profiles.quartz.biz.port>
                <profiles.report.biz.port>14070</profiles.report.biz.port>
            </properties>
        </profile>

        <profile>
            <id>prod</id>
            <properties>
                <profiles.active>prod</profiles.active>
                <nacos.username>nacos</nacos.username>
                <nacos.password>n1a2c3o4s5</nacos.password>
                <nacos.server-addr>nacos2.yaoyi.net:57260</nacos.server-addr>
                <nacos.namespace>ef23465c-e198-4ada-a3f2-88e014c69a3f</nacos.namespace>
                <profiles.gateway.port>14010</profiles.gateway.port>
                <profiles.auth.port>14020</profiles.auth.port>
                <profiles.workspace.biz.port>14030</profiles.workspace.biz.port>
                <profiles.filerepo.biz.port>14050</profiles.filerepo.biz.port>
                <profiles.warehouse.biz.port>14080</profiles.warehouse.biz.port>
                <profiles.quartz.biz.port>14090</profiles.quartz.biz.port>
                <profiles.report.biz.port>14070</profiles.report.biz.port>
            </properties>
        </profile>


    </profiles>

</project>
