enableOverrideArtifact=true make version append twice to artifact name

Description

When enabling the flag

enableOverrideArtifact=true

The artifact created will get double version appended to its name

[INFO] Installing /.../target/some-installer-1.0.0-SNAPSHOT.jar to /.../some-installer-1.0.0-SNAPSHOT/1.0.0-SNAPSHOT/some-installer-1.0.0-SNAPSHOT-1.0.0-SNAPSHOT.jar

Reason is this code:

Since finalName per default is

chainging the name of the artifact.setArtifactId become

Chaing it to

Would solve that problem, but it would also change the final name of all artifacts in the whole build. I believe using finalName on <build> level instead of per plugin is the recommended.

Besides that.. not using the 'enableOverrideArtifact' flag at all actually overwrite the default artifact - so I'm not sure if it is needed at all?

Suggestion
Remove finalName and enableOverrideArtifact parameters and default to the finalName taken from the <build>. If a customization of the installer name would be needed, maybe use parameters similar to the maven-assembly-plugin (stripVersion... and such)

Environment

None

Assignee

René Krell

Reporter

Tomas Forsman

Impact

Functional - may break existing environments

Components

Sprint

None

Fix versions

Affects versions

Priority

Medium
Configure