Repository navigation
[Java][Spring] Fix duplicate spring-boot-starter-restclient in SB4 POM (Maven 3.10 compat) - #25209
Karan-Rastogi wants to merge 2 commits into
Conversation
…m SB4 POM The pom-sb4.mustache template declared spring-boot-starter-restclient (or -webclient when reactive) twice: once in compile scope and once in test scope. Maven 3.10 treats duplicate dependency declarations as a hard error, breaking builds that previously only logged a warning. Since compile scope is already available on the test classpath, the test-scoped declaration is redundant. Removing it fixes Maven 3.10 compatibility without changing resolved dependencies. Fixes OpenAPITools#25202
Sekator778
left a comment
There was a problem hiding this comment.
The template change is right: the removed test-scoped starter is the same artifact as the compile one, also with reactive. Samples up-to-date is red because the four springboot-4* sample poms aren't regenerated; ./bin/generate-samples.sh bin/configs/spring-boot-4*.yaml on JDK 17 updates them, then it's good to go.
Regenerated the four springboot-4* sample POMs to reflect the duplicate spring-boot-starter-restclient removal in pom-sb4.mustache. Verified locally with: mvn clean package -DskipTests on samples/openapi3/server/petstore/springboot-4 — build succeeds. Generated with: ./bin/generate-samples.sh bin/configs/spring-boot-4*.yaml Refs OpenAPITools#25202
|
Thanks for the review @Sekator778 I've regenerated the four springboot-4* sample POMs as you suggested: Updated files:
All four POMs now contain only a single spring-boot-starter-restclient declaration. I also verified locally with: on samples/openapi3/server/petstore/springboot-4 — BUILD SUCCESS. Commit: ae5d05e. Please let me know if anything else needs updating. Thanks for your time! |
Sekator778
left a comment
There was a problem hiding this comment.
The four regenerated poms match my local regeneration byte for byte, LGTM. The GitHub workflows on this head still wait for a maintainer's approval to run.
PR checklist
masterbranch of the repository.mvn clean packagein the root of the repository and it passed.PR Type
Bug fix
Description of the changes
The Spring Boot 4
pom.xmltemplate (pom-sb4.mustache) declaredspring-boot-starter-restclient(orspring-boot-starter-webclientwhenreactive=true) twice:Maven 3.10 treats duplicate dependency declarations as a hard error instead of a warning, which breaks any project generated with
library=spring-bootanduseSpringBoot4=true:Summary by cubic
Fixes duplicate
spring-boot-starter-restclient(or-webclientwhenreactive=true) declarations in the Spring Boot 4 POM template, which Maven 3.10 rejects as a hard error. Removes the redundant test-scoped declaration; compile scope already covers the test classpath, so resolved dependencies are unchanged. Regenerates the four springboot-4 sample POMs to match.Written for commit ae5d05e. Summary will update on new commits.