mvn CLI Param -D Plugin Map property

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

mvn CLI Param -D Plugin Map property

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.

--
Volker


Reply | Threaded
Open this post in threaded view
|

Re: mvn CLI Param -D Plugin Map property

michaelo
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: [hidden email]
For additional commands, e-mail: [hidden email]