Gerrit Hohl created MPLUGINTESTING-56:
-----------------------------------------
Summary: @Parameter is ignored
Key: MPLUGINTESTING-56
URL: https://issues.apache.org/jira/browse/MPLUGINTESTING-56
Project: Maven Plugin Testing
Issue Type: Bug
Components: plugin-testing-harness
Affects Versions: 3.3.0
Reporter: Gerrit Hohl
I tried to test a Mojo which had the following property (example):
{{@Parameter(name="hardDiskDrive")}}
{{private String hdd;}}
The test couldn't find the parameter always saying that there is no
"hardDiskDrive" parameter:
{{org.codehaus.plexus.component.configurator.ComponentConfigurationException:
Cannot find 'hardDiskDrive' in class test.example.MyMojo}}
{{ at
org.eclipse.sisu.plexus.CompositeBeanHelper.setProperty(CompositeBeanHelper.java:252)}}
{{ at
org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:101)}}
{{ at
org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:34)}}
{{ at
org.codehaus.plexus.component.configurator.AbstractComponentConfigurator.configureComponent(AbstractComponentConfigurator.java:44)}}
{{ at
org.apache.maven.plugin.testing.AbstractMojoTestCase.lookupConfiguredMojo(AbstractMojoTestCase.java:484)}}
{{ at
org.apache.maven.plugin.testing.MojoRule.lookupConfiguredMojo(MojoRule.java:197)}}
{{ [...]}}
The same applies also to the required option of the @Parameter annotation. It
also is totally ignored and you'll get a NullPointerException somewhere in your
code instead.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)