maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r491536 - in /maven/components/trunk/maven-embedder/src: main/java/org/apache/maven/embedder/MavenEmbedder.java test/java/org/apache/maven/embedder/MavenEmbedderTest.java
Date Mon, 01 Jan 2007 05:29:34 GMT
Author: jvanzyl
Date: Sun Dec 31 21:29:29 2006
New Revision: 491536

URL: http://svn.apache.org/viewvc?view=rev&rev=491536
Log:
o looking other IDE integration and cleaning up stub methods that are useless to anyone until
they are implemented fully and properly

Modified:
    maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
    maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java

Modified: maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java?view=diff&rev=491536&r1=491535&r2=491536
==============================================================================
--- maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
(original)
+++ maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
Sun Dec 31 21:29:29 2006
@@ -276,45 +276,6 @@
     // ----------------------------------------------------------------------
     // 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 @@
     // ----------------------------------------------------------------------
     // Remote Repository
     // ----------------------------------------------------------------------
-
     // ----------------------------------------------------------------------
     // Local Repository
     // ----------------------------------------------------------------------

Modified: maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java?view=diff&rev=491536&r1=491535&r2=491536
==============================================================================
--- maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
(original)
+++ maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java
Sun Dec 31 21:29:29 2006
@@ -143,27 +143,6 @@
         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 @@
     protected void projectReadingTest()
         throws Exception
     {
-        MavenProject project = maven.readProjectWithDependencies( getPomFile() );
+        MavenExecutionRequest request = new DefaultMavenExecutionRequest().setPomFile( getPomFile().getAbsolutePath()
);
+
+        MavenExecutionResult result = maven.readProjectWithDependencies( request );
 
-        assertEquals( "org.apache.maven", project.getGroupId() );
+        assertEquals( "org.apache.maven", result.getMavenProject().getGroupId() );
 
-        Set artifacts = project.getArtifacts();
+        Set artifacts = result.getMavenProject().getArtifacts();
 
         assertEquals( 1, artifacts.size() );
 
         Artifact artifact = (Artifact) artifacts.iterator().next();
+
+        System.out.println( "artifact = " + artifact );
     }
 
     // ----------------------------------------------------------------------
@@ -227,9 +210,5 @@
     protected File getPomFile()
     {
         return new File( basedir, "src/test/resources/pom.xml" );
-    }
-
-    public void testNothing()
-    {
     }
 }



Mime
View raw message