-
Notifications
You must be signed in to change notification settings - Fork 434
Open
Labels
Description
Summary
I'm seeing a build inconsistency between my local environment and our Jenkins pipeline.
Locally, mvn clean install completes successfully with no errors.
However, on Jenkins the build fails during the Spring Cloud Contract test generation phase with a NoSuchMethodError related to org.eclipse.aether.SessionData.
This is the error from Jenkins:
[INFO] --- spring-cloud-contract-maven-plugin:4.3.0:generateTests (default-generateTests) @ test-provider-service ---
--
| | | [INFO] Generating server tests source code for Spring Cloud Contract Verifier contract verification
| | | [INFO] Download dependency is provided - will retrieve contracts from a remote location
| | | [INFO] Will download stubs and contracts via Aether
| | | [INFO] Resolved version is [0.0.1-contract-test-SNAPSHOT]
| | | [INFO] ------------------------------------------------------------------------
| | | [INFO] BUILD FAILURE
| | | [INFO] ------------------------------------------------------------------------
| | | [INFO] Total time: 18.524 s
| | | [INFO] Finished at: 2026-02-27T20:38:43Z
| | | [INFO] ------------------------------------------------------------------------
| | | [ERROR] Failed to execute goal org.springframework.cloud:spring-cloud-contract-maven-plugin:4.3.0:generateTests (default-generateTests) on project test-provider-service: Execution default-generateTests of goal org.springframework.cloud:spring-cloud-contract-maven-plugin:4.3.0:generateTests failed: An API incompatibility was encountered while executing org.springframework.cloud:spring-cloud-contract-maven-plugin:4.3.0:generateTests: java.lang.NoSuchMethodError: 'java.lang.Object org.eclipse.aether.SessionData.computeIfAbsent(java.lang.Object, java.util.function.Supplier)'
Environment Details
Local
- Build: Successful
- Java version: openjdk version "17.0.4.1" 2022-08-12 LTS
*. OpenJDK Runtime Environment Zulu17.36+17-CA (build 17.0.4.1+1-LTS) - Maven version: Apache Maven 3.6.3
- OS: macOS
Jenkins
- Build: Fails during
spring-cloud-contract-maven-plugin:generateTests - Maven version: Apache Maven 3.6.3
- Jenkins agent OS: Linux
Questions
-
Does the Spring Cloud Contract plugin require a minimum Maven version?
If so, what is the minimum supported version? -
Is this a known compatibility issue with Maven 3.6.x or older?
-
Should Jenkins be upgraded to a newer Maven or JDK version to support this plugin?
Additional Logs / Config
If helpful, I can provide:
- Full Jenkins console output
pom.xml- Jenkins pipeline configuration
Reactions are currently unavailable