Igor Fedorenko created MPLUGINTESTING-37:
--------------------------------------------
Summary: Provide convenince methods to work with MavenProject
Key: MPLUGINTESTING-37
URL: https://jira.codehaus.org/browse/MPLUGINTESTING-37
Project: Maven Plugin Testing
Issue Type: Improvement
Reporter: Igor Fedorenko
Reading MavenProjects and running Mojo requires quite a bit of boilerplate code
{code}
File pom = new File( basedir, "pom.xml" );
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
request.setBaseDirectory( basedir );
ProjectBuildingRequest configuration =
request.getProjectBuildingRequest();
MavenProject project = lookup( ProjectBuilder.class ).build( pom,
configuration ).getProject();
Assert.assertNotNull( project );
return project;
{code}
and
{code}
MavenProject project = readMavenProject( basedir );
MavenSession session = newMavenSession( project );
MojoExecution execution = newMojoExecution( goal );
lookupConfiguredMojo( session, execution ).execute();
{code}
It would be convenient if these were available from MojoRule, such that the
same code could be reused by all maven plugins that use maven-plugin-testing.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)