maven-plugins icon indicating copy to clipboard operation
maven-plugins copied to clipboard

New feature: usefinalname

Open albertdev opened this issue 11 years ago • 2 comments

This plugin already has lots of goodness, but there is one thing which I haven't seen in any Maven plugin to date: using the finalName of a copied artifact as destination file name so that the copy plugin doesn't need a verbose configuration to get pretty filenames.

A short introduction: Maven allows to set a "finalName" for an artifact in the build section. This name will be used when a project builds jars or other files in the target folder. When an artifact gets deployed though, it uses the GAV Maven coordinates (and it should, otherwise Maven couldn't find it). However, no plugins exist which can download the artifact, resolve its POM and use the finalName to rename the artifact to its "human readable" form.

This set of commits does all of this to get rid of the default "artifactId-version-classifier" scheme, at least if you put a "<useFinalName>true</useFinalName>" parameter in a CopyDependency or CopyResource block.

albertdev avatar Mar 11 '13 22:03 albertdev

Many thanks for a detailed explanation, Bert! Will review it soon.

evgeny-goldin avatar Mar 11 '13 23:03 evgeny-goldin

Seems Markdown eats unknown XML tags... I edited my comment, I meant a "<useFinalName>true</useFinalName>" parameter.

albertdev avatar Mar 12 '13 08:03 albertdev