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

[MSOURCES-115] aggregate-sources yields different results based on reactor

Abierto
#185 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

Comienza localizando el objetivo aggregate-sources y cómo recopila proyectos del Maven reactor. Reproduce el problema construyendo un proyecto hijo directamente y después desde el proyecto padre, comparando el contenido de los source JAR generados. Se considera terminado cuando aggregate-sources incluye únicamente los hijos del proyecto actual y produce artefactos idénticos en ambos modos de compilación.

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

Descripción

bug priority:major

Raymond DeCampo opened MSOURCES-115 and commented

The main idea here is that depending on whether a particular project is built from the parent project or on its own, the sources jar generated by aggregate-sources may be different.  IMO this attacks the repeat-ability of the build.  The root cause is that aggregate-sources pulls in all the sources in the reactor.

 

Consider a three layer structure.  One parent project at the top level, say foo-parent.  Then two child modules at the next level, say foo-client and foo-server.  Then some number of children of foo-client and foo-server where the actual Java code lives.

 

The poms for foo-server and foo-client have aggregate-sources set up.  If a build is executed directly on foo-client for example, then the resulting source foo-client-sources-*.jar will have the source from the children of foo-client.

 

If a build is executed from foo-parent, both foo-client and foo-server are included in the reactor.  Now the resulting foo-client-sources-*.jar includes the source code from foo-server's children as well as its own.

 

I would expect that the aggregate-sources target would only include the source of the children of the current project instead of the source from any project in the reactor.  I would also expect that the build should result identical artifacts whether or not it is invoked from the parent project or not.

 


Affects: 3.0.1

Lenguaje dominante
Java
Estrellas
36
Forks
38
Merge medio
1 d 47 min
PR fusionados (30 d)
8

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

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 apache/maven-source-plugin

Todos los issues de apache/maven-source-plugin

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.