-
-
Notifications
You must be signed in to change notification settings - Fork 302
Closed
Milestone
Description
AbstractBndMavenPlugin makes the (wrong) assumption that the file extension is always the packaging type, while this is true for some (e.g. jar/war) this is not generally true.
bnd/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/AbstractBndMavenPlugin.java
Lines 623 to 629 in b25057b
private File createArtifactFile() { | |
return new File(targetDir, project.getBuild() | |
.getFinalName() | |
+ getClassifier().map("-"::concat) | |
.orElse("") | |
+ "." + project.getPackaging()); | |
} |
Instead BND should query the org.apache.maven.artifact.handler.manager.ArtifactHandlerManager
e.g.
public String getExtension(String packaging) {
if (packaging == null) {
return "jar";
}
ArtifactHandler handler = artifactHandlerManager.getArtifactHandler(packaging);
return handler.getExtension();
}
Metadata
Metadata
Assignees
Labels
No labels