Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-alpha-1
-
Fix Version/s: 2.0
-
Component/s: plugin-testing-harness
-
Labels:None
-
Number of attachments :
Description
As of version 2.0-alpha-1, plugin-testing only provides a way to lookup and instantiate uninitialized mojo instances, which means significant amount of explicit configuration in test pom.xml files and in test java code is required in order to be able to execute the mojo. It would be nice to be able to request fully configured mojo instances, that are initialized according to mojo parameter expressions and default values, thus saving the overhead of maintaining the manual mojo configuration.
Issue Links
- is duplicated by
-
MPLUGINTESTING-7
parameters annotated with default-value are not injected
-
Introduced new AbstractMojoTestCase.lookupConfiguredMojo. which returns fully configured Mojo instance. Unlike other lookupMojo methods, lookupConfiguredMojo uses maven plugin parameter default values, so test can use much smaller and
easier to maintain pom.xml files.
Also introduced AbstractMojoTestCase newMavenSession and newMojoExecution helper methods. These helpers are used by lookupConfiguredMojo but should be useful in other cases.
http://svn.apache.org/viewvc?view=revision&revision=1185951