use of org.apache.maven.plugin.MojoExecution in project maven-plugins by apache.
the class JavadocReportTest method lookupMojo.
private JavadocReport lookupMojo(File testPom) throws Exception {
JavadocReport mojo = (JavadocReport) lookupMojo("javadoc", testPom);
MojoExecution mojoExec = new MojoExecution(new Plugin(), "javadoc", null);
setVariableValueToObject(mojo, "mojo", mojoExec);
MavenProject currentProject = new MavenProjectStub();
currentProject.setGroupId("GROUPID");
currentProject.setArtifactId("ARTIFACTID");
setVariableValueToObject(mojo, "session", newMavenSession(currentProject));
return mojo;
}
use of org.apache.maven.plugin.MojoExecution in project maven-plugins by apache.
the class CompilerMojoTestCase method getMockMojoExecution.
private MojoExecution getMockMojoExecution() {
MojoDescriptor md = new MojoDescriptor();
md.setGoal("compile");
MojoExecution me = new MojoExecution(md);
PluginDescriptor pd = new PluginDescriptor();
pd.setArtifactId("maven-compiler-plugin");
md.setPluginDescriptor(pd);
return me;
}
use of org.apache.maven.plugin.MojoExecution in project maven-plugins by apache.
the class AggregatorJavadocReportTest method lookupMojo.
private JavadocReport lookupMojo(File testPom) throws Exception {
JavadocReport mojo = (JavadocReport) lookupMojo("aggregate", testPom);
MojoExecution mojoExec = new MojoExecution(new Plugin(), "aggregate", null);
setVariableValueToObject(mojo, "mojo", mojoExec);
MavenProject currentProject = new MavenProjectStub();
currentProject.setGroupId("GROUPID");
currentProject.setArtifactId("ARTIFACTID");
MavenSession session = newMavenSession(currentProject);
DefaultRepositorySystemSession repoSysSession = (DefaultRepositorySystemSession) session.getRepositorySession();
repoSysSession.setLocalRepositoryManager(new SimpleLocalRepositoryManager(localRepo));
setVariableValueToObject(mojo, "session", session);
return mojo;
}
Aggregations