<?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>3.17.0</version>
    <relativePath>../sofaboot-dependencies</relativePath>
  </parent>
  <groupId>com.alipay.sofa</groupId>
  <artifactId>sofa-boot-parent</artifactId>
  <version>3.17.0</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>
    <junit.vintage.version>5.3.2</junit.vintage.version>
    <common.dbcp.version>1.4</common.dbcp.version>
    <maven.checkstyle.plugin.version>3.1.2</maven.checkstyle.plugin.version>
    <maven.source.plugin>3.0.0</maven.source.plugin>
    <jmockit.version>1.40</jmockit.version>
    <javax.servlet.version>3.1.0</javax.servlet.version>
    <junit.jupiter.version>5.3.2</junit.jupiter.version>
    <maven.java.formatter.plugin>0.4</maven.java.formatter.plugin>
    <tomcat.version>9.0.54</tomcat.version>
    <druid.version>1.0.12</druid.version>
    <maven.surefire.plugin>2.22.2</maven.surefire.plugin>
    <sofa.version.maven.plugin>1.0.1</sofa.version.maven.plugin>
    <junit.version>4.13.1</junit.version>
    <c3p0.version>0.9.1.1</c3p0.version>
    <commons.io.version>2.4</commons.io.version>
    <maven.javadoc.plugin>2.9.1</maven.javadoc.plugin>
    <undertow-core>2.1.3.Final</undertow-core>
    <main.user.dir>${basedir}/../..</main.user.dir>
    <java.version>1.8</java.version>
    <license.maven.plugin>3.0</license.maven.plugin>
    <HikariCP.java6.version>2.3.8</HikariCP.java6.version>
    <maven.pmd.plugin.version>3.13.0</maven.pmd.plugin.version>
    <spring.cloud.starter.openfeign.version>3.0.5</spring.cloud.starter.openfeign.version>
    <rocketmq.spring.boot.starter.version>2.0.2</rocketmq.spring.boot.starter.version>
    <project.encoding>UTF-8</project.encoding>
    <jacoco.maven.plugin>0.8.7</jacoco.maven.plugin>
    <jetty.version>9.4.26.v20200117</jetty.version>
    <spring.cloud.stream.version>2.1.0.RELEASE</spring.cloud.stream.version>
    <junit.platform.version>1.3.2</junit.platform.version>
    <maven.compiler.plugin>3.1</maven.compiler.plugin>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-openfeign</artifactId>
        <version>${spring.cloud.starter.openfeign.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-stream</artifactId>
        <version>${spring.cloud.stream.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.rocketmq</groupId>
        <artifactId>rocketmq-spring-boot-starter</artifactId>
        <version>${rocketmq.spring.boot.starter.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>${javax.servlet.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.tomcat.embed</groupId>
        <artifactId>tomcat-embed-core</artifactId>
        <version>${tomcat.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-server</artifactId>
        <version>${jetty.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-webapp</artifactId>
        <version>${jetty.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>io.undertow</groupId>
        <artifactId>undertow-core</artifactId>
        <version>${undertow.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons.io.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.zaxxer</groupId>
        <artifactId>HikariCP-java6</artifactId>
        <version>${HikariCP.java6.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid</artifactId>
        <version>${druid.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>c3p0</groupId>
        <artifactId>c3p0</artifactId>
        <version>${c3p0.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>commons-dbcp</groupId>
        <artifactId>commons-dbcp</artifactId>
        <version>${common.dbcp.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jmockit</groupId>
        <artifactId>jmockit</artifactId>
        <version>${jmockit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${junit.jupiter.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>${junit.jupiter.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.vintage</groupId>
        <artifactId>junit-vintage-engine</artifactId>
        <version>${junit.vintage.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <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>
        <version>${license.maven.plugin}</version>
        <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>
        <version>${maven.java.formatter.plugin}</version>
        <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>
        <version>${maven.pmd.plugin.version}</version>
        <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>
        <version>${maven.checkstyle.plugin.version}</version>
        <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>
        <groupId>com.alipay.sofa</groupId>
        <artifactId>sofa-version-maven-plugin</artifactId>
        <version>${sofa.version.maven.plugin}</version>
        <executions>
          <execution>
            <goals>
              <goal>gen</goal>
              <goal>write</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <dotGitDirectory>${main.user.dir}/.git</dotGitDirectory>
          <defaultPropertiesFileEntries>
            <Doc-Url>http://www.sofastack.tech/sofa-boot/docs/Home</Doc-Url>
          </defaultPropertiesFileEntries>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.compiler.plugin}</version>
        <configuration>
          <encoding>${project.encoding}</encoding>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven.source.plugin}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </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>
        <version>${jacoco.maven.plugin}</version>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <phase>test</phase>
            <goals>
              <goal>report-aggregate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <skip>false</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>jdk8</id>
      <activation>
        <jdk>1.8</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${maven.surefire.plugin}</version>
            <dependencies>
              <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm</artifactId>
                <version>6.2</version>
              </dependency>
            </dependencies>
            <configuration>
              <runOrder>alphabetical</runOrder>
              <reuseForks>false</reuseForks>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jdk11</id>
      <activation>
        <jdk>11</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${maven.surefire.plugin}</version>
            <dependencies>
              <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm</artifactId>
                <version>6.2</version>
              </dependency>
            </dependencies>
            <configuration>
              <reuseForks>false</reuseForks>
              <argLine>@{argLine} -Djdk.attach.allowAttachSelf --add-opens java.base/jdk.internal.loader=ALL-UNNAMED</argLine>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <additionalOptions>-source 8</additionalOptions>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
