You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Volker Hochstein <v....@highstone.de> on 2020/12/22 09:05:32 UTC
mvn CLI Param -D Plugin Map property
Hi,
I m searching for correct syntax to pass a map Plugin property by mvn -D
parameter…
Following Parameter Definition in plugin code:
@Parameter(property = "extendedVariables", required = false)
private Map extendedVariables;
I can specify it directly in POM:
<extendedVariables><releaseTrain>20.11</releaseTrain></extendedVariables>
However, I need to pass that information from "outside" and I cannot
find correct syntax to call mvn CLI...
./mvn generate-resources -DextendedVariables=releaseTrain=20.11
Errormessage:
Unable to parse configuration of mojo
se.bjurr.gitchangelog:git-changelog-maven-plugin:1.63:git-changelog for
parameter extendedVariables: Cannot assign configuration entry
'extendedVariables' with value '${extendedVariables}' of type
java.lang.String to property of type java.util.Map
Would be great if you could give me a hint about correct syntax.
Thanks a lot for your support in advance.
--
Volker
Re: mvn CLI Param -D Plugin Map property
Posted by Michael Osipov <mi...@apache.org>.
Am 2020-12-22 um 10:05 schrieb Volker Hochstein:
> Hi,
>
> I m searching for correct syntax to pass a map Plugin property by mvn -D
> parameter…
>
> Following Parameter Definition in plugin code:
> @Parameter(property = "extendedVariables", required = false)
> private Map extendedVariables;
>
> I can specify it directly in POM:
> <extendedVariables><releaseTrain>20.11</releaseTrain></extendedVariables>
>
> However, I need to pass that information from "outside" and I cannot
> find correct syntax to call mvn CLI...
> ./mvn generate-resources -DextendedVariables=releaseTrain=20.11
>
> Errormessage:
> Unable to parse configuration of mojo
> se.bjurr.gitchangelog:git-changelog-maven-plugin:1.63:git-changelog for
> parameter extendedVariables: Cannot assign configuration entry
> 'extendedVariables' with value '${extendedVariables}' of type
> java.lang.String to property of type java.util.Map
>
> Would be great if you could give me a hint about correct syntax.
>
> Thanks a lot for your support in advance.
https://issues.apache.org/jira/browse/MNG-6005
As far as I remember my investigation some time ago this is done by some
Plexus component.
We likely need an IT which verifies collectons and maps as CLI args
first then go over to the implementation.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org