apache / apache/maven-source-plugin
[MSOURCES-115] aggregate-sources yields different results based on reactor
- Lingua principale
- Java
- Stelle
- 37
- Fork
- 38
- Merge medio
- 18h 47m
- PR unite (30g)
- 5
Descrizione
**[Raymond DeCampo](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=raydecampo)** opened **[MSOURCES-115](https://issues.apache.org/jira/browse/MSOURCES-115?redirect=false)** 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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia individuando l’obiettivo aggregate-sources e il modo in cui raccoglie i progetti dal Maven reactor. Riproduci il problema compilando direttamente un progetto figlio e poi dal progetto padre, confrontando il contenuto dei source JAR generati. Il lavoro è completo quando aggregate-sources include solo i progetti figli del progetto corrente e produce artefatti identici in entrambe le modalità di build.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- build-system
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100