from my experience plugin is an independent unit of execution meant to perform 
a discrete unit of work
as such each maven-plugin execution lifecycle is independent of any other plugin
the container (in this case Plexus) has knowledge of all configured plugins by 
their definition within pom.xml
each plugin can inject known features which would include features such as 
logging or security
because a plugins execution is a independent unit of work the plugin executes 
independently of other plugins
a maven plugin can have dependencies allowing it to 'inject' the requested 
features of the dependent entity

this is called Injection of Control and is discussed in great detail at
http://www.ibm.com/developerworks/web/library/wa-spring1/ 

i hope this has answered your question
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Subject: Re: Re: Use a mojo within a mojo
> From: [email protected]
> Date: Wed, 28 Oct 2009 12:14:23 +0100
> To: [email protected]
> 
> Hi Wayne
> 
> Thanks for the answer, obviously my question wasn't clear enough: I  
> read that mojos are components, how do I get such a component injected  
> within another mojo?
> 
> "A Mojo is much more than just a goal in Maven, it is a component  
> managed by Plexus that can include references to other Plexus  
> components."
> 
>  From "maven definitive guide", chapter 17.2.4. What is a Plugin?
> 
> 
> > Extract the method to a utility class/jar/artifact which you can
> > depend on independently of your mojos, and then call it from each
> > mojo. And then, yes, you'll need to declare each plugin in your pom.
> 
> Tsuy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
                                          
_________________________________________________________________
Windows 7: It helps you do more. Explore Windows 7.
http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen3:102009

Reply via email to