Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.0.3
-
None
-
Gentoo Linux, amd64, multicore.
Description
The test case (not JUnit) is attached.
If a Maven plugin runs within Maven 3.0.3, and defines
/**
- @parameter property="abc"
*/
private String somethingDifferentThanAbc;
public void setAbc(String value) {
somethingDifferentThanAbc = value;
}
Works for non-empty values:
<abc>abc-value</abc>
But throws a NPE in
org.codehaus.plexus.component.configurator.converters.ComponentValueSetter:331
(fieldTypeConverter is null) with empty values:
<abc></abc>
It works in Maven 2.x. It works if you declare the
property with no naming conventions:
private String abc;
As a side note, the plexus classes being used are not the ones declared in the pom, but the ones bundled within $MAVEN_HOME/lib/sisu-inject-plexus-2.1.1.jar.
I couldn't find sisu-inject-plexus-2.1.1-sources.jar anywhere, but the
repository itself is fortunately available at
https://github.com/sonatype/sisu.git
And then within
/sisu-inject/containers/guice-plexus/guice-plexus-shim/src/main/java/
I could have try to post a patch, but I'm not really sure about why this corner case is producing plexus-container's misbehavior.