o looking other IDE integration and cleaning up stub methods that are useless to anyone until they are implemented fully and properly

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@491536 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2007-01-01 05:29:29 +00:00
parent ae10e790ac
commit 318ec6ac0f
2 changed files with 7 additions and 68 deletions

View File

@ -276,45 +276,6 @@ public class MavenEmbedder
// ----------------------------------------------------------------------
// Plugins
// ----------------------------------------------------------------------
public List getAvailablePlugins()
{
List plugins = new ArrayList();
plugins.add( makeMockPlugin( "org.apache.maven.plugins", "maven-jar-plugin", "Maven Jar Plug-in" ) );
plugins.add( makeMockPlugin( "org.apache.maven.plugins", "maven-compiler-plugin", "Maven Compiler Plug-in" ) );
return plugins;
}
public PluginDescriptor getPluginDescriptor( SummaryPluginDescriptor summaryPluginDescriptor )
throws MavenEmbedderException
{
PluginDescriptor pluginDescriptor;
try
{
InputStream is =
realm.getResourceAsStream( "/plugins/" + summaryPluginDescriptor.getArtifactId() + ".xml" );
pluginDescriptor = pluginDescriptorBuilder.build( new InputStreamReader( is ) );
}
catch ( PlexusConfigurationException e )
{
throw new MavenEmbedderException( "Error retrieving plugin descriptor.", e );
}
return pluginDescriptor;
}
private SummaryPluginDescriptor makeMockPlugin( String groupId,
String artifactId,
String name )
{
return new SummaryPluginDescriptor( groupId, artifactId, name );
}
// ----------------------------------------------------------------------
// Execution of phases/goals
// ----------------------------------------------------------------------
@ -352,7 +313,6 @@ public class MavenEmbedder
// ----------------------------------------------------------------------
// Remote Repository
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// Local Repository
// ----------------------------------------------------------------------

View File

@ -143,27 +143,6 @@ public class MavenEmbedderTest
assertEquals( "somnambulance", p1.getProperties().getProperty( "occupation" ) );
}
// ----------------------------------------------------------------------
// Test mock plugin metadata
// ----------------------------------------------------------------------
public void xtestMockPluginMetadata()
throws Exception
{
List plugins = maven.getAvailablePlugins();
SummaryPluginDescriptor spd = (SummaryPluginDescriptor) plugins.get( 0 );
assertNotNull( spd );
PluginDescriptor pd = maven.getPluginDescriptor( spd );
assertNotNull( pd );
assertEquals( "org.apache.maven.plugins", pd.getGroupId() );
}
// ----------------------------------------------------------------------
// Lifecycle phases
// ----------------------------------------------------------------------
@ -209,15 +188,19 @@ public class MavenEmbedderTest
protected void projectReadingTest()
throws Exception
{
MavenProject project = maven.readProjectWithDependencies( getPomFile() );
MavenExecutionRequest request = new DefaultMavenExecutionRequest().setPomFile( getPomFile().getAbsolutePath() );
assertEquals( "org.apache.maven", project.getGroupId() );
MavenExecutionResult result = maven.readProjectWithDependencies( request );
Set artifacts = project.getArtifacts();
assertEquals( "org.apache.maven", result.getMavenProject().getGroupId() );
Set artifacts = result.getMavenProject().getArtifacts();
assertEquals( 1, artifacts.size() );
Artifact artifact = (Artifact) artifacts.iterator().next();
System.out.println( "artifact = " + artifact );
}
// ----------------------------------------------------------------------
@ -228,8 +211,4 @@ public class MavenEmbedderTest
{
return new File( basedir, "src/test/resources/pom.xml" );
}
public void testNothing()
{
}
}