<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.alipay.sofa</groupId>
    <artifactId>sofaboot-dependencies</artifactId>
    <version>4.4.1</version>
    <relativePath>../sofaboot-dependencies</relativePath>
  </parent>
  <groupId>com.alipay.sofa</groupId>
  <artifactId>sofa-boot-parent</artifactId>
  <version>4.4.1</version>
  <packaging>pom</packaging>
  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <properties>
    <main.user.dir>${basedir}/../..</main.user.dir>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>${flatten-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>resolveCiFriendliesOnly</flattenMode>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>remove</goal>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <quiet>true</quiet>
          <header>${main.user.dir}/tools/HEADER</header>
          <includes>
            <include>**/src/main/java/**</include>
            <include>**/src/test/java/**</include>
          </includes>
          <strictCheck>true</strictCheck>
          <mapping>
            <java>SLASHSTAR_STYLE</java>
          </mapping>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.googlecode.maven-java-formatter-plugin</groupId>
        <artifactId>maven-java-formatter-plugin</artifactId>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <configFile>${main.user.dir}/tools/Formatter.xml</configFile>
          <encoding>${project.encoding}</encoding>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-pmd-plugin</artifactId>
        <executions>
          <execution>
            <id>check</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <printFailingErrors>true</printFailingErrors>
          <linkXRef>false</linkXRef>
          <includeTests>true</includeTests>
          <rulesets>
            <ruleset>${main.user.dir}/tools/pmd-ruleset.xml</ruleset>
          </rulesets>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <executions>
          <execution>
            <id>checkstyle</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <failOnViolation>true</failOnViolation>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>8.42</version>
          </dependency>
        </dependencies>
        <configuration>
          <configLocation>${main.user.dir}/tools/check-style.xml</configLocation>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <encoding>${project.encoding}</encoding>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <compilerArgs>
            <arg>-parameters</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <reuseForks>false</reuseForks>
          <includes>
            <include>**/*Tests.java</include>
            <include>**/*Test.java</include>
          </includes>
          <excludes>
            <exclude>**/**TestBase.java</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>com/alipay/sofa/smoke/tests/**</exclude>
            <exclude>com/alipay/sofa/common/xmap/**</exclude>
          </excludes>
          <skip>false</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
