apache / apache/maven-source-plugin
AggregatorSourceJarMojo silently does nothing for non-POM packaging
- Dominant language
- Java
- Stars
- 37
- Forks
- 38
- Avg merge
- 18h 47m
- Merged PRs (30d)
- 5
Description
`AggregatorSourceJarMojo.java:35-37`:
```java
@Override
protected void doExecute() throws MojoException {
if (Type.POM.equals(getProject().getPackaging().type().id())) {
packageSources(reactorProjects);
}
}
```
If the aggregator project has non-POM packaging, the method returns without any warning or error message. While `@Mojo(aggregator = true)` typically implies POM packaging, a misleading build or configuration could lead to silent failure — no source JAR is produced and the user receives no indication why.
**Fix**: Add an `else` branch with a warning or info message explaining why no sources were packaged.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in AggregatorSourceJarMojo.java at doExecute(), especially lines 35-37, and inspect how nearby Maven plugin code reports skipped work. Add the requested warning or info message for non-POM packaging, then verify that the POM path still packages sources and the non-POM path explains why no source JAR was produced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100