Skip to content

[maven-4.0.x] Compat MavenArtifact.setFile() is a no-op #12588

Description

@elharo

Compat MavenArtifact.setFile() is a no-op

Found in: maven-4.0.x branch
File: compat/maven-compat/src/main/java/org/apache/maven/artifact/MavenArtifact.java (lines ~100-102)
Severity: Critical

Description

The setFile(File file) method immediately returns without setting the file on the delegate Maven 4 artifact:

public void setFile(File file) {
    // returns without delegating — no-op
}

This means resolved artifact file paths are never propagated back to the underlying Maven 4 artifact, causing downstream consumers to see no resolved file for any artifact resolved through the compat layer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions