How to populate parameter “defaultValue” in Maven “AbstractMojoTestCase”?
问题 I have a Maven plugin that I am attempting to test using a subclass of the AbstractMojoTestCase . The plugin Mojo defines an outputFolder parameter with a defaultValue . This parameter is not generally expected to be provided by the user in the POM. @Parameter(defaultValue = "${project.build.directory}/someOutputFolder") private File outputFolder; And if I use the plugin in a real scenario then the outputFolder gets defaulted as expected. But if I test the Mojo using the AbstractMojoTestCase