Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5A07DEFE4 for ; Fri, 1 Feb 2013 12:05:26 +0000 (UTC) Received: (qmail 29353 invoked by uid 500); 1 Feb 2013 12:05:24 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 29092 invoked by uid 500); 1 Feb 2013 12:05:22 -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 29040 invoked by uid 99); 1 Feb 2013 12:05:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2013 12:05:21 +0000 X-ASF-Spam-Status: No, hits=3.2 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mgainty@hotmail.com designates 65.55.116.12 as permitted sender) Received: from [65.55.116.12] (HELO blu0-omc1-s1.blu0.hotmail.com) (65.55.116.12) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2013 12:05:14 +0000 Received: from BLU172-W7 ([65.55.116.8]) by blu0-omc1-s1.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 1 Feb 2013 04:04:53 -0800 X-EIP: [FP3/dj03P5Ojlk76qljNoCPv7/arhXOU] X-Originating-Email: [mgainty@hotmail.com] Message-ID: Content-Type: multipart/alternative; boundary="_2c1e682a-09f2-4137-9691-c38f2e73cc82_" From: Martin Gainty To: "users@maven.apache.org" Subject: RE: Possible PluginManager interaction with Guice bug Date: Fri, 1 Feb 2013 07:04:53 -0500 Importance: Normal In-Reply-To: References: , MIME-Version: 1.0 X-OriginalArrivalTime: 01 Feb 2013 12:04:53.0694 (UTC) FILETIME=[583D45E0:01CE0074] X-Virus-Checked: Checked by ClamAV on apache.org --_2c1e682a-09f2-4137-9691-c38f2e73cc82_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Stuart Yes i agree that the PluginManager *should* be discovering the implementor = at for Java class but instead pulls in AbstractMode= lloGeneratorMojo which extends AbstractMojo Jira entry http://jira.codehaus.org/browse/MPLUGIN-240?focusedCommentId=3D318476#comme= nt-318476 Thanks=2C Martin Gainty=20 ______________________________________________=20 Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit= =E9 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaeng= er sein=2C so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiter= leitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient l= ediglich dem Austausch von Informationen und entfaltet keine rechtliche Bin= dungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen w= ir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAtes= pas le destinataire pr=E9vu=2C nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation= =2C nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni= . > Date: Fri=2C 1 Feb 2013 11:12:54 +0000 > Subject: Re: Possible PluginManager interaction with Guice bug > From: mcculls@gmail.com > To: users@maven.apache.org >=20 > On 31 January 2013 21:29=2C Martin Gainty wrote: >=20 > > > > Gentlemen > > I found a consistent bug with PluginManager not able to locate @goal/**= * > > artifactId=3Dmodello-maven-plugin > > * @author Trygve Laugst=F8l > > * @version 1.5 > > * @threadSafe > > */ > > public abstract class AbstractModelloGeneratorMojo extends AbstractMojo > > notice the lack of @goal .. because this is an abstract class which is > > expected to be extend'ed by a concrete > > the PluginManager backtraces classes to find who is extending AbstractM= ojo > > and correctly identifies > > org.codehaus.modello.maven.AbstractModelloGeneratorMojo > > org.apache.maven.plugin.MojoExecutionException: Error generating: No su= ch > > plugin: java > > at > > org.codehaus.modello.maven.AbstractModelloGeneratorMojo.doExecute(Abstr= actModelloGeneratorMojo.java:324) > > > > abstract class AbstractModelloGeneratorMojo has no @goal .. pluginManag= er > > will always throw MojoExecutionException > > > > solution is to have the concrete class which contains annotated @goal > > extend AbstractMojo > > /*** Echos an object string to the output screen. > > * @goal java > > * @requiresProject false > > @Mojo(name "java") > > */ > > public class ModelloJavaMojo extends AbstractMojo implements > > org.codehaus.modello.core.ModelloCore > > { public void execute() > > } > > > > if I run mvn dependency:tree i can see the guice injector the > > modello-maven-plugin is expecting > > [DEBUG] org.codehaus.modello:modello-maven-plugin:maven-plugin:1.1 > > [DEBUG] com.google.inject:guice:jar:2.0:compile > > > > maven-core implements guice as well > > [DEBUG] org.apache.maven:maven-core:jar:3.0.2:compile > > [DEBUG] org.sonatype.sisu:sisu-guice:jar:2.9.1:compile > > > > the options seem to be > > 1)disable guice and replace with plexus..if you find a way please let m= e > > know > > 2)refactor all concrete classes which already implement @goal to extend > > AbstractMojo so PluginManager will > > find the Mojo which contains the expected goal from plugin.xml > > > > Thoughts? > > >=20 > Don't see how this relates to guice=2C seems more likely to be something = to > do with the build-time generation of the plugin.xml. Suggest you create a= n > issue on http://jira.codehaus.org/browse/MPLUGIN and attach your test > project. Also I don't see anywhere in the PluginManager implementation > where it "backtraces classes to find who is extending AbstractMojo"=2C > instead it looks up the implementation indirectly via the MojoDescriptor > that's populated from the plugin.xml. >=20 > --=20 > Cheers=2C Stuart >=20 >=20 > > Martin Gainty > > = --_2c1e682a-09f2-4137-9691-c38f2e73cc82_--