<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You 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 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>31</version>
  </parent>

  <groupId>org.apache.dubbo</groupId>
  <artifactId>dubbo-parent</artifactId>
  <version>${revision}</version>
  <packaging>pom</packaging>

  <name>${project.artifactId}</name>
  <description>The parent project of dubbo</description>
  <url>https://github.com/apache/dubbo</url>
  <inceptionYear>2011</inceptionYear>

  <organization>
    <name>The Apache Software Foundation</name>
    <url>http://www.apache.org/</url>
  </organization>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>dubbo.io</id>
      <name>The Dubbo Project Contributors</name>
      <email>dev-subscribe@dubbo.apache.org</email>
      <url>http://dubbo.apache.org/</url>
    </developer>
  </developers>
  <mailingLists>
    <mailingList>
      <name>Development List</name>
      <subscribe>dev-subscribe@dubbo.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@dubbo.apache.org</unsubscribe>
      <post>dev@dubbo.apache.org</post>
    </mailingList>
    <mailingList>
      <name>Commits List</name>
      <subscribe>commits-subscribe@dubbo.apache.org</subscribe>
      <unsubscribe>commits-unsubscribe@dubbo.apache.org</unsubscribe>
      <post>commits@dubbo.apache.org</post>
    </mailingList>
    <mailingList>
      <name>Issues List</name>
      <subscribe>issues-subscribe@dubbo.apache.org</subscribe>
      <unsubscribe>issues-unsubscribe@dubbo.apache.org</unsubscribe>
      <post>issues@dubbo.apache.org</post>
    </mailingList>
  </mailingLists>

  <modules>
    <module>dubbo-common</module>
    <module>dubbo-remoting</module>
    <module>dubbo-rpc</module>
    <module>dubbo-cluster</module>
    <module>dubbo-registry</module>
    <module>dubbo-configcenter</module>
    <module>dubbo-config</module>
    <module>dubbo-serialization</module>
    <module>dubbo-compatible</module>
    <module>dubbo-dependencies-bom</module>
    <module>dubbo-metadata</module>
    <module>dubbo-metrics</module>
    <module>dubbo-test</module>
    <module>dubbo-maven-plugin</module>
    <module>dubbo-spring-boot-project/dubbo-spring-boot-actuator</module>
    <module>dubbo-spring-boot-project/dubbo-spring-boot-autoconfigure</module>
    <module>dubbo-spring-boot-project/dubbo-spring-boot-compatible</module>
    <module>dubbo-spring-boot-project/dubbo-spring-boot-starters</module>
    <module>dubbo-spring-boot-project/dubbo-spring-boot</module>
    <module>dubbo-spring-boot-project/dubbo-spring-boot-actuator-autoconfigure</module>
    <module>dubbo-plugin/dubbo-qos</module>
    <module>dubbo-plugin/dubbo-auth</module>
    <module>dubbo-plugin/dubbo-reactive</module>
    <module>dubbo-plugin/dubbo-security</module>
    <module>dubbo-plugin/dubbo-spring-security</module>
    <module>dubbo-plugin/dubbo-qos-api</module>
    <module>dubbo-plugin/dubbo-native</module>
    <module>dubbo-plugin/dubbo-compiler</module>
    <module>dubbo-plugin/dubbo-filter-cache</module>
    <module>dubbo-plugin/dubbo-filter-validation</module>
    <module>dubbo-plugin/dubbo-rest-jaxrs</module>
    <module>dubbo-plugin/dubbo-rest-spring</module>
    <module>dubbo-plugin/dubbo-rest-openapi</module>
    <module>dubbo-plugin/dubbo-triple-servlet</module>
    <module>dubbo-plugin/dubbo-triple-websocket</module>
    <module>dubbo-demo/dubbo-demo-api</module>
    <module>dubbo-demo/dubbo-demo-spring-boot</module>
    <module>dubbo-demo/dubbo-demo-spring-boot-idl</module>
  </modules>

  <scm>
    <connection>scm:git:https://github.com/apache/dubbo.git</connection>
    <developerConnection>scm:git:https://github.com/apache/dubbo.git</developerConnection>
    <tag>HEAD</tag>
    <url>https://github.com/apache/dubbo</url>
  </scm>

  <issueManagement>
    <system>Github Issues</system>
    <url>https://github.com/apache/dubbo/issues</url>
  </issueManagement>

  <properties>
    <!-- Build args -->
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.build.outputTimestamp>2020-04-01T08:04:00Z</project.build.outputTimestamp>
    <argline>-server -Xms256m -Xmx512m -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m -Dfile.encoding=UTF-8
      -Djava.net.preferIPv4Stack=true</argline>
    <arguments />
    <profile.name>oss</profile.name>
    <updateReleaseInfo>true</updateReleaseInfo>
    <skip_maven_deploy>false</skip_maven_deploy>
    <checkstyle.skip>true</checkstyle.skip>
    <checkstyle_unix.skip>true</checkstyle_unix.skip>
    <rat.skip>true</rat.skip>
    <jacoco.skip>true</jacoco.skip>
    <spotless.action>check</spotless.action>

    <!-- Maven plugins -->
    <maven_jar_version>3.4.2</maven_jar_version>
    <maven_surefire_version>3.5.2</maven_surefire_version>
    <maven_deploy_version>3.1.3</maven_deploy_version>
    <maven_shade_version>3.6.0</maven_shade_version>
    <maven_compiler_version>3.14.0</maven_compiler_version>
    <maven_source_version>3.3.1</maven_source_version>
    <maven_javadoc_version>3.11.2</maven_javadoc_version>
    <maven_checkstyle_version>3.6.0</maven_checkstyle_version>
    <build_helper_maven_plugin_version>3.6.0</build_helper_maven_plugin_version>
    <maven_jacoco_version>0.8.12</maven_jacoco_version>
    <maven_flatten_version>1.6.0</maven_flatten_version>
    <maven_enforce_version>3.5.0</maven_enforce_version>
    <maven_antrun_version>3.1.0</maven_antrun_version>
    <maven_os_plugin_version>1.7.1</maven_os_plugin_version>
    <maven_protobuf_plugin_version>0.6.1</maven_protobuf_plugin_version>
    <maven_gmavenplus_version>3.0.2</maven_gmavenplus_version>

    <!-- For unify spring boot 3 version -->
    <spring-6.version>6.2.3</spring-6.version>
    <spring-boot-3.version>3.4.3</spring-boot-3.version>

    <protobuf-protoc_version>3.22.3</protobuf-protoc_version>
    <grpc_version>1.54.0</grpc_version>
    <spotless-maven-plugin.version>2.44.3</spotless-maven-plugin.version>
    <dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
    <palantirJavaFormat.version>2.38.0</palantirJavaFormat.version>
    <revision>3.3.4</revision>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.dubbo</groupId>
        <artifactId>dubbo-dependencies-bom</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!--JUnit Jupiter Engine to depend on the JUnit5 engine and JUnit 5 API -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-inline</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <!-- Used for packaging NOTICE & LICENSE to each sub-module jar-->
    <resources>
      <resource>
        <filtering>false</filtering>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <targetPath>META-INF/</targetPath>
        <filtering>false</filtering>
        <directory>${maven.multiModuleProjectDirectory}</directory>
        <includes>
          <include>NOTICE</include>
          <include>LICENSE</include>
        </includes>
      </resource>
      <resource>
        <targetPath>META-INF/dubbo-versions</targetPath>
        <filtering>false</filtering>
        <directory>${maven.multiModuleProjectDirectory}</directory>
        <includes>
          <include>.artifacts</include>
        </includes>
      </resource>
    </resources>

    <pluginManagement>
      <plugins>
        <!-- keep surefire and failsafe in sync -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven_surefire_version}</version>
          <configuration>
            <!-- Activate the use of TCP to transmit events to the plugin to fix Corrupted STDOUT issue -->
            <forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory" />
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${build_helper_maven_plugin_version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>${maven_shade_version}</version>
          <configuration>
            <createDependencyReducedPom>false</createDependencyReducedPom>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>${maven_antrun_version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.dubbo</groupId>
          <artifactId>dubbo-maven-plugin</artifactId>
          <version>${project.version}</version>
          <executions>
            <execution>
              <id>generate-stubs</id>
              <goals>
                <goal>compile</goal>
              </goals>
              <phase>generate-sources</phase>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven_jar_version}</version>
        <configuration>
          <archive>
            <addMavenDescriptor>true</addMavenDescriptor>
            <index>true</index>
            <manifest>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
              <Specification-Version>${project.version}</Specification-Version>
              <Implementation-Version>${project.version}</Implementation-Version>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${maven_jacoco_version}</version>
        <executions>
          <execution>
            <id>jacoco-initialize</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report-aggregate</id>
            <goals>
              <goal>report</goal>
              <goal>report-aggregate</goal>
            </goals>
            <phase>verify</phase>
            <configuration>
              <includes>
                <include>target/classes/**/*</include>
                <include>target/classes/**</include>
                <include>**/*</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <useSystemClassLoader>true</useSystemClassLoader>
          <forkCount>1</forkCount>
          <systemProperties>
            <!-- common shared -->
          </systemProperties>
          <!-- Activate the use of TCP to transmit events to the plugin to fix Corrupted STDOUT issue -->
          <forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory" />
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <version>${maven_gmavenplus_version}</version>
        <configuration>
          <parameters>true</parameters>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>${maven_deploy_version}</version>
        <configuration>
          <skip>${skip_maven_deploy}</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven_compiler_version}</version>
        <configuration>
          <compilerArgs>
            <compilerArg>-proc:none</compilerArg>
            <compilerArg>-parameters</compilerArg>
          </compilerArgs>
          <fork>true</fork>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>get-version-infos</id>
            <goals>
              <goal>run</goal>
            </goals>
            <phase>compile</phase>
            <configuration>
              <failOnError>true</failOnError>
              <target>
                <property name="version_file" value="${project.build.outputDirectory}/META-INF/dubbo-versions/${project.artifactId}" />
                <!-- get the current version of dubbo -->
                <echo file="${version_file}" message="revision=${revision}${line.separator}" />
                <!-- attach the artifact id -->
                <echo append="true" file="${version_file}" message="artifact.id=${project.artifactId}${line.separator}" />
                <echo append="true" file="${version_file}" message="git.commit.id=" />
                <!-- get the latest commit id -->
                <exec append="true" error="${project.build.directory}/.git.exec.error" executable="git" failifexecutionfails="false" output="${version_file}" timeout="3000">
                  <arg line="rev-parse HEAD" />
                </exec>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.1.1</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
          <arguments>${arguments}</arguments>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>${maven_flatten_version}</version>
        <configuration>
          <updatePomFile>true</updatePomFile>
          <flattenMode>oss</flattenMode>
        </configuration>
        <executions>
          <execution>
            <id>flatten</id>
            <goals>
              <goal>flatten</goal>
            </goals>
            <phase>process-resources</phase>
          </execution>
          <execution>
            <id>flatten.clean</id>
            <goals>
              <goal>clean</goal>
            </goals>
            <phase>clean</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>snapshot-ci-deploy</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>${maven_enforce_version}</version>
            <executions>
              <execution>
                <id>enforce-no-releases</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireSnapshotVersion>
                      <message>No Releases Allowed!</message>
                      <failWhenParentIsRelease>false</failWhenParentIsRelease>
                    </requireSnapshotVersion>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>javadoc-lint</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <properties>
        <doclint>none</doclint>
      </properties>
    </profile>
    <profile>
      <id>jdk-version-ge-17</id>
      <activation>
        <jdk>[17,)</jdk>
      </activation>
      <modules>
        <module>dubbo-spring-boot-project/dubbo-spring-boot-3-autoconfigure</module>
      </modules>
    </profile>
    <!-- jacoco: mvn validate -Pjacoco  -->
    <profile>
      <id>jacoco</id>
      <properties>
        <jacoco.skip>false</jacoco.skip>
      </properties>
    </profile>

    <!-- check code style: mvn validate -Pcheckstyle  -->
    <profile>
      <id>checkstyle</id>
      <properties>
        <checkstyle.skip>false</checkstyle.skip>
        <checkstyle_unix.skip>false</checkstyle_unix.skip>
      </properties>
    </profile>
    <profile>
      <id>checkstyle_def</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>${maven_checkstyle_version}</version>
            <dependencies>
              <dependency>
                <groupId>com.puppycrawl.tools</groupId>
                <artifactId>checkstyle</artifactId>
                <version>8.45.1</version>
              </dependency>
              <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>dubbo-shared-resources</artifactId>
                <version>1.0.0</version>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <id>checkstyle-validation</id>
                <goals>
                  <goal>check</goal>
                </goals>
                <phase>validate</phase>
                <configuration>
                  <configLocation>codestyle/checkstyle.xml</configLocation>
                  <suppressionsLocation>codestyle/checkstyle-suppressions.xml</suppressionsLocation>
                  <consoleOutput>true</consoleOutput>
                  <failOnViolation>true</failOnViolation>
                  <skip>${checkstyle.skip}</skip>
                  <excludes>**/JSONWriter.java,
                                        **/org/apache/dubbo/maven/plugin/aot/AbstractAotMojo.java,
                                        **/org/apache/dubbo/maven/plugin/aot/AbstractDependencyFilterMojo.java,
                                        **/org/apache/dubbo/maven/plugin/aot/CommandLineBuilder.java,
                                        **/org/apache/dubbo/maven/plugin/aot/DependencyFilter.java,
                                        **/org/apache/dubbo/maven/plugin/aot/Exclude.java,
                                        **/org/apache/dubbo/maven/plugin/aot/ExcludeFilter.java,
                                        **/org/apache/dubbo/maven/plugin/aot/FilterableDependency.java,
                                        **/org/apache/dubbo/maven/plugin/aot/Include.java,
                                        **/org/apache/dubbo/maven/plugin/aot/IncludeFilter.java,
                                        **/org/apache/dubbo/maven/plugin/aot/JavaCompilerPluginConfiguration.java,
                                        **/org/apache/dubbo/maven/plugin/aot/JavaExecutable.java,
                                        **/org/apache/dubbo/maven/plugin/aot/JavaProcessExecutor.java,
                                        **/org/apache/dubbo/maven/plugin/aot/MatchingGroupIdFilter.java,
                                        **/org/apache/dubbo/maven/plugin/aot/RunArguments.java,
                                        **/org/apache/dubbo/maven/plugin/aot/RunProcess.java,
                                        **/org/apache/dubbo/aot/generate/BasicJsonWriter.java,
                                        **/org/apache/dubbo/aot/api/ExecutableMode.java,
                                        **/org/apache/dubbo/aot/api/MemberCategory.java,
                                        **/org/apache/dubbo/common/threadpool/serial/SerializingExecutor.java,
                                        **/org/apache/dubbo/common/threadlocal/InternalThreadLocal.java,
                                        **/org/apache/dubbo/common/threadlocal/InternalThreadLocalMap.java,
                                        **/org/apache/dubbo/common/timer/TimerTask.java,
                                        **/org/apache/dubbo/common/timer/Timer.java,
                                        **/org/apache/dubbo/common/timer/Timeout.java,
                                        **/org/apache/dubbo/common/timer/HashedWheelTimer.java,
                                        **/org/apache/dubbo/common/utils/CIDRUtils.java,
                                        **/org/apache/dubbo/common/utils/Utf8Utils.java,
                                        **/org/apache/dubbo/common/serialize/protobuf/support/wrapper/MapValue.java,
                                        **/org/apache/dubbo/common/serialize/protobuf/support/wrapper/ThrowablePB.java,
                                        **/org/apache/dubbo/test/common/utils/TestSocketUtils.java,
                                        **/org/apache/dubbo/triple/TripleWrapper.java,
                                        **/org/apache/dubbo/rpc/protocol/tri/TriHttp2RemoteFlowController.java,
                                        **/org/apache/dubbo/rpc/protocol/tri/rest/cors/CorsHeaderFilter.java,
                                        **/org/apache/dubbo/metrics/aggregate/DubboMergingDigest.java,
                                        **/org/apache/dubbo/metrics/aggregate/DubboAbstractTDigest.java,
                                        **/org/apache/dubbo/common/logger/helpers/FormattingTuple.java,
                                        **/org/apache/dubbo/common/logger/helpers/MessageFormatter.java,
                                        **/org/apache/dubbo/maven/plugin/protoc/DubboProtocCompilerMojo.java,
                                        **/org/apache/dubbo/gen/utils/ProtoTypeMap.java,
                                        **/istio/v1/auth/**/*,
                                        **/com/google/rpc/*,
                                        **/generated/**/*,
                                        **/generated-sources/**/*,
                                        **/grpc/health/**/*,
                                        **/grpc/reflection/**/*,
                                        **/target/**/*,
                                        **/*.json</excludes>
                </configuration>
              </execution>
              <execution>
                <id>checkstyle-unix-validation</id>
                <goals>
                  <goal>check</goal>
                </goals>
                <phase>validate</phase>
                <configuration>
                  <configLocation>codestyle/checkstyle_unix.xml</configLocation>
                  <consoleOutput>true</consoleOutput>
                  <failOnViolation>true</failOnViolation>
                  <skip>${checkstyle_unix.skip}</skip>
                  <resourceExcludes>**/target/**/*,
                    **/generated/**/*,
                    **/generated-sources/**/*</resourceExcludes>
                  <excludes>**/target/**/*</excludes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sources</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven_source_version}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release</id>
      <modules>
        <module>dubbo-spring-boot-project/dubbo-spring-boot-3-autoconfigure</module>
        <module>dubbo-plugin/dubbo-plugin-loom</module>
        <module>dubbo-distribution/dubbo-all</module>
        <module>dubbo-distribution/dubbo-all-shaded</module>
        <module>dubbo-distribution/dubbo-apache-release</module>
        <module>dubbo-distribution/dubbo-bom</module>
        <module>dubbo-distribution/dubbo-core-spi</module>
      </modules>
      <properties>
        <log4j2_version>2.17.2</log4j2_version>
        <jacoco.skip>false</jacoco.skip>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven_source_version}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven_javadoc_version}</version>
            <configuration>
              <show>public</show>
              <charset>UTF-8</charset>
              <encoding>UTF-8</encoding>
              <docencoding>UTF-8</docencoding>
              <failOnError>false</failOnError>
              <links>
                <link>https://docs.oracle.com/javase/8/docs/api</link>
              </links>
              <doclint>none</doclint>
              <excludePackageNames>org.apache.dubbo.demo,org.apache.dubbo.demo.*</excludePackageNames>
              <doctitle>Apache Dubbo ${project.version} API</doctitle>
              <windowtitle>Apache Dubbo ${project.version} API</windowtitle>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadoc</id>
                <goals>
                  <goal>jar</goal>
                  <goal>aggregate</goal>
                </goals>
                <configuration>
                  <additionalDependencies>
                    <additionalDependency>
                      <groupId>org.apache.logging.log4j</groupId>
                      <artifactId>log4j-api</artifactId>
                      <version>${log4j2_version}</version>
                    </additionalDependency>
                    <additionalDependency>
                      <groupId>org.apache.logging.log4j</groupId>
                      <artifactId>log4j-core</artifactId>
                      <version>${log4j2_version}</version>
                    </additionalDependency>
                  </additionalDependencies>
                  <doclint>none</doclint>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>licenseCheck</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>2.5.0</version>
            <executions>
              <execution>
                <id>license-check</id>
                <goals>
                  <goal>add-third-party</goal>
                </goals>
                <phase>generate-sources</phase>
                <configuration>
                  <includeOptional>false</includeOptional>
                  <useMissingFile>false</useMissingFile>
                  <failOnMissing>false</failOnMissing>
                  <licenseMerges>
                    <licenseMerge>Apache License, Version 2.0|The Apache Software License, Version
                                            2.0|ASF 2.0|Apache 2|Apache-2.0|Apache 2.0 License|Apache 2.0|Apache License v2.0|Apache License 2.0|The Apache License, Version 2.0|The Apache Software License, Version 2.0</licenseMerge>
                    <licenseMerge>The MIT License|MIT License</licenseMerge>
                    <licenseMerge>The 3-Clause BSD License|New BSD License|3-Clause BSD
                                            License|BSD|3-Clause BSD License|The New BSD License</licenseMerge>
                  </licenseMerges>
                  <excludes>**/org/apache/dubbo/common/logger/helpers/FormattingTuple.java,
                                        **/org/apache/dubbo/common/logger/helpers/MessageFormatter.java</excludes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jdk15ge-add-open</id>
      <activation>
        <jdk>[15,</jdk>
      </activation>
      <properties>
        <argLine>--add-opens java.base/java.lang=ALL-UNNAMED
          --add-opens java.base/java.math=ALL-UNNAMED
          --add-opens java.base/java.util=ALL-UNNAMED</argLine>
      </properties>
    </profile>
    <profile>
      <id>jdk15ge-simple</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <useSystemClassLoader>true</useSystemClassLoader>
              <forkCount>1</forkCount>
              <systemProperties>
                <!-- common shared -->
              </systemProperties>
              <!-- Activate the use of TCP to transmit events to the plugin to fix Corrupted STDOUT issue -->
              <forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory" />
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>jdk9-compile</id>
      <activation>
        <jdk>[1.9,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <release>8</release>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>jdk9-jdk11-spotless</id>
      <activation>
        <jdk>[1.8, 11)</jdk>
      </activation>
      <properties>
        <palantirJavaFormat.version>1.1.0</palantirJavaFormat.version>
      </properties>
    </profile>

    <profile>
      <id>jdk11-jdk21-spotless</id>
      <activation>
        <jdk>[11, 21)</jdk>
      </activation>
      <properties>
        <palantirJavaFormat.version>2.28.0</palantirJavaFormat.version>
      </properties>
    </profile>

    <profile>
      <id>jdk21-spotless</id>
      <activation>
        <jdk>[21,)</jdk>
      </activation>
      <properties>
        <palantirJavaFormat.version>2.39.0</palantirJavaFormat.version>
      </properties>
    </profile>

    <profile>
      <id>java11+</id>
      <activation>
        <jdk>[11,)</jdk>
      </activation>
      <build>
        <!--- newer versions of plugins requires JDK 11 -->
        <plugins>
          <plugin>
            <groupId>com.diffplug.spotless</groupId>
            <artifactId>spotless-maven-plugin</artifactId>
            <version>${spotless-maven-plugin.version}</version>
            <configuration>
              <java>
                <excludes>
                  <exclude>src/main/java/org/apache/dubbo/common/threadlocal/InternalThreadLocal.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/common/threadlocal/InternalThreadLocalMap.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/common/timer/HashedWheelTimer.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/common/timer/Timeout.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/common/timer/Timer.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/common/timer/TimerTask.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/common/utils/CIDRUtils.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/common/utils/Utf8Utils.java</exclude>
                  <exclude>src/test/java/org/apache/dubbo/config/spring/EmbeddedZooKeeper.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/test/common/utils/TestSocketUtils.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/rpc/protocol/tri/TriHttp2RemoteFlowController.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/cors/CorsHeaderFilter.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/common/threadpool/serial/SerializingExecutor.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/AbstractAotMojo.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/AbstractDependencyFilterMojo.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/CommandLineBuilder.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/DependencyFilter.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/Exclude.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/ExcludeFilter.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/FilterableDependency.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/Include.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/IncludeFilter.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/JavaCompilerPluginConfiguration.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/JavaExecutable.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/JavaProcessExecutor.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/MatchingGroupIdFilter.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/RunArguments.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/aot/RunProcess.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/aot/generate/BasicJsonWriter.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/aot/api/ExecutableMode.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/aot/api/MemberCategory.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/metrics/aggregate/DubboMergingDigest.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/metrics/aggregate/DubboAbstractTDigest.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/common/logger/helpers/FormattingTuple.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/common/logger/helpers/MessageFormatter.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/maven/plugin/protoc/DubboProtocCompilerMojo.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/gen/utils/ProtoTypeMap.java</exclude>
                  <exclude>src/main/java/org/apache/dubbo/spring/boot/autoconfigure/DubboTriple3AutoConfiguration.java</exclude>
                  <exclude>**/generated-sources/**</exclude>
                </excludes>
                <palantirJavaFormat>
                  <version>${palantirJavaFormat.version}</version>
                </palantirJavaFormat>
                <removeUnusedImports />
                <importOrder>
                  <file>dubbo-importorder.txt</file>
                </importOrder>
                <licenseHeader>
                  <file>checkstyle-header.txt</file>
                </licenseHeader>
              </java>
              <pom>
                <sortPom>
                  <expandEmptyElements>false</expandEmptyElements>
                  <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
                </sortPom>
              </pom>
              <upToDateChecking>
                <enabled>true</enabled>
              </upToDateChecking>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>dubbo-shared-resources</artifactId>
                <version>${dubbo-shared-resources.version}</version>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <goals>
                  <goal>${spotless.action}</goal>
                </goals>
                <phase>process-sources</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>skip-spotless</id>
      <properties>
        <spotless.skip>true</spotless.skip>
      </properties>
    </profile>
    <profile>
      <id>loom</id>
      <activation>
        <jdk>[21,)</jdk>
      </activation>
      <modules>
        <module>dubbo-plugin/dubbo-plugin-loom</module>
      </modules>
    </profile>
    <profile>
      <id>dubbo-core-spi</id>
      <modules>
        <module>dubbo-distribution/dubbo-core-spi</module>
      </modules>
    </profile>
    <profile>
      <id>dubbo-all</id>
      <activation>
        <jdk>[1.7,)</jdk>
      </activation>
      <modules>
        <module>dubbo-distribution/dubbo-all</module>
        <module>dubbo-distribution/dubbo-bom</module>
      </modules>
    </profile>
    <profile>
      <id>spring-6</id>
      <dependencyManagement>
        <dependencies>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-indexer</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core-test</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-instrument</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jcl</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring-6.version}</version>
          </dependency>
        </dependencies>
      </dependencyManagement>
    </profile>
    <profile>
      <id>spring-boot-3</id>
      <properties>
        <tomcat.version>10.1.36</tomcat.version>
      </properties>
      <dependencyManagement>
        <dependencies>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-test</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-test-autoconfigure</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-actuator</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-actuator-autoconfigure</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-json</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-log4j2</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${spring-boot-3.version}</version>
          </dependency>
          <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-core</artifactId>
            <version>${tomcat.version}</version>
          </dependency>
          <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-el</artifactId>
            <version>${tomcat.version}</version>
          </dependency>
          <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-websocket</artifactId>
            <version>${tomcat.version}</version>
          </dependency>
        </dependencies>
      </dependencyManagement>
    </profile>
  </profiles>
</project>
