<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~    Copyright (c) 2021-2022.  lWoHvYe(Hongyan Wang)
  ~
  ~    Licensed under the Apache License, Version 2.0 (the "License");
  ~    you may not use this file except in compliance with the License.
  ~    You may obtain a copy of the License at
  ~
  ~        http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~    Unless required by applicable law or agreed to in writing, software
  ~    distributed under the License is distributed on an "AS IS" BASIS,
  ~    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~    See the License for the specific language governing permissions and
  ~    limitations under the License.
  -->

<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.lwohvye</groupId>
    <artifactId>eladmin</artifactId>
    <packaging>pom</packaging>
    <version>3.0.3</version>

    <name>EL-ADMIN 管理系统</name>
    <url>https://github.com/lWoHvYe/eladmin</url>
    <description>A Spring Boot Project With Jpa JWT Security and so on</description>

    <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>
            <id>lWoHvYe</id>
            <name>王红岩 (lWoHvYe)</name>
            <email>lWoHvYe@outlook.com</email>
            <url>https://www.lwohvye.com</url>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/lWoHvYe/eladmin.git</connection>
        <developerConnection>scm:git:ssh://github.com/lWoHvYe/eladmin.git</developerConnection>
        <url>https://github.com/lWoHvYe/eladmin/tree/main</url>
        <tag>eladmin-v3.0.3</tag>
    </scm>

    <modules>
        <module>eladmin-common</module>
        <module>eladmin-api</module>
        <module>eladmin-logging</module>
        <module>eladmin-system</module>
        <module>eladmin-tools</module>
        <module>eladmin-generator</module>
    </modules>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.0</version>
        <!--<relativePath/>设定一个空值将始终从仓库中获取，不从本地路径获取。
        查找顺序：relativePath元素中的地址–本地仓库–远程仓库-->
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <!--    Spring Boot依赖版本配置：https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#dependency-versions.properties    -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!--开发版本-->
        <java.version>18</java.version>
        <project.core.version>3.0.3</project.core.version>
        <!--支持Java 18，问题不在这，这里不升级也没啥问题，用release就可以了-->
        <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
        <!--https://maven.apache.org/plugins/maven-compiler-plugin/-->
        <!--<maven.compiler.source>17</maven.compiler.source>-->
        <!--<maven.compiler.target>17</maven.compiler.target>-->
        <!--Starting JDK 9, release can be used to do the things what source and target can do
        https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html-->
        <maven.compiler.release>17</maven.compiler.release>
        <log4jdbc.version>1.16</log4jdbc.version>
        <springdoc.openapi.version>1.6.6</springdoc.openapi.version>
        <io.swagger.version>1.6.4</io.swagger.version>
        <druid.version>1.2.10</druid.version>
        <hutool.version>5.8.2</hutool.version>
        <fastutil.version>8.5.8</fastutil.version>
        <lombok.version>1.18.24</lombok.version>
        <commons-pool2.version>2.11.1</commons-pool2.version>
        <!--mapstruct也要用新版本才行-->
        <mapstruct.version>1.5.1.Final</mapstruct.version>
        <mapstruct.spring.version>0.1.1</mapstruct.spring.version>
        <!--logstash有所依赖，需要使用management统一管理依赖-->
        <logstash.version>7.2</logstash.version>
        <!--  LDAP（Lightweight Directory Access Protocol轻量目录访问协议） logback也来了 https://logback.qos.ch/news.html     -->
        <logback.version>1.2.11</logback.version>
        <redisson.version>3.17.3</redisson.version>
        <guava.version>31.1-jre</guava.version>
        <caffeine.version>3.1.1</caffeine.version>
        <poi.version>5.2.2</poi.version>
        <xerces.version>2.12.2</xerces.version>
        <yauaa.version>7.1.0</yauaa.version>
        <ip2region.version>2.7.0</ip2region.version>
        <thumbnailator.version>0.4.17</thumbnailator.version>
        <argLine>
            -Dfile.encoding=UTF-8
        </argLine>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Redisson -->
            <dependency>
                <groupId>org.redisson</groupId>
                <artifactId>redisson-spring-boot-starter</artifactId>
                <version>${redisson.version}</version>
            </dependency>

            <!--监控sql日志-->
            <dependency>
                <groupId>org.bgee.log4jdbc-log4j2</groupId>
                <artifactId>log4jdbc-log4j2-jdbc4.1</artifactId>
                <version>${log4jdbc.version}</version>
            </dependency>

            <!-- Swagger UI 相关 -->
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-ui</artifactId>
                <version>${springdoc.openapi.version}</version>
            </dependency>
            <!--    his dependency helps ignoring @AuthenticationPrincipal in case its used on REST Controllers    -->
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-security</artifactId>
                <version>${springdoc.openapi.version}</version>
            </dependency>
            <!--    enable the support of spring Pageable Type    -->
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-data-rest</artifactId>
                <version>${springdoc.openapi.version}</version>
            </dependency>
            <!--   enable javadoc support     -->
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-javadoc</artifactId>
                <version>${springdoc.openapi.version}</version>
            </dependency>
            <!--    swagger-core依赖该包，部分原因，需单独升级依赖版本    -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>

            <!-- druid数据源驱动 ; 注：使用shardingsphere时。这里不能用druid但spring-boot-starter -->
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>druid</artifactId>
                <version>${druid.version}</version>
                <!--      不兼容Jdk 11 及以上版本，移除依赖 https://github.com/alibaba/druid/issues/3060      -->
                <exclusions>
                    <exclusion>
                        <artifactId>jconsole</artifactId>
                        <groupId>com.sun</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>tools</artifactId>
                        <groupId>com.sun</groupId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!--工具包-->
            <dependency>
                <groupId>cn.hutool</groupId>
                <artifactId>hutool-all</artifactId>
                <version>${hutool.version}</version>
            </dependency>

            <!-- ip2region IP库 -->
            <dependency>
                <groupId>net.dreamlu</groupId>
                <artifactId>mica-ip2region</artifactId>
                <version>${ip2region.version}</version>
            </dependency>

            <!-- excel工具 -->
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi</artifactId>
                <version>${poi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml</artifactId>
                <version>${poi.version}</version>
            </dependency>
            <dependency>
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
                <version>${xerces.version}</version>
            </dependency>

            <!--mapStruct依赖-->
            <dependency>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct</artifactId>
                <version>${mapstruct.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct-processor</artifactId>
                <version>${mapstruct.version}</version>
                <scope>provided</scope>
            </dependency>
            <!--     https://mapstruct.org/news/2022-02-07-mapstruct-spring-extensions-0-1-1-released/       -->
            <dependency>
                <groupId>org.mapstruct.extensions.spring</groupId>
                <artifactId>mapstruct-spring-extensions</artifactId>
                <version>${mapstruct.spring.version}</version>
            </dependency>

            <!--   具体可以看看这个，https://jcp.org/en/jsr/detail?id=330     -->
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>1</version>
            </dependency>

            <!-- Java图形验证码。该项目在gitee上有 -->
            <dependency>
                <groupId>com.github.whvcse</groupId>
                <artifactId>easy-captcha</artifactId>
                <version>1.6.2</version>
            </dependency>
            <!--      滑动验证码      -->
            <dependency>
                <groupId>com.anji-plus</groupId>
                <artifactId>spring-boot-starter-captcha</artifactId>
                <version>1.3.0</version>
            </dependency>

            <!-- 从 Ehcache 到 Guava Cache 再到 Caffeine -->
            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>${caffeine.version}</version>
            </dependency>

            <!-- 解析客户端操作系统、浏览器信息 Yauaa: Yet Another UserAgent Analyzer -->
            <dependency>
                <groupId>nl.basjes.parse.useragent</groupId>
                <artifactId>yauaa</artifactId>
                <version>${yauaa.version}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>commons-collections4</artifactId>
                        <groupId>org.apache.commons</groupId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.github.ben-manes.caffeine</groupId>
                        <artifactId>caffeine</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- logstash -->
            <dependency>
                <groupId>net.logstash.logback</groupId>
                <artifactId>logstash-logback-encoder</artifactId>
                <version>${logstash.version}</version>
                <!-- Use runtime scope if the project does not have any compile-time usage of logstash-logback-encoder,
                    such as usage of StructuredArguments/Markers or implementations such as
                    JsonProvider, AppenderListener, JsonFactoryDecorator, JsonGeneratorDecorator, etc
                <scope>runtime</scope>
                -->
            </dependency>

            <!--图片处理。主要为调整图片的尺寸-->
            <dependency>
                <groupId>net.coobird</groupId>
                <artifactId>thumbnailator</artifactId>
                <version>${thumbnailator.version}</version>
            </dependency>

            <!--
                If you are using logstash-logback-encoder in a project (such as spring-boot) that also declares dependencies on any of the above libraries,
            you might need to tell maven explicitly which versions to use to avoid conflicts. You can do so using maven's dependencyManagement feature.
            For example, to ensure that maven doesn't pick different versions of logback-core, logback-classic, and logback-access, add this to your project's pom.xml
            -->
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-access</artifactId>
                <version>${logback.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <!-- 打包时跳过测试 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <!-- 解决 Java-16下 lombok报错：
            Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x486bcaa) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x486bcaa
            -->
            <plugin>
                <!-- maven-compiler-plugin应该是默认使用的。所以可以不显示的配置。 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <!--<fork>true</fork>-->
                    <!--for unmappable characters in classes-->
                    <!-- <encoding>UTF-8</encoding>-->
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>true</showWarnings>
                    <!--for lombok annotations to resolve-->
                    <!--contradictory to maven, intelliJ fails with this-->
                    <annotationProcessorPaths>
                        <!-- lombok和mapstruct都是编译时的增强，当需要设置执行顺序时，可采用下面的配置，从上到下，上面的先执行 -->
                        <!--4lombok-->
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <!-- Support for Java 16
                            https://github.com/rzwitserloot/lombok/issues/2681#
                            -->
                            <version>${lombok.version}</version>
                        </path>
                        <!--4mapstruct-->
                        <path>
                            <groupId>org.mapstruct</groupId>
                            <artifactId>mapstruct-processor</artifactId>
                            <version>${mapstruct.version}</version>
                        </path>
                        <!--4javadoc-->
                        <path>
                            <groupId>com.github.therapi</groupId>
                            <artifactId>therapi-runtime-javadoc-scribe</artifactId>
                            <version>0.13.0</version>
                        </path>
                    </annotationProcessorPaths>
                    <!--https://docs.spring.io/spring-boot/docs/2.4.4/reference/html/appendix-configuration-metadata.html#configuration-metadata-annotation-processor-->
                    <!--<proc>none</proc>-->
                </configuration>
            </plugin>
            <!--自动发布插件-->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.13</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </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>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <!--For maven package error:  javadoc command: The environment variable JAVA_HOME is not correctly set.-->
                <configuration>
                    <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <!-- java8版本导致javadoc打包编译失败时候,maven-javadoc-plugin大于3.0.0添加-->
                        <configuration>
                            <doclint>none</doclint>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            <!--     Maven JDK9 Jigsaw       -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jmod-plugin</artifactId>
                <version>3.0.0-alpha-1</version>
                <extensions>true</extensions>
            </plugin>
            <!--     Toolchains are ignored, 'javadocExecutable' parameter is set to。这个插件是用来配置maven run的jdk的，当前是通过其他方式配置了     -->
            <!--<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-toolchains-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <?m2e ignore ?>
                        <goals>
                            <goal>toolchain</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <toolchains>
                        <jdk>
                            <version>17</version>
                            <vendor>oracle</vendor>
                        </jdk>
                    </toolchains>
                </configuration>
            </plugin>-->
        </plugins>
    </build>

    <distributionManagement>
        <!--        <repository>-->
        <!--            <id>github</id>-->
        <!--            <name>GitHub OWNER Apache Maven Packages</name>-->
        <!--            <url>https://maven.pkg.github.com/lWoHvYe/eladmin</url>-->
        <!--        </repository>-->
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>
