maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerrit Hohl (JIRA)" <>
Subject [jira] [Created] (MPLUGINTESTING-56) @Parameter is ignored
Date Tue, 17 Apr 2018 07:13:00 GMT
Gerrit Hohl created MPLUGINTESTING-56:

             Summary: @Parameter is ignored
                 Key: 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):

{{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(}}
{{    at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(}}
{{    at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(}}
{{    at org.codehaus.plexus.component.configurator.AbstractComponentConfigurator.configureComponent(}}
{{    at org.apache.maven.plugin.testing.AbstractMojoTestCase.lookupConfiguredMojo(}}
{{    at org.apache.maven.plugin.testing.MojoRule.lookupConfiguredMojo(}}
{{    [...]}}

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

View raw message