[
https://issues.apache.org/jira/browse/MASSEMBLY-843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17696156#comment-17696156
]
Christopher Tubbs edited comment on MASSEMBLY-843 at 3/3/23 1:42 PM:
---------------------------------------------------------------------
Using Maven 3.9.0 and maven-assembly-plugin 3.5.0, I see that using
{{finalName}} is generating a warning: "Parameter 'finalName' is read-only,
must not be used in configuration". However, using {{finalName}} appears to be
the only way you can change the name of the base directory inside the assembly
tarball, as per this StackOverflow answer:
[https://stackoverflow.com/a/12182912]
This needs to be settable, preferably without a warning, so we can override the
base directory name inside the assembly. I looked for other options that might
be able to do that, and I could not find any.
To be clear, {{<build><finalName /></build>}} ($\{project.build.finalName\})
does appear to be read-only, but I'm talking about {{<configuration><finalName
/></configuration>}} in the assembly, which is generating the warning, even
though setting it still works, so it appears to now be a hidden undocumented
feature, that generates the warning.
was (Author: ctubbsii):
Using Maven 3.9.0 and maven-assembly-plugin 3.5.0, I see that using
{{finalName}} is generating a warning: "Parameter 'finalName' is read-only,
must not be used in configuration". However, using {{finalName}} appears to be
the only way you can change the name of the base directory inside the assembly
tarball, as per this StackOverflow answer:
[https://stackoverflow.com/a/12182912]
This needs to be settable, preferably without a warning, so we can override the
base directory name inside the assembly. I looked for other options that might
be able to do that, and I could not find any.
To be clear, {{<build><finalName /></build>}} ({{ $\{project.build.finalName\}
}}) does appear to be read-only, but I'm talking about
{{<configuration><finalName /></configuration>}} in the assembly, which is
generating the warning, even though setting it still works, so it appears to
now be a hidden undocumented feature, that generates the warning.
> finalName as readonly parameter makes common usecases very complicated
> ----------------------------------------------------------------------
>
> Key: MASSEMBLY-843
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-843
> 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)