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

  <parent>
    <groupId>io.github.dunwu</groupId>
    <artifactId>dunwu-parent</artifactId>
    <version>1.0.3</version>
    <relativePath>../dunwu-parent/pom.xml</relativePath>
  </parent>

  <groupId>io.github.dunwu.boot</groupId>
  <artifactId>dunwu-boot</artifactId>
  <version>1.0.3</version>
  <packaging>pom</packaging>
  <name>${project.artifactId}</name>
  <description>dunwu spring boot 通用 pom</description>
  <url>https://github.com/dunwu/dunwu-framework/dunwu-boot</url>

  <modules>
    <module>dunwu-autoconfigure</module>
    <module>dunwu-starter-dlock</module>
    <module>dunwu-starter-hdfs</module>
    <module>dunwu-starter-mail</module>
    <module>dunwu-starter-mybatis</module>
    <module>dunwu-starter-web</module>
  </modules>

  <properties>
    <dunwu-boot.version>1.0.3</dunwu-boot.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.github.dunwu.tool</groupId>
        <artifactId>dunwu-tool</artifactId>
        <version>1.0.3</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>io.github.dunwu.boot</groupId>
        <artifactId>dunwu-autoconfigure</artifactId>
        <version>${dunwu-boot.version}</version>
      </dependency>
      <dependency>
        <groupId>io.github.dunwu.boot</groupId>
        <artifactId>dunwu-starter-dlock</artifactId>
        <version>${dunwu-boot.version}</version>
      </dependency>
      <dependency>
        <groupId>io.github.dunwu.boot</groupId>
        <artifactId>dunwu-starter-hdfs</artifactId>
        <version>${dunwu-boot.version}</version>
      </dependency>
      <dependency>
        <groupId>io.github.dunwu.boot</groupId>
        <artifactId>dunwu-starter-mail</artifactId>
        <version>${dunwu-boot.version}</version>
      </dependency>
      <dependency>
        <groupId>io.github.dunwu.boot</groupId>
        <artifactId>dunwu-starter-mybatis</artifactId>
        <version>${dunwu-boot.version}</version>
      </dependency>
      <dependency>
        <groupId>io.github.dunwu.boot</groupId>
        <artifactId>dunwu-starter-web</artifactId>
        <version>${dunwu-boot.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven-checkstyle-plugin.version}</version>
        <executions>
          <execution>
            <id>checkstyle-validation</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <skip>true</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-rules</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <bannedDependencies>
                  <excludes>
                    <exclude>commons-logging:*:*</exclude>
                    <exclude>org.hibernate:hibernate-validator:*</exclude>
                  </excludes>
                  <searchTransitive>true</searchTransitive>
                </bannedDependencies>
                <dependencyConvergence />
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.basepom.maven</groupId>
        <artifactId>duplicate-finder-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>duplicate-dependencies</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <failBuildInCaseOfConflict>false</failBuildInCaseOfConflict>
              <useDefaultResourceIgnoreList>true</useDefaultResourceIgnoreList>
              <ignoredClassPatterns>
                <ignoredClassPattern>.*module-info</ignoredClassPattern>
              </ignoredClassPatterns>
              <ignoredResourcePatterns>
                <ignoredResourcePattern>changelog.txt</ignoredResourcePattern>
              </ignoredResourcePatterns>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
            <manifest>
              <addDefaultImplementationEntries>false</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
            </manifest>
            <manifestEntries>
              <Implementation-Title>${project.name}</Implementation-Title>
              <Implementation-Version>${project.version}</Implementation-Version>
              <Built-By>Dunwu</Built-By>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
          <charset>UTF-8</charset>
          <docencoding>UTF-8</docencoding>
          <additionalJOption>-Xdoclint:none</additionalJOption>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <inherited>true</inherited>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>process-sources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/classes</outputDirectory>
              <resources>
                <resource>
                  <directory>${basedir}/src/main/java</directory>
                  <includes>
                    <include>**/*.xml</include>
                    <include>**/*.json</include>
                    <include>**/*.dat</include>
                    <include>**/*.db</include>
                  </includes>
                </resource>
                <resource>
                  <directory>${basedir}/src/main/resources</directory>
                  <includes>
                    <include>**/*.xml</include>
                    <include>**/*.json</include>
                    <include>**/*.dat</include>
                    <include>**/*.db</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </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>
    </plugins>
  </build>

  <inceptionYear>2018 - Now</inceptionYear>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>
  <scm>
    <url>https://github.com/dunwu/dunwu-framework</url>
    <connection>git@github.com:dunwu/dunwu-framework.git</connection>
    <developerConnection>https://github.com/dunwu-framework</developerConnection>
  </scm>
  <developers>
    <developer>
      <name>Zhang Peng</name>
      <url>https://github.com/dunwu</url>
      <email>forbreak@163.com</email>
      <timezone>+8</timezone>
    </developer>
  </developers>
  <issueManagement>
    <system>Github</system>
    <url>https://github.com/dunwu/dunwu-framework/issues</url>
  </issueManagement>
</project>
