Skip to content

Commit

Permalink
only enable spring boot 3 dependencies for java 17+
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Jul 10, 2024
1 parent f066c6a commit edbced8
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 12 deletions.
5 changes: 5 additions & 0 deletions dubbo-distribution/dubbo-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,11 @@
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-3-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-interceptor</artifactId>
Expand Down
68 changes: 68 additions & 0 deletions dubbo-spring-boot/dubbo-spring-boot-3-starter/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dubbo-spring-boot-3-starter</artifactId>
<packaging>jar</packaging>
<description>Apache Dubbo Spring Boot 3 Starter</description>

<properties>
<spring-boot.version>3.2.1</spring-boot.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- Spring Boot dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-3-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
6 changes: 0 additions & 6 deletions dubbo-spring-boot/dubbo-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,5 @@
<artifactId>dubbo-spring-boot-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-3-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>

</dependencies>
</project>
20 changes: 19 additions & 1 deletion dubbo-spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<modules>
<module>dubbo-spring-boot-actuator</module>
<module>dubbo-spring-boot-autoconfigure</module>
<module>dubbo-spring-boot-3-autoconfigure</module>
<module>dubbo-spring-boot-compatible</module>
<module>dubbo-spring-boot-starter</module>
<module>dubbo-spring-boot-starters</module>
Expand Down Expand Up @@ -190,5 +189,24 @@
<spring-boot.version>2.2.8.RELEASE</spring-boot.version>
</properties>
</profile>

<profile>
<id>spring-boot-3</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<modules>
<module>dubbo-spring-boot-3-autoconfigure</module>
<module>dubbo-spring-boot-3-starter</module>
</modules>
</profile>

<profile>
<id>release</id>
<modules>
<module>dubbo-spring-boot-3-autoconfigure</module>
<module>dubbo-spring-boot-3-starter</module>
</modules>
</profile>
</profiles>
</project>
5 changes: 0 additions & 5 deletions dubbo-test/dubbo-dependencies-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,6 @@
<artifactId>dubbo-spring-boot-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-3-autoconfigure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-actuator-compatible</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class FileTest {
ignoredModules.add(Pattern.compile("dubbo-demo.*"));
ignoredModules.add(Pattern.compile("dubbo-annotation-processor"));
ignoredModules.add(Pattern.compile("dubbo-config-spring6"));
ignoredModules.add(Pattern.compile("dubbo-spring-boot-3-autoconfigure"));
ignoredModules.add(Pattern.compile("dubbo-spring-boot-3-starter"));
ignoredModules.add(Pattern.compile("dubbo-plugin-loom.*"));

ignoredArtifacts.add(Pattern.compile("dubbo-demo.*"));
Expand All @@ -69,6 +71,8 @@ class FileTest {
ignoredModulesInDubboAll.add(Pattern.compile("dubbo-metadata-processor"));
ignoredModulesInDubboAll.add(Pattern.compile("dubbo-native.*"));
ignoredModulesInDubboAll.add(Pattern.compile("dubbo-config-spring6.*"));
ignoredModulesInDubboAll.add(Pattern.compile("dubbo-spring-boot-3-autoconfigure.*"));
ignoredModulesInDubboAll.add(Pattern.compile("dubbo-spring-boot-3-starter.*"));
ignoredModulesInDubboAll.add(Pattern.compile(".*spring-boot.*"));
ignoredModulesInDubboAll.add(Pattern.compile("dubbo-maven-plugin"));
}
Expand Down

0 comments on commit edbced8

Please sign in to comment.