maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r1595619 - /maven/site/trunk/content/apt/plugin-developers/plugin-testing.apt
Date Sun, 18 May 2014 14:08:43 GMT
Author: jvanzyl
Date: Sun May 18 14:08:42 2014
New Revision: 1595619

URL: http://svn.apache.org/r1595619
Log:
Remove eroneous example which references the outdated embedder and methods in the @MojoRule
that don't exist.

Modified:
    maven/site/trunk/content/apt/plugin-developers/plugin-testing.apt

Modified: maven/site/trunk/content/apt/plugin-developers/plugin-testing.apt
URL: http://svn.apache.org/viewvc/maven/site/trunk/content/apt/plugin-developers/plugin-testing.apt?rev=1595619&r1=1595618&r2=1595619&view=diff
==============================================================================
--- maven/site/trunk/content/apt/plugin-developers/plugin-testing.apt (original)
+++ maven/site/trunk/content/apt/plugin-developers/plugin-testing.apt Sun May 18 14:08:42
2014
@@ -440,48 +440,3 @@ public class TrivialMavenVerifierTest ex
   ...
 </project>
 +-----+
-
- The *TestIt classes could use the Maven Embedder to provide tests:
-
-+-----+
-public class MyMojoTestIt
-    extends PlexusTestCase
-{
-    /**
-     * @throws Exception
-     */
-    public void testDefaultProject()
-        throws Exception
-    {
-        MavenEmbedder maven = new MavenEmbedder();
-        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-        maven.setClassLoader( classLoader );
-        maven.setLogger( new MavenEmbedderConsoleLogger() );
-        maven.setOffline( true );
-        maven.setLocalRepositoryDirectory( getTestFile( "target/local-repo" ) );
-        maven.start();
-
-        File itbasedir = new File( getBasedir(), "src/it/it1" );
-        MavenProject pom =
-          maven.readProjectWithDependencies( new File( itbasedir, "pom.xml" ) );
-
-        EventMonitor eventMonitor =
-          new DefaultEventMonitor(
-            new PlexusLoggerAdapter(
-              new MavenEmbedderConsoleLogger() ) );
-        maven.execute( pom,
-          Collections.singletonList(
-            "org.apache.maven.plugins:maven-XXX-plugin:1.0-SNAPSHOT:yourGoal" ),
-          eventMonitor,
-          new ConsoleDownloadMonitor(),
-          null,
-          itbasedir );
-
-        maven.stop();
-    }
-}
-+-----+
-
- <<Note>>: The {{{https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-it-plugin/}maven-plugin-management-plugin}}
- is similar to <<<maven-plugin-test-plugin>>>.
-



Mime
View raw message