<?xml version="1.0" encoding="UTF-8"?>

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>
    <modules>
        <module>test</module>
        <module>utils</module>
    </modules>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.5.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.github.jchanghong</groupId>
    <artifactId>parent</artifactId>
    <version>3.0.38</version>
    <packaging>pom</packaging>
    <name>parent</name>
    <description>抽取日常开发常用工具</description>

    <properties>
        <!-- versions -->
        <hutool-all.version>5.2.0</hutool-all.version>
        <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
        <java.version>1.8</java.version>
        <kotlin.version>1.3.70</kotlin.version>
        <experimentalCoroutines>enable</experimentalCoroutines>
        <kotlin.code.style>official</kotlin.code.style>
        <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
        <myexcel.version>3.5.0</myexcel.version>
        <springfox-swagger2.version>2.9.2</springfox-swagger2.version>
        <mybatis-plus-boot-starter.version>3.3.1</mybatis-plus-boot-starter.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.integration</groupId>
            <artifactId>spring-integration-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!--  <dependency>
                  <groupId>de.codecentric</groupId>
                  <artifactId>spring-boot-admin-dependencies</artifactId>
                  <version>${spring-boot-admin.version}</version>
                  <type>pom</type>
                  <scope>import</scope>
              </dependency>-->
        </dependencies>
    </dependencyManagement>

    <issueManagement>
        <system>Github Issue</system>
        <url>https://github.com/jchanghong/utils/issues</url>
    </issueManagement>

    <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>
            <name>jchanghong</name>
            <email>3200601@qq.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/jchanghong/utils.git</connection>
        <developerConnection>scm:git:git@github.com:jchanghong/utils.git</developerConnection>
        <url>git@github.com:jchanghong/utils.git</url>
    </scm>

    <build>
        <pluginManagement>
            <plugins>
                <!--                kotlin compile-->
                <plugin>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-maven-plugin</artifactId>
                    <version>${kotlin.version}</version>
                    <configuration>
                        <args>
                            <arg>-Xjsr305=strict</arg>
                        </args>
                        <compilerPlugins>
                            <plugin>spring</plugin>
                        </compilerPlugins>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.jetbrains.kotlin</groupId>
                            <artifactId>kotlin-maven-allopen</artifactId>
                            <version>${kotlin.version}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>kapt</id>
                            <!--                            <phase>none</phase>-->
                            <goals>
                                <goal>kapt</goal>
                            </goals>
                            <configuration>
                                <sourceDirs>
                                    <sourceDir>src/main/kotlin</sourceDir>
                                    <sourceDir>src/main/java</sourceDir>
                                </sourceDirs>
                                <annotationProcessorPaths>
                                    <!--  <annotationProcessorPath>
                                          <groupId>org.projectlombok</groupId>
                                          <artifactId>lombok</artifactId>
                                          <version>1.18.10</version>
                                      </annotationProcessorPath>-->
                                    <annotationProcessorPath>
                                        <groupId>org.springframework.boot</groupId>
                                        <artifactId>spring-boot-configuration-processor</artifactId>
                                        <version>2.2.2.RELEASE</version>
                                    </annotationProcessorPath>
                                    <!--                                     在此处指定你的注解处理器。-->
                                    <!--  <annotationProcessorPath>
                                        <groupId>com.google.dagger</groupId>
                                        <artifactId>dagger-compiler</artifactId>
                                        <version>2.9</version>
                                      </annotationProcessorPath>-->
                                </annotationProcessorPaths>
                            </configuration>
                        </execution>
                        <execution>
                            <id>compile</id>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                            <configuration>
                                <sourceDirs>
                                    <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
                                    <sourceDir>${project.basedir}/src/main/java</sourceDir>
                                </sourceDirs>
                            </configuration>
                        </execution>
                        <execution>
                            <id>test-compile</id>
                            <goals>
                                <goal>test-compile</goal>
                            </goals>
                            <configuration>
                                <sourceDirs>
                                    <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
                                    <sourceDir>${project.basedir}/src/test/java</sourceDir>
                                </sourceDirs>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <!--                java compile-->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <!--        <version>3.5.1</version>-->
                    <executions>
                        <!-- 替换会被 maven 特别处理的 default-compile -->
                        <execution>
                            <id>default-compile</id>
                            <phase>none</phase>
                        </execution>
                        <!-- 替换会被 maven 特别处理的 default-testCompile -->
                        <execution>
                            <id>default-testCompile</id>
                            <phase>none</phase>
                        </execution>
                        <execution>
                            <id>java-compile</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>java-test-compile</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!--                spring boot-->
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>repackage</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Javadoc Build Tools | Maven | Runner在VM Options中添加-Dfile.encoding=GBK，切记一定是GBK。-->
                <plugin>
                    <groupId>org.jetbrains.dokka</groupId>
                    <artifactId>dokka-maven-plugin</artifactId>
                    <version>0.9.18</version>
                    <configuration>
                        <jdkVersion>8</jdkVersion>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>javadocJar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!--<plugin>
                    <groupId>org.projectlombok</groupId>
                    <artifactId>lombok-maven-plugin</artifactId>
                    <version>1.18.4.0</version>
                    <executions>
                        <execution>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>delombok</goal>
                            </goals>
                        </execution>
                    </executions>

                </plugin>-->
                <!-- Source -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <!--            <version>3.0.1</version>-->
                    <executions>
                        <execution>
                            <id>ossgpt</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Gpg Signature -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                                <version>1.6</version>
                    <executions>
                        <execution>
                            <id>ossgpt</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!--              nexus-staging-maven  -->
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <!--            <version>1.6.8</version>-->
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>oss</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <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>
    <profiles>
        <profile>
            <id>release</id>
            <distributionManagement>
                <!--
                安装openPGB加密。，密钥微云必备，密码123buyao。。。。
                -->
                <!--    &lt;!&ndash;下面加在setting.xml&ndash;&gt;
            &lt;!&ndash;
            <server>
                <id>oss</id>
                <username>jchanghong</username>
                <password>!b58r5gsHu*0</password>
              </server>-->

            </distributionManagement>
            <build>
                <plugins>
                    <!-- Gpg Signature -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <!--              nexus-staging-maven  -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>aliyun_public</id>
            <repositories>
                <repository>
                    <id>aliyun_public</id>
                    <name>aliyun_public</name>
                    <url>https://maven.aliyun.com/repository/public</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>aliyun_public</id>
                    <name>aliyun_public</name>
                    <url>https://maven.aliyun.com/repository/public</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
        <profile>
            <id>aliyun_spring</id>
            <repositories>
                <repository>
                    <id>aliyun_public</id>
                    <name>aliyun_public</name>
                    <url>https://maven.aliyun.com/repository/spring</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>aliyun_public</id>
                    <name>aliyun_public</name>
                    <url>https://maven.aliyun.com/repository/spring</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
    <!--  <repositories>
        <repository>
          <id>jchanghong</id>
          <url>https://maven.aliyun.com/repository/central</url>
        </repository>
      </repositories>-->

    <!--<!-mvn clean deploy -X -DskipTests=true&ndash;&gt;-->
    <!--## deploy项目到本地仓库
  mvn clean deploy -Dmaven.test.skip  -DaltDeploymentRepository=self-mvn-repo::default::file:D:\java项目\maven-repository\repository
    -->
    <!--
      <distributionManagement>
        &lt;!&ndash;下面加在setting.xml&ndash;&gt;
        &lt;!&ndash;
        <server>
            <id>jchanghong</id>
            <username>jchanghong</username>
            <password>!b58r5gsHu*0</password>
          </server>
          <server>
            <id>nexus-snapshots</id>
            <username>jchanghong</username>
            <password>!b58r5gsHu*0</password>
          </server>
          &ndash;&gt;
        <snapshotRepository>
          <id>jchanghong</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        &lt;!&ndash;mvn install:install-file -Dfile=lib/ojdbc8.jar -DgroupId=com.oracle.jdbc -DartifactId=ojdbc8 -Dversion=18 -Dpackaging=jar&ndash;&gt;

        &lt;!&ndash;<repository>&ndash;&gt;
          &lt;!&ndash;<id>jchanghong</id>&ndash;&gt;
          &lt;!&ndash;<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>&ndash;&gt;
        &lt;!&ndash;</repository>&ndash;&gt;
      </distributionManagement>
    -->
</project>
