@Override protected void tearDown() throws Exception { super.tearDown(); }
@Override protected void setUp() throws Exception { super.setUp(); }
/** * @since 3.1.0 */ public void executeMojo( File basedir, String goal ) throws Exception { MavenProject project = readMavenProject( basedir ); MavenSession session = newMavenSession( project ); MojoExecution execution = newMojoExecution( goal ); executeMojo( session, project, execution ); }
/** * * @param project * @param goal * @return * @throws Exception * @since 2.0 */ protected Mojo lookupConfiguredMojo( MavenProject project, String goal ) throws Exception { return lookupConfiguredMojo( newMavenSession( project ), newMojoExecution( goal ) ); }
public Mojo lookupMojo( String groupId, String artifactId, String version, String goal, PlexusConfiguration pluginConfiguration ) throws Exception { return testCase.lookupMojo( groupId, artifactId, version, goal, pluginConfiguration ); }
public PlexusConfiguration extractPluginConfiguration( String artifactId, File pom ) throws Exception { return testCase.extractPluginConfiguration( artifactId, pom ); }
public Mojo configureMojo( Mojo mojo, PlexusConfiguration pluginConfiguration ) throws Exception { return testCase.configureMojo( mojo, pluginConfiguration ); }
/** * Creates a new empty file and attaches it to the artifact. * * @param artifact to attach the file to. * @param workingDir where to locate the new file * @throws IOException */ public void setArtifactFile( Artifact artifact, File workingDir ) throws IOException { setArtifactFile( artifact, workingDir, null, false ); }
public Mojo lookupConfiguredMojo( MavenSession session, MojoExecution execution ) throws Exception, ComponentConfigurationException { return testCase.lookupConfiguredMojo( session, execution ); }
/** * @since 3.2.0 */ public void executeMojo( MavenProject project, String goal, Xpp3Dom... parameters ) throws Exception { MavenSession session = newMavenSession( project ); executeMojo( session, project, goal, parameters ); }
protected PlexusContainer getContainer() { if ( container == null ) { setupContainer(); } return container; }
/** * @return a <code>DefaultArtifact</code> instance for <code>testGroupId:release:jar:1.0</code> * @throws IOException if any */ public Artifact getReleaseArtifact() throws IOException { return createArtifact( "testGroupId", "release", "1.0" ); }
public String getPluginDescriptorLocation() { return testCase.getPluginDescriptorLocation(); }
@Override protected void setUp() throws Exception { String baseDir = getBasedir(); schemaPom = new File(baseDir, "src/test/resources/unit/schema/induce-pom.xml"); protocolPom = new File(baseDir, "src/test/resources/unit/protocol/induce-pom.xml"); super.setUp(); }
@Override protected void tearDown() throws Exception { super.tearDown(); }
/** * Lookup the mojo leveraging the actual subprojects pom * * @param goal * @param pom * @return a Mojo instance * @throws Exception */ public Mojo lookupMojo( String goal, File pom ) throws Exception { return testCase.lookupMojo( goal, pom ); }
public PlexusConfiguration extractPluginConfiguration( String artifactId, Xpp3Dom pomDom ) throws Exception { return testCase.extractPluginConfiguration( artifactId, pomDom ); }
public Mojo configureMojo( Mojo mojo, String artifactId, File pom ) throws Exception { return testCase.configureMojo( mojo, artifactId, pom ); }
/** * Creates an unpackable file (zip,jar etc) containing an empty file. * * @param artifact to attach * @param workingDir where to create the file. * @throws IOException */ public void setUnpackableArtifactFile( Artifact artifact, File workingDir ) throws IOException { setArtifactFile( artifact, workingDir, null, true ); }
public Mojo lookupConfiguredMojo( MavenProject project, String goal ) throws Exception { return testCase.lookupConfiguredMojo( project, goal ); }