<?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>com.github.luoshu-open</groupId>
    <artifactId>luoshu</artifactId>
    <packaging>pom</packaging>
    <version>0.3</version>
    <description>https://gitee.com/bailuoo/luoshu.git</description>

    <!-- 注意：这里一定要写开发者信息 -->
    <developers>
        <developer>
            <name>朱小杰</name>
            <email>zxjother@163.com</email>
        </developer>
    </developers>


    <modules>
        <module>luoshu-util</module>
        <module>luoshu-spring</module>
        <module>luoshu-id</module>
        <module>luoshu-config</module>
        <module>luoshu-http</module>
    </modules>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.18.RELEASE</version>
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <shiro.version>1.7.1</shiro.version>
        <fastjson.version>1.2.83</fastjson.version>
        <gson.version>2.8.6</gson.version>
        <druid.version>1.1.22</druid.version>
        <lombok.version>1.18.12</lombok.version>
    </properties>


    <dependencies>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>


    </dependencies>

    <dependencyManagement>

        <dependencies>

            <dependency>
                <groupId>org.apache.shiro</groupId>
                <artifactId>shiro-spring</artifactId>
                <version>${shiro.version}</version>
            </dependency>

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>


            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>druid</artifactId>
                <version>${druid.version}</version>
            </dependency>

            <!-- 洛书 .. 开始 -->
            <dependency>
                <groupId>com.github.luoshu-open</groupId>
                <artifactId>luoshu-util</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.luoshu-open</groupId>
                <artifactId>luoshu-spring</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-log4j2</artifactId>
                <version>2.6.2</version>
            </dependency>
            <!-- 洛书 .. 结束 -->


        </dependencies>

    </dependencyManagement>


    <profiles>
        <!-- 注意：整个 profile 全部复制过去，并且激活这个 profile -->
        <profile>
            <id>oss</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>

            <distributionManagement>
                <snapshotRepository>
                    <id>oss</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>oss</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <!-- 注意：这里要配置 gpg 的插件，来上传 -->
                    <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>

                    <!-- 注意：这里必须配置 javadoc 上传，否则不成功 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.0.0</version>
                        <inherited>true</inherited>
                        <executions>
                            <execution>
                                <id>bundle-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <maxmemory>1024</maxmemory>
                            <encoding>UTF-8</encoding>
                            <show>protected</show>
                            <notree>true</notree>

                            <!-- Avoid running into Java 8's very restrictive doclint issues -->
                            <failOnError>false</failOnError>
                            <doclint>none</doclint>
                        </configuration>
                    </plugin>

                    <!-- 注意：这里必须配置 javadoc 上传，否则不成功，与上面的插件配合使用 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.1.0</version>
                        <inherited>true</inherited>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <excludeResources>true</excludeResources>
                            <useDefaultExcludes>true</useDefaultExcludes>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>



    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>


    <distributionManagement>
        <repository>
            <id>rdc-releases</id>
            <url>https://repo.rdc.aliyun.com/repository/123515-release-ly00Nr/</url>
        </repository>
        <snapshotRepository>
            <id>rdc-snapshots</id>
            <url>https://repo.rdc.aliyun.com/repository/123515-snapshot-g6sjED/</url>
        </snapshotRepository>
    </distributionManagement>
</project>
