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

JIB Maven plugin fails when a module contains no files

Abierto
#4,411 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
java
Área
build-system

Línea de trabajo

Reproduzca el fallo con un proyecto Maven multimódulo que contenga un módulo vacío y el Jib Maven plugin en la versión 3.4.0. Compare el build con y sin una clase en el módulo vacío y, después, verifique que un módulo vacío pueda completar el build de la imagen sin el error de salida del build del proyecto.

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

Descripción

enhancement priority: p3

I ran into a minor issue when trying to build a docker image using JIB.

When building a multi-module application, the build fails when there is one or more modules that only exist as a structure (i.e. the contain no files, but the default directory structure for maven is present).

I receive the following error message:

[INFO] Building jar: /home/runner/work/user-registration/user-registration/200-logic/210-services/target/spring-demo-services-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- jib:3.4.0:build (default-cli) @ spring-demo-services ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for user-registration 0.0.1-SNAPSHOT:
[INFO]
[INFO] user-registration .................................. SUCCESS [ 39.727 s]
[INFO] spring-demo-db ..................................... SUCCESS [ 7.591 s]
[INFO] spring-demo-entities ............................... SUCCESS [ 16.996 s]
[INFO] spring-demo-logic .................................. SUCCESS [ 0.024 s]
[INFO] spring-demo-services ............................... FAILURE [ 0.052 s]
[INFO] spring-demo-controllers ............................ SKIPPED
[INFO] spring-demo-application ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:18 min
[INFO] Finished at: 2025-09-03T12:28:48Z
[INFO] ------------------------------------------------------------------------
Error: Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.4.0:build (default-cli) on project spring-demo-services: Obtaining project build output files failed; make sure you have compiled your project before trying to build the image. (Did you accidentally run "mvn clean jib:build" instead of "mvn clean compile jib:build"?): /home/runner/work/user-registration/user-registration/200-logic/210-services/target/classes -> [Help 1]
Error:
Error: To see the full stack trace of the errors, re-run Maven with the -e switch.
Error: Re-run Maven using the -X switch to enable full debug logging.
Error:
Error: For more information about the errors and possible solutions, please read the following articles:
Error: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error:
Error: After correcting the problems, you can resume the build with the command
Error: mvn -rf :spring-demo-services
Error: Process completed with exit code 1

Is this a bug, or intentional. Once i added a class in the failing modules, it worked as expected.

Lenguaje dominante
Java
Estrellas
14.5k
Forks
1.5k
Merge medio
40 min
PR fusionados (30 d)
1

Preparar el entorno

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 GoogleContainerTools/jib

Todos los issues de GoogleContainerTools/jib

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.