maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tonté Pouncil <pouncilt.develo...@gmail.com>
Subject Re: How to use PluginContext() method of AbstractMojo or ContextEnabled for custom Mojos?
Date Sun, 10 Jun 2012 15:00:03 GMT
How do I do this?

Thanks.

On Jun 9, 2012, at 9:42 PM, Dan Tran wrote:

> your mojos may need to be related in a maven lifecycle extension
> 
> -D
> 
> On Sat, Jun 9, 2012 at 7:29 PM, Tonté Pouncil
> <pouncilt.developer@gmail.com> wrote:
>> Yes.  I have already tried to set the context map with my Mojo and retrieve it with
my other Mojo; but it is still null.
>> 
>> Okay I will look at native-maven-plugin and see what they are doing?
>> 
>> I create an abstract class that has a static variable that hold my object that both
Mojos can access.
>> 
>> Thanks!
>> 
>> Tonté
>> On Jun 9, 2012, at 6:45 PM, Dan Tran wrote:
>> 
>>> see native-maven-plugin at MOJO, you can find pluginContext usage there
>>> 
>>> -D
>>> 
>>> On Sat, Jun 9, 2012 at 1:52 PM, Aliaksei Lahachou
>>> <aliaksei.lahachou@googlemail.com> wrote:
>>>> Hi,
>>>> 
>>>> have you tried to setPluginContext with a map that you instantiate yourself
>>>> and see if it's available in mojo2?
>>>> 
>>>> 
>>>> Regards,
>>>> htfv (Aliaksei Lahachou)
>>>> 
>>>> 
>>>> On Fri, Jun 8, 2012 at 1:36 PM, Tonté Pouncil
>>>> <pouncilt.developer@gmail.com>wrote:
>>>> 
>>>>> Hello,
>>>>> 
>>>>> I am trying to get two custom Mojos that I have created to communicate
>>>>> with each other.  Mojo1 creates an object that I want to be available
when
>>>>> Mojo2 executes.  How do I do this?
>>>>> 
>>>>> I've been trying to use
>>>>> org.apache.maven.plugin.AbstractMojo#set/getPluginContext() method and
>>>>> org.apache.mavin.plugin.ContextEnabled.  But so far the context is null.
>>>>> 
>>>>> Thank you.
>>>>> 
>>>>> Tonté
>>>>> ---------------------------------------------------------------------
>>>>> 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
>> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message