maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gangadhar mamillapalli (JIRA)" <>
Subject [jira] [Created] (MNG-6005) not able to pass map kind of variables to maven goal through command line
Date Thu, 21 Apr 2016 07:42:25 GMT
gangadhar mamillapalli created MNG-6005:

             Summary: not able to pass map kind of variables to maven goal through command
                 Key: MNG-6005
             Project: Maven
          Issue Type: Bug
          Components: Command Line
    Affects Versions: 3.2.1
         Environment: java 7, maven 3.2.1,Mac Yosimite,
            Reporter: gangadhar mamillapalli
            Priority: Critical

am trying to pass Map kind of parameters to my maven plugin through command line. Here is
how i tried,

bq. $mvn -U -X sample.plugin:hello-maven-plugin:1.0-SNAPSHOT:sayhi -Dsayhi.myMap=key1=value1

bq. $mvn -U -X sample.plugin:hello-maven-plugin:1.0-SNAPSHOT:sayhi -Dsayhi.myMap={key1=value1}

None of these are working and getting following error:

Caused by:
Cannot assign configuration entry 'myMap' with value '${sayhi.myMap}' of type
java.lang.String to property of type java.util.Map


Here is my parameter in Mojo:

 * My Map.
@Parameter(property = "sayhi.myMap", required = false)
private Map<String,String> myMap = new HashMap<String, String>();

followed instructions at ==>,
but no luck., i think am missing something very small. am working on maven v3.2.1

is am missing anything here ? am blocked on this.

i have also posted same question stackoverflow.

Gangadhar M

This message was sent by Atlassian JIRA

View raw message