[ 
https://issues.apache.org/jira/browse/MASSEMBLY-845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17685939#comment-17685939
 ] 

Marat Abrarov commented on MASSEMBLY-845:
-----------------------------------------

Hi [~khmarbaise], [~rfscholte-getthere] and [~afloom],

Here is my use-case of Maven Assembly Plugin, which relies on {{finalName}} 
parameter: 
[https://github.com/mabrarov/docker-compose-init-container/blob/master/app-image/pom.xml].

I use Maven Assembly Plugin to create multiple archives (with required 
structure, directory and file permissions, directory and file timestamps, line 
ending), which are later (within the same maven module) used in Dockerfile 
[{{ADD}}|https://docs.docker.com/engine/reference/builder/#add] or 
[{{COPY}}|https://docs.docker.com/engine/reference/builder/#copy] instructions 
to place directories / files in the built (using 
[docker-maven-plugin|https://github.com/fabric8io/docker-maven-plugin] and 
generated Dockerfile) container image.

I also use Maven Assembly Plugin with {{finalName}} parameter to place all 
packaged archives and Dockerfile (where I fill placeholders using filtering) in 
a single directory which is used as Docker build context.

This way my builds on Windows host (using remote Docker engine which can be 
running in a local VM with Linux) and on Linux hosts (using remote or local 
Docker engine) are identical, OS independent (comparing to {{docker build}} 
command) and reproducible.

Taking into account that Maven Assembly Plugin still supports 
[{{outputDirectory}}|https://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html#outputDirectory]
 parameter (which can replace {{finalName}} parameter for my use case, but it 
will complicate maven project and Dockerfile), I find deprecation of 
{{finalName}} parameter (MASSEMBLY-817) meaningless.

I vote to make {{finalName}} back editable, or at least consider it editable if 
{{attach}} is {{{}false{}}}.

Thank you.

> MASSEMBLY-817 makes some usecases very inconvenient
> ---------------------------------------------------
>
>                 Key: MASSEMBLY-845
>                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-845
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Ulf Dreyer
>            Priority: Major
>
> The "improvement" done in MASSEMBLY-817 makes some usecases very inconvenient:
> We need to create an archive with one stable name (independent of e.g. 
> version) so we don't have to propagate these information to a bunch of 
> scripts.
> The general solution (i.e. Stack-overflow) refers exactly to the finalName:
> [http://stackoverflow.com/questions/20697144/can-not-set-the-final-jar-name-with-maven-assembly-plugin]
> *Please change finalName back to a settable property.*
> It being settable does not hurt anyone satisfied with the default naming 
> convention but makes some usecases vastly simpler (otherwise you have to 
> rename the artifact using yet another plugin or propagate version info 
> possibly through a chain of scripts)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to