Return-Path: X-Original-To: apmail-maven-commits-archive@www.apache.org Delivered-To: apmail-maven-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B818111826 for ; Sun, 18 May 2014 14:35:51 +0000 (UTC) Received: (qmail 65722 invoked by uid 500); 18 May 2014 14:10:50 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 62441 invoked by uid 500); 18 May 2014 14:10:47 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 55645 invoked by uid 99); 18 May 2014 14:09:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 May 2014 14:09:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 May 2014 14:09:06 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 134432388868; Sun, 18 May 2014 14:08:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1595619 - /maven/site/trunk/content/apt/plugin-developers/plugin-testing.apt Date: Sun, 18 May 2014 14:08:43 -0000 To: commits@maven.apache.org From: jvanzyl@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140518140843.134432388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 ... +-----+ - - 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(); - } -} -+-----+ - - <>: The {{{https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-it-plugin/}maven-plugin-management-plugin}} - is similar to <<>>. -