slachiewicz opened a new issue, #300: URL: https://github.com/apache/maven-plugin-testing/issues/300
### Affected version 3.5.1 ### Bug description When a POM configures a mojo parameter by its alias, `@InjectMojo` fails with `ComponentConfigurationException: Cannot find '<alias>' in class ...`, while Maven accepts the same POM. `MojoExtension.finalizeConfig` falls back to `config.getChild(parameter.getAlias())` but keeps that element under the alias name, so the configurator looks for a field called like the alias. Maven renames it to the parameter name when it finalizes the mojo configuration (`new Xpp3Dom(parameterConfiguration, parameter.getName())`). Example: build-helper-maven-plugin's `uptodate-property` declares `@Parameter(alias = "else") private String elseValue`; a test POM with `<else>outofdate</else>` fails under the harness and works in a real build. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
