Hi all,
I am writing a Maven plugin and have trouble getting a parameter defined
as follows to work:
/**
* @parameter
*/
private Map<String,ComplexObject> map;
Not matter how I configure <map> in my POM, it only ever maps Strings to
null, not to an instance of ComplexObjext:
<map>
<key>
<!-- ComplexObject class lives in same package as mojo -->
<complexObject>
<someField>42</someField>
<complexObject>
</key>
</map>
But as far a I understand the "Guide to Configuring Plug-ins"
<http://maven.apache.org/guides/mini/guide-configuring-plugins.html#Mapping_Maps>,
the above should work. Alas, it doesn't work even if I add an
appropriate implementation attribute to <complexObject> (or <key>, for
that matter).
What's odd is that List<ComplexObject> works fine as parameter -- and
the aforementioned guide simply states that mapping maps works the "same
way". But it seems like this is wrong and having complex-valued maps as
plugin parameter is impossible. :-(
Can someone please shed light on the issue. Thank you.
Best wishes,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org