Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[BUG] Java generator "spring-boot" for server side stubs incompatible with Maven 3.10

Cerrado Apto para principiantes
#25,202 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Karan-Rastogi ya está trabajando en esto.

Desde el 9/10/2026.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java, spring-boot
Área
build-system

Línea de trabajo

La dependencia duplicada proviene de la plantilla de soporte pom.xml generada para la biblioteca spring-boot, así que empieza buscando spring-boot-starter-restclient en los recursos del generador spring-boot de Java. Confirma que aparece tanto en el alcance compile como en el alcance test y luego elimina la copia con alcance test. Está terminado cuando el pom.xml generado la declara una sola vez y el proyecto generado se compila con Maven 3.10 usando mvn clean package.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Issue: Bug

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-cli from 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.

Lenguaje dominante
Java
Estrellas
26.8k
Forks
7.7k
Merge medio
1 d 15 h
PR fusionados (30 d)
158

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenAPITools/openapi-generator

Todos los issues de OpenAPITools/openapi-generator

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.