[BUG] Java generator "spring-boot" for server side stubs incompatible with Maven 3.10
I maintainer di solito rispondono entro 1 giorno
@Karan-Rastogi ci sta già lavorando.
Dal 9/10/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- java, spring-boot
- Ambito
- build-system
Direzione di ricerca
La dipendenza duplicata deriva dal template di supporto pom.xml generato per la libreria spring-boot, quindi inizia cercando spring-boot-starter-restclient nelle risorse del generatore spring-boot Java. Conferma che compare sia nello scope compile sia nello scope test, poi rimuovi la copia con scope test. È completato quando il pom.xml generato la dichiara una sola volta e il progetto generato si compila con Maven 3.10 tramite mvn clean package.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Yesterday our pipelines using openapi generator CLI via docker images started failing. It turned out the underlying agents where updated to using Maven 3.10 (previously 3.9).
That change in Maven now treats certain duplicated dependencies in the POM as an error instead of just a warning being logged.
The error is related to org.springframework.boot:spring-boot-starter-restclient being duplicated in the Maven pom.xml compile and test scope. As needed for compile there is no need to redeclare for test also.
openapi-generator version
v7.26.0- no regression I'd say
OpenAPI declaration file content or url
not related to the OpenAPI schema itself, the respective generated Maven POM (support file?) is erronuous
Generation Details
- using
openapitools/openapi-generator-clifrom Docker distribution - using the following
config.yaml
artifactId: "whatever-server"
groupId: "my.org.system"
apiPackage: "my.org.system.whatever.server"
modelPackage: "my.org.system.whatever.server.model"
configPackage: "my.org.system.whatever.server"
library: "spring-boot"
artifactVersion: "0.0.10-20261009.t064033"
openApiNullable: "false"
modelPropertyNaming: "camelCase"
useSpringBoot4: "True"
useJackson3: "True"
useJakartaEe: "false"
interfaceOnly: "true"
delegatePattern: "false"
useResponseEntity: "false"
useBeanValidation: "true"
skipDefaultInterface: "true"
generateBuilders: "true"
generateApiTests: "false"
generateModelTests: "false"
Steps to reproduce
Just use the spring-boot Java generator and try to mvn clean package the outcome.
You will encounter a maven build error stating that spring-boot-starter-restclient is duplicated.
[ERROR] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.boot:spring-boot-starter-restclient:jar -> duplicate declaration of version (?) @ line 78, column 21
Related issues/PRs
none identified so far
Suggest a fix
It could be as easy as just fixing the respective pom.xml mustache template and remove the duplicated spring-boot-starter-restclient from the test scoped dependencies, as it is compile scope already and does not need to be repeated.
- Lingua principale
- Java
- Stelle
- 26.8k
- Fork
- 7.7k
- Merge medio
- 1g 15h
- PR unite (30g)
- 158
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenAPITools/openapi-generator
-
[BUG][RUST] chrono date-time path/query/header params are not serialized as RFC 3339Forse già presa @teovillanueva l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
OpenAPITools/openapi-generator#25297 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG][RUST] Reqwest - encoding of spaces in path parametersForse già presa @GlenWright l’ha presa 7 giorni fa. ApertaIssue: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenAPITools/openapi-generator#25257 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenAPITools/openapi-generator#25237 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] OpenApiEvaluator reports "default value not in enum" for numerically equal values with different scale (e.g. 1.5 and 1.50)Forse già presa @mohitduhan19 l’ha presa 8 giorni fa. ApertaIssue: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenAPITools/openapi-generator#25233 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] OpenApiEvaluator emits "Unused model" warnings even when recommendations are disabledForse già presa @mohitduhan19 l’ha presa 8 giorni fa. ApertaIssue: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
OpenAPITools/openapi-generator#25232 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OpenAPITools/openapi-generator
Issue simili
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from gitForse già presa @MohabMohie l’ha presa oggi. Apertaagentic
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
bug/错误
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
FCL-Team/FoldCraftLauncher#1951 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
quarkusio/quarkus-agent-mcp#296 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
commons-app/apps-android-commons#7072 ·
I maintainer di solito rispondono entro 1 giorno