Return-Path: Delivered-To: apmail-maven-users-archive@www.apache.org Received: (qmail 17112 invoked from network); 5 Oct 2010 08:56:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Oct 2010 08:56:45 -0000 Received: (qmail 80709 invoked by uid 500); 5 Oct 2010 08:56:42 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 80437 invoked by uid 500); 5 Oct 2010 08:56:39 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 80429 invoked by uid 99); 5 Oct 2010 08:56:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Oct 2010 08:56:38 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rosenberg.leon@gmail.com designates 209.85.216.178 as permitted sender) Received: from [209.85.216.178] (HELO mail-qy0-f178.google.com) (209.85.216.178) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Oct 2010 08:56:34 +0000 Received: by qyk2 with SMTP id 2so242022qyk.9 for ; Tue, 05 Oct 2010 01:56:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=XW4QApSs0yxp2XK8Zx9AtF0zvQlEE7FSk0Xlin/WZZc=; b=KmG8cw9URKCszZnq4ohIqFcHdRH3+HHRJnENzzTj9M1xN42LOCwCXi10oVn17PqF/C PG2OeNMDQJ1OacihXnNoQcsB7bBN1k0Mp3Y9uCStv0mzy35RJS7PhQ0XTynOTk3nFScs vE/Fql0i4e7395iJ/KTsquAgvcAlrJZkWDLVY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=pH48qjBIaLX0hnPaOAdOHS12jVBGDw1ZjBAftJhTmXgO8VvlVq2nAFcFYtn94qqVtn bWA8FjI9PgRMzyttvmN3YRhVCEXEnCp35S1V7Qn03JPiO9xoqJB3uz3oeGLCnPCtqid6 viLS8dUvgG1i76rwcyhSpIGw882nDFF2wfc/E= MIME-Version: 1.0 Received: by 10.229.231.8 with SMTP id jo8mr8182707qcb.45.1286268972564; Tue, 05 Oct 2010 01:56:12 -0700 (PDT) Received: by 10.229.99.195 with HTTP; Tue, 5 Oct 2010 01:56:12 -0700 (PDT) In-Reply-To: References: Date: Tue, 5 Oct 2010 10:56:12 +0200 Message-ID: Subject: Re: first plugin From: Leon Rosenberg To: Maven Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ok, resolved, my error, i forgot to explicitly include the compile plugin, therefor my plugin was packaged but contained no classes. thanx for the help. now i only need to force the using project to add generated classes to the source dirs ;-) regards Leon On Tue, Oct 5, 2010 at 8:11 AM, Leon Rosenberg w= rote: > Hello, > > thanks for the help. > > the plugin.xml (packaged) looks like follows: > > > =A0 > =A0net.anotheria > =A0maven-ano-doc-plugin > =A01.0-SNAPSHOT > =A0ano-doc > =A0false > =A0true > =A0 > =A0 > =A0 =A0 > =A0 =A0 =A0org.apache.maven > =A0 =A0 =A0maven-plugin-api > =A0 =A0 =A0jar > =A0 =A0 =A02.0 > =A0 =A0 > =A0 > > > mvn help:describe =A0fails: > [INFO] Scanning for projects... > [INFO] Searching repository for plugin with prefix: 'help'. > [INFO] ------------------------------------------------------------------= ------ > [ERROR] BUILD ERROR > [INFO] ------------------------------------------------------------------= ------ > [INFO] Error building POM (may not be this project's POM). > > > Project ID: org.apache.maven.plugins:maven-help-plugin > > Reason: Error getting POM for > 'org.apache.maven.plugins:maven-help-plugin' from the repository: > Failed to resolve artifact, possibly due to a repository list that is > not appropriately equipped for this artifact's metadata. > =A0org.apache.maven.plugins:maven-help-plugin:pom:2.2-SNAPSHOT > > from the specified remote repositories: > =A0nexus (http://nexus.anotheria.net/nexus/content/groups/public) > > =A0for project org.apache.maven.plugins:maven-help-plugin > > > > > On Tue, Oct 5, 2010 at 12:21 AM, Justin Edelson > wrote: >> Hard to tell from this code. Check the plugin.xml file which is being >> generated. Also mvn help:describe (which uses the plugin.xml >> descriptor IIRC). >> >> Also, my guess is that you don't actually want to include this line: >> * @execute phase=3D"generate-sources" >> >> But I doubt that's the source of the error below. >> >> Justin >> >> >> >> On Mon, Oct 4, 2010 at 5:50 PM, Leon Rosenberg wrote: >>> Hello, >>> >>> I'm currently writing my first plugin and am struggling with very basic= s. >>> From the guide (http://maven.apache.org/guides/plugin/guide-java-plugin= -development.html) >>> I understood that if I >>> specify a goal in a javadoc annotation I will able to call it later >>> directly, but I fail to achieve it. In my plugin I'm annotating the >>> code with generate: >>> >>> >>> /** >>> =A0* Generates ano-doc classes. >>> =A0* >>> =A0* @goal generate >>> =A0* @phase generate-sources >>> =A0* @execute phase=3D"generate-sources" >>> =A0* >>> =A0*/ >>> public class GeneratorMojo extends AbstractMojo{ >>> >>> =A0 =A0 =A0 =A0public void execute() throws MojoExecutionException, Moj= oFailureException { >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0getLog().info("YOOOO HEI!!!!"); >>> >>> =A0 =A0 =A0 =A0} >>> >>> } >>> >>> After the packaging, and installing, and running from the directory I >>> want to use it: >>> another@colin:~/projects/aos/ano-site$ mvn ano-doc:generate >>> [INFO] Scanning for projects... >>> [INFO] ----------------------------------------------------------------= -------- >>> [ERROR] BUILD FAILURE >>> [INFO] ----------------------------------------------------------------= -------- >>> [INFO] Required goal not found: ano-doc:generate in >>> net.anotheria:maven-ano-doc-plugin:1.0-SNAPSHOT >>> [INFO] ----------------------------------------------------------------= -------- >>> [INFO] For more information, run Maven with the -e switch >>> [INFO] ----------------------------------------------------------------= -------- >>> [INFO] Total time: < 1 second >>> [INFO] Finished at: Mon Oct 04 23:48:07 CEST 2010 >>> [INFO] Final Memory: 8M/81M >>> >>> >>> My plugin pom looks like this: >>> >>> =A04.0.0 >>> =A0net.anotheria >>> =A0maven-ano-doc-plugin >>> =A0maven-plugin >>> =A01.0-SNAPSHOT >>> =A0AnoDoc Generator for Maven >>> >>> =A0 =A0 =A0 =A0 >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >>> =A0 =A0 =A0 =A0 >>> >>> =A0 >>> =A0 =A0 >>> =A0 =A0 =A0org.apache.maven >>> =A0 =A0 =A0maven-plugin-api >>> =A0 =A0 =A02.0 >>> =A0 =A0 >>> =A0 >>> >>> >>> my pom in which I intend to use the new project : >>> =A0 >>> =A0 =A0 =A0 =A0 >>> =A0 =A0 =A0 >>> =A0 =A0 =A0 =A0net.anotheria >>> =A0 =A0 =A0 =A0maven-ano-doc-plugin >>> =A0 =A0 =A0 =A01.0-SNAPSHOT >>> =A0 =A0 =A0 =A0 >>> =A0 =A0 =A0 =A0 =A0 >>> =A0 =A0 =A0 =A0 =A0 =A0generate-sources >>> =A0 =A0 =A0 =A0 =A0 =A0 >>> =A0 =A0 =A0 =A0 =A0 =A0 =A0generate >>> =A0 =A0 =A0 =A0 =A0 =A0 >>> =A0 =A0 =A0 =A0 =A0 >>> =A0 =A0 =A0 =A0 >>> =A0 =A0 =A0 >>> =A0 =A0 >>> =A0 >>> >>> >>> any help would be greatly appreciated >>> regards >>> Leon >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >>> For additional commands, e-mail: users-help@maven.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >> For additional commands, e-mail: users-help@maven.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org