This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git

commit 5f65c3542f277fef90962316d5e13fb4b0ae5bbe
Author: Robert Lazarski <[email protected]>
AuthorDate: Sat Sep 5 06:25:47 2026 -1000

    Stop axis2-spring exporting Spring to its consumers
    
    The module is an integration layer: the application already has Spring and 
picks
    its version. At compile scope the four Spring dependencies were transitive, 
so a
    consumer on an older Spring who did not import the Spring Boot BOM silently 
got
    this build's Spring beside their own. Marked provided. modules/integration
    declares spring-context and spring-web at test scope, since 
SpringServiceTest
    drives axis2-spring and no longer inherits them.
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
---
 modules/integration/pom.xml              | 13 +++++++++++++
 modules/spring/pom.xml                   |  9 +++++++++
 src/site/markdown/release-notes/2.0.2.md | 12 ++++++++++++
 3 files changed, 34 insertions(+)

diff --git a/modules/integration/pom.xml b/modules/integration/pom.xml
index 5647538334..486fac09be 100644
--- a/modules/integration/pom.xml
+++ b/modules/integration/pom.xml
@@ -150,6 +150,19 @@
             <artifactId>spring-test</artifactId>
             <scope>test</scope>
         </dependency>
+        <!-- SpringServiceTest drives axis2-spring, whose Spring dependencies 
are
+             provided and so do not reach here on their own. Declared 
explicitly
+             rather than inherited, which is what the provided scope is for. 
-->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>SOAP12TestModuleB</artifactId>
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index 832b71f9c9..44eb2fc335 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -48,21 +48,30 @@
             <artifactId>axis2-kernel</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <!-- provided, not compile: this module is an integration layer, so the
+             application already has Spring and decides its version. As compile
+             scope these were transitive, and a consumer on an older Spring 
who did
+             not import the Spring Boot BOM silently got this build's Spring 
on the
+             classpath next to their own. Nothing here is shipped for them. -->
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-beans</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>jakarta.servlet</groupId>
diff --git a/src/site/markdown/release-notes/2.0.2.md 
b/src/site/markdown/release-notes/2.0.2.md
index c8c1bd7b8f..790f858ad5 100644
--- a/src/site/markdown/release-notes/2.0.2.md
+++ b/src/site/markdown/release-notes/2.0.2.md
@@ -5,6 +5,18 @@ Apache Axis2 2.0.2 Release Notes
 
 ## Distribution Changes
 
+- **`axis2-spring` no longer exports Spring to its consumers.** Its 
`spring-core`,
+  `spring-beans`, `spring-context` and `spring-web` dependencies are now 
`provided`
+  rather than `compile`. The module is an integration layer: the application 
already
+  has Spring and decides its version. As compile-scope dependencies they were
+  transitive, so a consumer running an older Spring who did not import the 
Spring Boot
+  BOM silently got this build's Spring on the classpath beside their own. 
Applications
+  that inherit `spring-boot-starter-parent` or import 
`spring-boot-dependencies` were
+  never affected -- dependency management already overrode the transitive 
version --
+  and are unaffected now. Anyone depending on `axis2-spring` **without** 
Spring Boot's
+  dependency management must declare their own Spring dependencies, which is 
the
+  intent.
+
 - **Five stray Spring jars dropped from `axis2.war` and the binary 
distribution.**
   `spring-beans`, `spring-context`, `spring-core` and `spring-web` have always 
been
   excluded on purpose -- a deployment using the Spring integration supplies 
its own

Reply via email to