You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dan Tran <da...@gmail.com> on 2010/06/24 08:48:07 UTC
Integrate Spring bean with Maven plugin ?
Hi
I have a set of Spring beans that I'd like to wrap them with maven
plugin's mojo. Any suggestion?
Thanks
-Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Integrate Spring bean with Maven plugin ?
Posted by Dan Tran <da...@gmail.com>.
Is there a place where I can create spring context to be shared among
mojo's execution? Sound like I need to create a wrapper singleton to
create the context?
-D
On Thu, Jun 24, 2010 at 4:38 PM, Brian Topping <to...@codehaus.org> wrote:
> If you start the Spring container manually, it will return a context that you can query for beans. Within that started context, the beans will have obviously been wired according to your configuration.
>
> There's no limitation on where you create the context, but to get beans from the context, you need a reference to the context. Use your favorite patterns to save the reference somewhere safe, and you are on your way.
>
> On Jun 24, 2010, at 5:56 PM, Dan Tran wrote:
>
>> basically i have all my spring beans wiring up thru an small initial
>> xml config file, the rest are thru annotation ( spring 3.0.x )
>>
>> so if I want to wrap Spring Service with maven mojo, i guess i need to
>> start the the spring container from some where. Where is the right
>> place in the plugin?
>>
>> -D
>>
>> On Thu, Jun 24, 2010 at 1:46 PM, Baptiste MATHUS <ml...@batmat.net> wrote:
>>> I guess you'll have to be give more details about what you want to do.
>>> I don't understand: you want to create a jar containing spring beans? What
>>> do you mean by spring beans (xml configuration, annotation, other...). Are
>>> you writing a mojo where you want to use some part of spring, or even use
>>> spring managed beans?
>>>
>>> Cheers
>>>
>>> 2010/6/24 Dan Tran <da...@gmail.com>
>>>
>>>> Hi
>>>>
>>>> I have a set of Spring beans that I'd like to wrap them with maven
>>>> plugin's mojo. Any suggestion?
>>>>
>>>> Thanks
>>>>
>>>> -Dan
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>
>>>
>>> --
>>> Baptiste <Batmat> MATHUS - http://batmat.net
>>> Sauvez un arbre,
>>> Mangez un castor !
>>>
>>
>> ---------------------------------------------------------------------
>> 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
Re: Integrate Spring bean with Maven plugin ?
Posted by Brian Topping <to...@codehaus.org>.
If you start the Spring container manually, it will return a context that you can query for beans. Within that started context, the beans will have obviously been wired according to your configuration.
There's no limitation on where you create the context, but to get beans from the context, you need a reference to the context. Use your favorite patterns to save the reference somewhere safe, and you are on your way.
On Jun 24, 2010, at 5:56 PM, Dan Tran wrote:
> basically i have all my spring beans wiring up thru an small initial
> xml config file, the rest are thru annotation ( spring 3.0.x )
>
> so if I want to wrap Spring Service with maven mojo, i guess i need to
> start the the spring container from some where. Where is the right
> place in the plugin?
>
> -D
>
> On Thu, Jun 24, 2010 at 1:46 PM, Baptiste MATHUS <ml...@batmat.net> wrote:
>> I guess you'll have to be give more details about what you want to do.
>> I don't understand: you want to create a jar containing spring beans? What
>> do you mean by spring beans (xml configuration, annotation, other...). Are
>> you writing a mojo where you want to use some part of spring, or even use
>> spring managed beans?
>>
>> Cheers
>>
>> 2010/6/24 Dan Tran <da...@gmail.com>
>>
>>> Hi
>>>
>>> I have a set of Spring beans that I'd like to wrap them with maven
>>> plugin's mojo. Any suggestion?
>>>
>>> Thanks
>>>
>>> -Dan
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>> --
>> Baptiste <Batmat> MATHUS - http://batmat.net
>> Sauvez un arbre,
>> Mangez un castor !
>>
>
> ---------------------------------------------------------------------
> 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
Re: Integrate Spring bean with Maven plugin ?
Posted by Dan Tran <da...@gmail.com>.
basically i have all my spring beans wiring up thru an small initial
xml config file, the rest are thru annotation ( spring 3.0.x )
so if I want to wrap Spring Service with maven mojo, i guess i need to
start the the spring container from some where. Where is the right
place in the plugin?
-D
On Thu, Jun 24, 2010 at 1:46 PM, Baptiste MATHUS <ml...@batmat.net> wrote:
> I guess you'll have to be give more details about what you want to do.
> I don't understand: you want to create a jar containing spring beans? What
> do you mean by spring beans (xml configuration, annotation, other...). Are
> you writing a mojo where you want to use some part of spring, or even use
> spring managed beans?
>
> Cheers
>
> 2010/6/24 Dan Tran <da...@gmail.com>
>
>> Hi
>>
>> I have a set of Spring beans that I'd like to wrap them with maven
>> plugin's mojo. Any suggestion?
>>
>> Thanks
>>
>> -Dan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor !
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Integrate Spring bean with Maven plugin ?
Posted by Baptiste MATHUS <ml...@batmat.net>.
I guess you'll have to be give more details about what you want to do.
I don't understand: you want to create a jar containing spring beans? What
do you mean by spring beans (xml configuration, annotation, other...). Are
you writing a mojo where you want to use some part of spring, or even use
spring managed beans?
Cheers
2010/6/24 Dan Tran <da...@gmail.com>
> Hi
>
> I have a set of Spring beans that I'd like to wrap them with maven
> plugin's mojo. Any suggestion?
>
> Thanks
>
> -Dan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !