Skip to content

AggregatorSourceJarMojo silently does nothing for non-POM packaging #306

Description

@elharo

AggregatorSourceJarMojo.java:35-37:

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:minorMinor loss of function, or other problem where easy workaround is present

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions