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 2016/08/31 06:43:27 UTC

Maven Plugin and JSR330

Hi

I have a need  to  inject my jsr330 component into my plugins[1] and I
found 2 issues

1. @Inject under MOJO works, but my singleton component @PreDestroy never
got called

2.  @Inject at my component does not work.


I wonder if anyone able to get JSR330 fully working for your maven plugin
development?

my env is maven 3.3.9 and java 8


Thanks

-Dan



[1] http://maven.apache.org/maven-jsr330.html

Re: Maven Plugin and JSR330

Posted by Stuart McCulloch <mc...@gmail.com>.
Thanks, looks good to me

On Sunday, 20 November 2016 at 17:46, Dan Tran wrote:

> I filed a PR at https://github.com/apache/maven/pull/98.
>  
> On Thu, Nov 17, 2016 at 8:48 PM, Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com)> wrote:
> > It works!!! Thanks Stuard
> >  
> > So my change should be good for commit for 3.4?
> >  
> > -Dan
> >  
> > On Sun, Nov 13, 2016 at 3:01 PM, Stuart McCulloch <mcculls@gmail.com (mailto:mcculls@gmail.com)>
> > wrote:
> >  
> > > Hi Dan,
> > >  
> > > There are two places in MavenCli which create a container.
> > >  
> > > You’ve enabled JSR250 for the temporary container that resolves the core
> > > extensions, but not the main container that runs the Mojos:
> > >  
> > > https://github.com/dantran/maven/blob/master/maven-embedder/
> > > src/main/java/org/apache/maven/cli/MavenCli.java#L585
> > >  
> > > If I enable JSR250 in the above line then your test passes.
> > >  
> > > --
> > > Cheers, Stuart
> > >  
> > >  
> > > On Sunday, 13 November 2016 at 22:10, Dan Tran wrote:
> > >  
> > > > @Stuard
> > > >  
> > > > Could you review my changes at
> > > > https://github.com/dantran/maven/commits/master? I still not able to
> > > >  
> > >  
> > > get
> > > > @PostContruct working yet
> > > >  
> > > > Thanks
> > > >  
> > > > -Dan
> > > >  
> > > > On Sun, Sep 11, 2016 at 7:27 PM, Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com) (mailto:
> > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > >  
> > > > > Thanks Stuart, very much appreciated
> > > > >  
> > > > > -D
> > > > >  
> > > > > On Sun, Sep 11, 2016 at 7:22 PM, Stuart McCulloch <mcculls@gmail.com (mailto:mcculls@gmail.com)
> > > (mailto:mcculls@gmail.com)>
> > > > > wrote:
> > > > >  
> > > > > > Sorry, last week was very busy with work and family
> > > > > >  
> > > > > > I’ve listed the necessary config changes in
> > > > > > https://issues.apache.org/jira/browse/MNG-6084
> > > > > >  
> > > > > > --
> > > > > > Cheers, Stuart
> > > > > >  
> > > > > >  
> > > > > > On Sunday, 11 September 2016 at 04:28, Dan Tran wrote:
> > > > > >  
> > > > > > > @Stuart, ping :-)
> > > > > > >  
> > > > > > > On Tue, Sep 6, 2016 at 7:06 PM, Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com)
> > > (mailto:dantran@gmail.com) (mailto:
> > > > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > > > > >  
> > > > > > > > @Stuart, could you provide instructions on how to enable JSR 250
> > > > > > support?
> > > > > > > >  
> > > > > > > > Thanks
> > > > > > > >  
> > > > > > > >  
> > > > > > > > -Dan
> > > > > > > >  
> > > > > > > > On Fri, Sep 2, 2016 at 9:22 AM, Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com)
> > > (mailto:dantran@gmail.com) (mailto:
> > > > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > > > > > >  
> > > > > > > > > here you go https://issues.apache.org/jira/browse/MNG-6084
> > > > > > > > >  
> > > > > > > > > Very much appreciated
> > > > > > > > >  
> > > > > > > > > -Dan
> > > > > > > > >  
> > > > > > > > > On Fri, Sep 2, 2016 at 8:42 AM, Stuart McCulloch <
> > > mcculls@gmail.com (mailto:mcculls@gmail.com)
> > > > > > (mailto:mcculls@gmail.com)>
> > > > > > > > > wrote:
> > > > > > > > >  
> > > > > > > > > > On Wednesday, 31 August 2016 at 19:05, Dan Tran wrote:
> > > > > > > > > > > Hi Stuart
> > > > > > > > > > >  
> > > > > > > > > > > Thanks for helping out.
> > > > > > > > > > >  
> > > > > > > > > > > I have 3 mojos, sharing one singleton component which
> > > depends on
> > > > > > > > > > another
> > > > > > > > > > > singleton component thru injection. All working now via
> > > > > > > > > >  
> > > > > > > > > >  
> > > > > > > > >  
> > > > > > > >  
> > > > > > >  
> > > > > >  
> > > > >  
> > > >  
> > >  
> > > both
> > > > > > > > > >  
> > > > > > > > >  
> > > > > > > >  
> > > > > > >  
> > > > > >  
> > > > > >  
> > > > > > injection
> > > > > > > > > >  
> > > > > > > > > > type
> > > > > > > > > > > ( after some cleanup)
> > > > > > > > > > >  
> > > > > > > > > > > should I file a JIRA to enable JSR-250 support fo rmaven
> > > 3.4?
> > > > > > > > > > Sure - send me the ticket number and I’ll add some
> > > > > > > > >  
> > > > > > > >  
> > > > > > >  
> > > > > >  
> > > > >  
> > > >  
> > >  
> > > commentary this
> > > > > > > > > > weekend
> > > > > > > > > > > looking forward to use it
> > > > > > > > > > >  
> > > > > > > > > > > Thanks
> > > > > > > > > > >  
> > > > > > > > > > > -Dan
> > > > > > > > > > >  
> > > > > > > > > > >  
> > > > > > > > > > >  
> > > > > > > > > > > On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <
> > > > > > mcculls@gmail.com (mailto:mcculls@gmail.com)
> > > > > > > > > > (mailto:mcculls@gmail.com)> wrote:
> > > > > > > > > > >  
> > > > > > > > > > > > Hi Dan,
> > > > > > > > > > > >  
> > > > > > > > > > > > Constructor injection (and component injection) is
> > > working
> > > > > > for me
> > > > > > > > > > with
> > > > > > > > > > > > Maven 3.3.9 if I follow the example in
> > > > > > > > > > >  
> > > > > > > > > >  
> > > > > > > > > >  
> > > > > > > > > >  
> > > > > > > > > > http://maven.apache.org/maven-
> > > > > > > > > > > > jsr330.html
> > > > > > > > > > > >  
> > > > > > > > > > > > Is your plugin code available somewhere?
> > > > > > > > > > > >  
> > > > > > > > > > > > PS. at the moment Maven doesn’t enable container
> > > support for
> > > > > > JSR-250
> > > > > > > > > > > > lifecycle, but it is implemented by Sisu under a
> > > > > > > > > > >  
> > > > > > > > > >  
> > > > > > > > >  
> > > > > > > >  
> > > > > > >  
> > > > > >  
> > > > > >  
> > > > >  
> > > >  
> > >  
> > > feature flag:
> > > > > > > > > > > >  
> > > > > > > > > > > > https://github.com/eclipse/sis
> > > u.plexus/blob/releases/0.3.
> > > > > > > > > > > > 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
> > > > > > > > > > > > ContainerConfiguration.java#L62
> > > > > > > > > > > >  
> > > > > > > > > > > > --
> > > > > > > > > > > > Cheers, Stuart
> > > > > > > > > > > >  
> > > > > > > > > > > >  
> > > > > > > > > > > > On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
> > > > > > > > > > > >  
> > > > > > > > > > > > > Hi Thomas,
> > > > > > > > > > > > >  
> > > > > > > > > > > > > You are right!!! looking for how to fix this...
> > > > > > > > > > > > >  
> > > > > > > > > > > > > The only thing working for me is field injection at
> > > MOJO.
> > > > > > event The
> > > > > > > > > > > > > constructor injection ( as documented) at MOJO is not.
> > > > > > > > > > > > >  
> > > > > > > > > > > > > Thanks
> > > > > > > > > > > > >  
> > > > > > > > > > > > > -Dan
> > > > > > > > > > > > >  
> > > > > > > > > > > > > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <
> > > > > > t.broyer@gmail.com (mailto:t.broyer@gmail.com)
> > > > > > > > > > (mailto:t.broyer@gmail.com)
> > > > > > > > > > > > (mailto:t.broyer@gmail.com)> wrote:
> > > > > > > > > > > > >  
> > > > > > > > > > > > > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <
> > > > > > dantran@gmail.com (mailto:dantran@gmail.com)
> > > > > > > > > > (mailto:dantran@gmail.com) (mailto:
> > > > > > > > > > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > Hi
> > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > I have a need to inject my jsr330 component into
> > > my
> > > > > > plugins[1]
> > > > > > > > > > and I
> > > > > > > > > > > > > > > found 2 issues
> > > > > > > > > > > > > > >  
> > > > > > > > > > > > > > > 1. @Inject under MOJO works, but my singleton
> > > component
> > > > > > > > > > @PreDestroy
> > > > > > > > > > > > never
> > > > > > > > > > > > > > > got called
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > >  
> > > > > > > > > > > > > > @PreDestroy is not part of JSR 330, it's a CDI
> > > thing, so
> > > > > > no
> > > > > > > > > > wonder
> > > > > > > > > > > > it's not
> > > > > > > > > > > > > > called.
> > > > > > > > > > > > >  
> > > > > > > > > > > >  
> > > > > > > > > > > >  
> > > > > > > > > > >  
> > > > > > > > > >  
> > > > > > > > > >  
> > > > > > > > >  
> > > > > > > >  
> > > > > > >  
> > > > > >  
> > > > > >  
> > > > >  
> > > >  
> > >  
> > >  
> >  
> >  
>  
>  
>  



Re: Maven Plugin and JSR330

Posted by Dan Tran <da...@gmail.com>.
I filed a PR at https://github.com/apache/maven/pull/98.

On Thu, Nov 17, 2016 at 8:48 PM, Dan Tran <da...@gmail.com> wrote:

> It works!!! Thanks Stuard
>
> So my change should be good for commit for 3.4?
>
> -Dan
>
> On Sun, Nov 13, 2016 at 3:01 PM, Stuart McCulloch <mc...@gmail.com>
> wrote:
>
>> Hi Dan,
>>
>> There are two places in MavenCli which create a container.
>>
>> You’ve enabled JSR250 for the temporary container that resolves the core
>> extensions, but not the main container that runs the Mojos:
>>
>> https://github.com/dantran/maven/blob/master/maven-embedder/
>> src/main/java/org/apache/maven/cli/MavenCli.java#L585
>>
>> If I enable JSR250 in the above line then your test passes.
>>
>> --
>> Cheers, Stuart
>>
>>
>> On Sunday, 13 November 2016 at 22:10, Dan Tran wrote:
>>
>> > @Stuard
>> >
>> > Could you review my changes at
>> > https://github.com/dantran/maven/commits/master? I still not able to
>> get
>> > @PostContruct working yet
>> >
>> > Thanks
>> >
>> > -Dan
>> >
>> > On Sun, Sep 11, 2016 at 7:27 PM, Dan Tran <dantran@gmail.com (mailto:
>> dantran@gmail.com)> wrote:
>> >
>> > > Thanks Stuart, very much appreciated
>> > >
>> > > -D
>> > >
>> > > On Sun, Sep 11, 2016 at 7:22 PM, Stuart McCulloch <mcculls@gmail.com
>> (mailto:mcculls@gmail.com)>
>> > > wrote:
>> > >
>> > > > Sorry, last week was very busy with work and family
>> > > >
>> > > > I’ve listed the necessary config changes in
>> > > > https://issues.apache.org/jira/browse/MNG-6084
>> > > >
>> > > > --
>> > > > Cheers, Stuart
>> > > >
>> > > >
>> > > > On Sunday, 11 September 2016 at 04:28, Dan Tran wrote:
>> > > >
>> > > > > @Stuart, ping :-)
>> > > > >
>> > > > > On Tue, Sep 6, 2016 at 7:06 PM, Dan Tran <dantran@gmail.com
>> (mailto:dantran@gmail.com) (mailto:
>> > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
>> > > > >
>> > > > > > @Stuart, could you provide instructions on how to enable JSR 250
>> > > > support?
>> > > > > >
>> > > > > > Thanks
>> > > > > >
>> > > > > >
>> > > > > > -Dan
>> > > > > >
>> > > > > > On Fri, Sep 2, 2016 at 9:22 AM, Dan Tran <dantran@gmail.com
>> (mailto:dantran@gmail.com) (mailto:
>> > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
>> > > > > >
>> > > > > > > here you go https://issues.apache.org/jira/browse/MNG-6084
>> > > > > > >
>> > > > > > > Very much appreciated
>> > > > > > >
>> > > > > > > -Dan
>> > > > > > >
>> > > > > > > On Fri, Sep 2, 2016 at 8:42 AM, Stuart McCulloch <
>> mcculls@gmail.com (mailto:mcculls@gmail.com)
>> > > > (mailto:mcculls@gmail.com)>
>> > > > > > > wrote:
>> > > > > > >
>> > > > > > > > On Wednesday, 31 August 2016 at 19:05, Dan Tran wrote:
>> > > > > > > > > Hi Stuart
>> > > > > > > > >
>> > > > > > > > > Thanks for helping out.
>> > > > > > > > >
>> > > > > > > > > I have 3 mojos, sharing one singleton component which
>> depends on
>> > > > > > > > another
>> > > > > > > > > singleton component thru injection. All working now via
>> both
>> > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > > > injection
>> > > > > > > >
>> > > > > > > > type
>> > > > > > > > > ( after some cleanup)
>> > > > > > > > >
>> > > > > > > > > should I file a JIRA to enable JSR-250 support fo rmaven
>> 3.4?
>> > > > > > > > Sure - send me the ticket number and I’ll add some
>> commentary this
>> > > > > > > > weekend
>> > > > > > > > > looking forward to use it
>> > > > > > > > >
>> > > > > > > > > Thanks
>> > > > > > > > >
>> > > > > > > > > -Dan
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <
>> > > > mcculls@gmail.com (mailto:mcculls@gmail.com)
>> > > > > > > > (mailto:mcculls@gmail.com)> wrote:
>> > > > > > > > >
>> > > > > > > > > > Hi Dan,
>> > > > > > > > > >
>> > > > > > > > > > Constructor injection (and component injection) is
>> working
>> > > > for me
>> > > > > > > > with
>> > > > > > > > > > Maven 3.3.9 if I follow the example in
>> > > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > > > http://maven.apache.org/maven-
>> > > > > > > > > > jsr330.html
>> > > > > > > > > >
>> > > > > > > > > > Is your plugin code available somewhere?
>> > > > > > > > > >
>> > > > > > > > > > PS. at the moment Maven doesn’t enable container
>> support for
>> > > > JSR-250
>> > > > > > > > > > lifecycle, but it is implemented by Sisu under a
>> feature flag:
>> > > > > > > > > >
>> > > > > > > > > > https://github.com/eclipse/sis
>> u.plexus/blob/releases/0.3.
>> > > > > > > > > > 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
>> > > > > > > > > > ContainerConfiguration.java#L62
>> > > > > > > > > >
>> > > > > > > > > > --
>> > > > > > > > > > Cheers, Stuart
>> > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > > > On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
>> > > > > > > > > >
>> > > > > > > > > > > Hi Thomas,
>> > > > > > > > > > >
>> > > > > > > > > > > You are right!!! looking for how to fix this...
>> > > > > > > > > > >
>> > > > > > > > > > > The only thing working for me is field injection at
>> MOJO.
>> > > > event The
>> > > > > > > > > > > constructor injection ( as documented) at MOJO is not.
>> > > > > > > > > > >
>> > > > > > > > > > > Thanks
>> > > > > > > > > > >
>> > > > > > > > > > > -Dan
>> > > > > > > > > > >
>> > > > > > > > > > > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <
>> > > > t.broyer@gmail.com (mailto:t.broyer@gmail.com)
>> > > > > > > > (mailto:t.broyer@gmail.com)
>> > > > > > > > > > (mailto:t.broyer@gmail.com)> wrote:
>> > > > > > > > > > >
>> > > > > > > > > > > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <
>> > > > dantran@gmail.com (mailto:dantran@gmail.com)
>> > > > > > > > (mailto:dantran@gmail.com) (mailto:
>> > > > > > > > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
>> > > > > > > > > > > >
>> > > > > > > > > > > > > Hi
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > I have a need to inject my jsr330 component into
>> my
>> > > > plugins[1]
>> > > > > > > > and I
>> > > > > > > > > > > > > found 2 issues
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > 1. @Inject under MOJO works, but my singleton
>> component
>> > > > > > > > @PreDestroy
>> > > > > > > > > > never
>> > > > > > > > > > > > > got called
>> > > > > > > > > > > >
>> > > > > > > > > > > >
>> > > > > > > > > > > >
>> > > > > > > > > > > >
>> > > > > > > > > > > >
>> > > > > > > > > > > > @PreDestroy is not part of JSR 330, it's a CDI
>> thing, so
>> > > > no
>> > > > > > > > wonder
>> > > > > > > > > > it's not
>> > > > > > > > > > > > called.
>> > > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > >
>> > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > > >
>> > >
>> > >
>> >
>> >
>> >
>>
>>
>>
>

Re: Maven Plugin and JSR330

Posted by Dan Tran <da...@gmail.com>.
It works!!! Thanks Stuard

So my change should be good for commit for 3.4?

-Dan

On Sun, Nov 13, 2016 at 3:01 PM, Stuart McCulloch <mc...@gmail.com> wrote:

> Hi Dan,
>
> There are two places in MavenCli which create a container.
>
> You’ve enabled JSR250 for the temporary container that resolves the core
> extensions, but not the main container that runs the Mojos:
>
> https://github.com/dantran/maven/blob/master/maven-
> embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L585
>
> If I enable JSR250 in the above line then your test passes.
>
> --
> Cheers, Stuart
>
>
> On Sunday, 13 November 2016 at 22:10, Dan Tran wrote:
>
> > @Stuard
> >
> > Could you review my changes at
> > https://github.com/dantran/maven/commits/master? I still not able to get
> > @PostContruct working yet
> >
> > Thanks
> >
> > -Dan
> >
> > On Sun, Sep 11, 2016 at 7:27 PM, Dan Tran <dantran@gmail.com (mailto:
> dantran@gmail.com)> wrote:
> >
> > > Thanks Stuart, very much appreciated
> > >
> > > -D
> > >
> > > On Sun, Sep 11, 2016 at 7:22 PM, Stuart McCulloch <mcculls@gmail.com
> (mailto:mcculls@gmail.com)>
> > > wrote:
> > >
> > > > Sorry, last week was very busy with work and family
> > > >
> > > > I’ve listed the necessary config changes in
> > > > https://issues.apache.org/jira/browse/MNG-6084
> > > >
> > > > --
> > > > Cheers, Stuart
> > > >
> > > >
> > > > On Sunday, 11 September 2016 at 04:28, Dan Tran wrote:
> > > >
> > > > > @Stuart, ping :-)
> > > > >
> > > > > On Tue, Sep 6, 2016 at 7:06 PM, Dan Tran <dantran@gmail.com
> (mailto:dantran@gmail.com) (mailto:
> > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > > >
> > > > > > @Stuart, could you provide instructions on how to enable JSR 250
> > > > support?
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > > -Dan
> > > > > >
> > > > > > On Fri, Sep 2, 2016 at 9:22 AM, Dan Tran <dantran@gmail.com
> (mailto:dantran@gmail.com) (mailto:
> > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > > > >
> > > > > > > here you go https://issues.apache.org/jira/browse/MNG-6084
> > > > > > >
> > > > > > > Very much appreciated
> > > > > > >
> > > > > > > -Dan
> > > > > > >
> > > > > > > On Fri, Sep 2, 2016 at 8:42 AM, Stuart McCulloch <
> mcculls@gmail.com (mailto:mcculls@gmail.com)
> > > > (mailto:mcculls@gmail.com)>
> > > > > > > wrote:
> > > > > > >
> > > > > > > > On Wednesday, 31 August 2016 at 19:05, Dan Tran wrote:
> > > > > > > > > Hi Stuart
> > > > > > > > >
> > > > > > > > > Thanks for helping out.
> > > > > > > > >
> > > > > > > > > I have 3 mojos, sharing one singleton component which
> depends on
> > > > > > > > another
> > > > > > > > > singleton component thru injection. All working now via
> both
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > > injection
> > > > > > > >
> > > > > > > > type
> > > > > > > > > ( after some cleanup)
> > > > > > > > >
> > > > > > > > > should I file a JIRA to enable JSR-250 support fo rmaven
> 3.4?
> > > > > > > > Sure - send me the ticket number and I’ll add some
> commentary this
> > > > > > > > weekend
> > > > > > > > > looking forward to use it
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > -Dan
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <
> > > > mcculls@gmail.com (mailto:mcculls@gmail.com)
> > > > > > > > (mailto:mcculls@gmail.com)> wrote:
> > > > > > > > >
> > > > > > > > > > Hi Dan,
> > > > > > > > > >
> > > > > > > > > > Constructor injection (and component injection) is
> working
> > > > for me
> > > > > > > > with
> > > > > > > > > > Maven 3.3.9 if I follow the example in
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > http://maven.apache.org/maven-
> > > > > > > > > > jsr330.html
> > > > > > > > > >
> > > > > > > > > > Is your plugin code available somewhere?
> > > > > > > > > >
> > > > > > > > > > PS. at the moment Maven doesn’t enable container support
> for
> > > > JSR-250
> > > > > > > > > > lifecycle, but it is implemented by Sisu under a feature
> flag:
> > > > > > > > > >
> > > > > > > > > > https://github.com/eclipse/sisu.plexus/blob/releases/0.3
> .
> > > > > > > > > > 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
> > > > > > > > > > ContainerConfiguration.java#L62
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Cheers, Stuart
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
> > > > > > > > > >
> > > > > > > > > > > Hi Thomas,
> > > > > > > > > > >
> > > > > > > > > > > You are right!!! looking for how to fix this...
> > > > > > > > > > >
> > > > > > > > > > > The only thing working for me is field injection at
> MOJO.
> > > > event The
> > > > > > > > > > > constructor injection ( as documented) at MOJO is not.
> > > > > > > > > > >
> > > > > > > > > > > Thanks
> > > > > > > > > > >
> > > > > > > > > > > -Dan
> > > > > > > > > > >
> > > > > > > > > > > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <
> > > > t.broyer@gmail.com (mailto:t.broyer@gmail.com)
> > > > > > > > (mailto:t.broyer@gmail.com)
> > > > > > > > > > (mailto:t.broyer@gmail.com)> wrote:
> > > > > > > > > > >
> > > > > > > > > > > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <
> > > > dantran@gmail.com (mailto:dantran@gmail.com)
> > > > > > > > (mailto:dantran@gmail.com) (mailto:
> > > > > > > > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > Hi
> > > > > > > > > > > > >
> > > > > > > > > > > > > I have a need to inject my jsr330 component into my
> > > > plugins[1]
> > > > > > > > and I
> > > > > > > > > > > > > found 2 issues
> > > > > > > > > > > > >
> > > > > > > > > > > > > 1. @Inject under MOJO works, but my singleton
> component
> > > > > > > > @PreDestroy
> > > > > > > > > > never
> > > > > > > > > > > > > got called
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > @PreDestroy is not part of JSR 330, it's a CDI
> thing, so
> > > > no
> > > > > > > > wonder
> > > > > > > > > > it's not
> > > > > > > > > > > > called.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
>
>
>

Re: Maven Plugin and JSR330

Posted by Stuart McCulloch <mc...@gmail.com>.
Hi Dan,  

There are two places in MavenCli which create a container.

You’ve enabled JSR250 for the temporary container that resolves the core extensions, but not the main container that runs the Mojos:

https://github.com/dantran/maven/blob/master/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L585  

If I enable JSR250 in the above line then your test passes.

--  
Cheers, Stuart


On Sunday, 13 November 2016 at 22:10, Dan Tran wrote:

> @Stuard
>  
> Could you review my changes at
> https://github.com/dantran/maven/commits/master? I still not able to get
> @PostContruct working yet
>  
> Thanks
>  
> -Dan
>  
> On Sun, Sep 11, 2016 at 7:27 PM, Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com)> wrote:
>  
> > Thanks Stuart, very much appreciated
> >  
> > -D
> >  
> > On Sun, Sep 11, 2016 at 7:22 PM, Stuart McCulloch <mcculls@gmail.com (mailto:mcculls@gmail.com)>
> > wrote:
> >  
> > > Sorry, last week was very busy with work and family
> > >  
> > > I’ve listed the necessary config changes in
> > > https://issues.apache.org/jira/browse/MNG-6084
> > >  
> > > --
> > > Cheers, Stuart
> > >  
> > >  
> > > On Sunday, 11 September 2016 at 04:28, Dan Tran wrote:
> > >  
> > > > @Stuart, ping :-)
> > > >  
> > > > On Tue, Sep 6, 2016 at 7:06 PM, Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com) (mailto:
> > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > >  
> > > > > @Stuart, could you provide instructions on how to enable JSR 250
> > > support?
> > > > >  
> > > > > Thanks
> > > > >  
> > > > >  
> > > > > -Dan
> > > > >  
> > > > > On Fri, Sep 2, 2016 at 9:22 AM, Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com) (mailto:
> > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > > >  
> > > > > > here you go https://issues.apache.org/jira/browse/MNG-6084
> > > > > >  
> > > > > > Very much appreciated
> > > > > >  
> > > > > > -Dan
> > > > > >  
> > > > > > On Fri, Sep 2, 2016 at 8:42 AM, Stuart McCulloch <mcculls@gmail.com (mailto:mcculls@gmail.com)
> > > (mailto:mcculls@gmail.com)>
> > > > > > wrote:
> > > > > >  
> > > > > > > On Wednesday, 31 August 2016 at 19:05, Dan Tran wrote:
> > > > > > > > Hi Stuart
> > > > > > > >  
> > > > > > > > Thanks for helping out.
> > > > > > > >  
> > > > > > > > I have 3 mojos, sharing one singleton component which depends on
> > > > > > > another
> > > > > > > > singleton component thru injection. All working now via both
> > > > > > >  
> > > > > > >  
> > > > > >  
> > > > > >  
> > > > >  
> > > >  
> > >  
> > > injection
> > > > > > >  
> > > > > > > type
> > > > > > > > ( after some cleanup)
> > > > > > > >  
> > > > > > > > should I file a JIRA to enable JSR-250 support fo rmaven 3.4?
> > > > > > > Sure - send me the ticket number and I’ll add some commentary this
> > > > > > > weekend
> > > > > > > > looking forward to use it
> > > > > > > >  
> > > > > > > > Thanks
> > > > > > > >  
> > > > > > > > -Dan
> > > > > > > >  
> > > > > > > >  
> > > > > > > >  
> > > > > > > > On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <
> > > mcculls@gmail.com (mailto:mcculls@gmail.com)
> > > > > > > (mailto:mcculls@gmail.com)> wrote:
> > > > > > > >  
> > > > > > > > > Hi Dan,
> > > > > > > > >  
> > > > > > > > > Constructor injection (and component injection) is working
> > > for me
> > > > > > > with
> > > > > > > > > Maven 3.3.9 if I follow the example in
> > > > > > > >  
> > > > > > >  
> > > > > > >  
> > > > > > > http://maven.apache.org/maven-
> > > > > > > > > jsr330.html
> > > > > > > > >  
> > > > > > > > > Is your plugin code available somewhere?
> > > > > > > > >  
> > > > > > > > > PS. at the moment Maven doesn’t enable container support for
> > > JSR-250
> > > > > > > > > lifecycle, but it is implemented by Sisu under a feature flag:
> > > > > > > > >  
> > > > > > > > > https://github.com/eclipse/sisu.plexus/blob/releases/0.3.
> > > > > > > > > 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
> > > > > > > > > ContainerConfiguration.java#L62
> > > > > > > > >  
> > > > > > > > > --
> > > > > > > > > Cheers, Stuart
> > > > > > > > >  
> > > > > > > > >  
> > > > > > > > > On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
> > > > > > > > >  
> > > > > > > > > > Hi Thomas,
> > > > > > > > > >  
> > > > > > > > > > You are right!!! looking for how to fix this...
> > > > > > > > > >  
> > > > > > > > > > The only thing working for me is field injection at MOJO.
> > > event The
> > > > > > > > > > constructor injection ( as documented) at MOJO is not.
> > > > > > > > > >  
> > > > > > > > > > Thanks
> > > > > > > > > >  
> > > > > > > > > > -Dan
> > > > > > > > > >  
> > > > > > > > > > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <
> > > t.broyer@gmail.com (mailto:t.broyer@gmail.com)
> > > > > > > (mailto:t.broyer@gmail.com)
> > > > > > > > > (mailto:t.broyer@gmail.com)> wrote:
> > > > > > > > > >  
> > > > > > > > > > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <
> > > dantran@gmail.com (mailto:dantran@gmail.com)
> > > > > > > (mailto:dantran@gmail.com) (mailto:
> > > > > > > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > > > > > > > > >  
> > > > > > > > > > > > Hi
> > > > > > > > > > > >  
> > > > > > > > > > > > I have a need to inject my jsr330 component into my
> > > plugins[1]
> > > > > > > and I
> > > > > > > > > > > > found 2 issues
> > > > > > > > > > > >  
> > > > > > > > > > > > 1. @Inject under MOJO works, but my singleton component
> > > > > > > @PreDestroy
> > > > > > > > > never
> > > > > > > > > > > > got called
> > > > > > > > > > >  
> > > > > > > > > > >  
> > > > > > > > > > >  
> > > > > > > > > > >  
> > > > > > > > > > >  
> > > > > > > > > > > @PreDestroy is not part of JSR 330, it's a CDI thing, so
> > > no
> > > > > > > wonder
> > > > > > > > > it's not
> > > > > > > > > > > called.
> > > > > > > > > >  
> > > > > > > > >  
> > > > > > > > >  
> > > > > > > >  
> > > > > > >  
> > > > > > >  
> > > > > >  
> > > > >  
> > > >  
> > >  
> > >  
> >  
> >  
>  
>  
>  



Re: Maven Plugin and JSR330

Posted by Dan Tran <da...@gmail.com>.
@Stuard

Could you review my changes at
https://github.com/dantran/maven/commits/master?  I still not able to get
@PostContruct working yet

Thanks

-Dan

On Sun, Sep 11, 2016 at 7:27 PM, Dan Tran <da...@gmail.com> wrote:

> Thanks Stuart, very much appreciated
>
> -D
>
> On Sun, Sep 11, 2016 at 7:22 PM, Stuart McCulloch <mc...@gmail.com>
> wrote:
>
>> Sorry, last week was very busy with work and family
>>
>> I’ve listed the necessary config changes in
>> https://issues.apache.org/jira/browse/MNG-6084
>>
>> --
>> Cheers, Stuart
>>
>>
>> On Sunday, 11 September 2016 at 04:28, Dan Tran wrote:
>>
>> > @Stuart, ping :-)
>> >
>> > On Tue, Sep 6, 2016 at 7:06 PM, Dan Tran <dantran@gmail.com (mailto:
>> dantran@gmail.com)> wrote:
>> >
>> > > @Stuart, could you provide instructions on how to enable JSR 250
>> support?
>> > >
>> > > Thanks
>> > >
>> > >
>> > > -Dan
>> > >
>> > > On Fri, Sep 2, 2016 at 9:22 AM, Dan Tran <dantran@gmail.com (mailto:
>> dantran@gmail.com)> wrote:
>> > >
>> > > > here you go https://issues.apache.org/jira/browse/MNG-6084
>> > > >
>> > > > Very much appreciated
>> > > >
>> > > > -Dan
>> > > >
>> > > > On Fri, Sep 2, 2016 at 8:42 AM, Stuart McCulloch <mcculls@gmail.com
>> (mailto:mcculls@gmail.com)>
>> > > > wrote:
>> > > >
>> > > > > On Wednesday, 31 August 2016 at 19:05, Dan Tran wrote:
>> > > > > > Hi Stuart
>> > > > > >
>> > > > > > Thanks for helping out.
>> > > > > >
>> > > > > > I have 3 mojos, sharing one singleton component which depends on
>> > > > > another
>> > > > > > singleton component thru injection. All working now via both
>> injection
>> > > > >
>> > > > > type
>> > > > > > ( after some cleanup)
>> > > > > >
>> > > > > > should I file a JIRA to enable JSR-250 support fo rmaven 3.4?
>> > > > > Sure - send me the ticket number and I’ll add some commentary this
>> > > > > weekend
>> > > > > > looking forward to use it
>> > > > > >
>> > > > > > Thanks
>> > > > > >
>> > > > > > -Dan
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <
>> mcculls@gmail.com (mailto:mcculls@gmail.com)
>> > > > > (mailto:mcculls@gmail.com)> wrote:
>> > > > > >
>> > > > > > > Hi Dan,
>> > > > > > >
>> > > > > > > Constructor injection (and component injection) is working
>> for me
>> > > > > with
>> > > > > > > Maven 3.3.9 if I follow the example in
>> > > > > >
>> > > > >
>> > > > > http://maven.apache.org/maven-
>> > > > > > > jsr330.html
>> > > > > > >
>> > > > > > > Is your plugin code available somewhere?
>> > > > > > >
>> > > > > > > PS. at the moment Maven doesn’t enable container support for
>> JSR-250
>> > > > > > > lifecycle, but it is implemented by Sisu under a feature flag:
>> > > > > > >
>> > > > > > > https://github.com/eclipse/sisu.plexus/blob/releases/0.3.
>> > > > > > > 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
>> > > > > > > ContainerConfiguration.java#L62
>> > > > > > >
>> > > > > > > --
>> > > > > > > Cheers, Stuart
>> > > > > > >
>> > > > > > >
>> > > > > > > On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
>> > > > > > >
>> > > > > > > > Hi Thomas,
>> > > > > > > >
>> > > > > > > > You are right!!! looking for how to fix this...
>> > > > > > > >
>> > > > > > > > The only thing working for me is field injection at MOJO.
>> event The
>> > > > > > > > constructor injection ( as documented) at MOJO is not.
>> > > > > > > >
>> > > > > > > > Thanks
>> > > > > > > >
>> > > > > > > > -Dan
>> > > > > > > >
>> > > > > > > > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <
>> t.broyer@gmail.com (mailto:t.broyer@gmail.com)
>> > > > > (mailto:t.broyer@gmail.com)
>> > > > > > > (mailto:t.broyer@gmail.com)> wrote:
>> > > > > > > >
>> > > > > > > > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <
>> dantran@gmail.com (mailto:dantran@gmail.com)
>> > > > > (mailto:dantran@gmail.com) (mailto:
>> > > > > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
>> > > > > > > > >
>> > > > > > > > > > Hi
>> > > > > > > > > >
>> > > > > > > > > > I have a need to inject my jsr330 component into my
>> plugins[1]
>> > > > > and I
>> > > > > > > > > > found 2 issues
>> > > > > > > > > >
>> > > > > > > > > > 1. @Inject under MOJO works, but my singleton component
>> > > > > @PreDestroy
>> > > > > > > never
>> > > > > > > > > > got called
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > @PreDestroy is not part of JSR 330, it's a CDI thing, so
>> no
>> > > > > wonder
>> > > > > > > it's not
>> > > > > > > > > called.
>> > > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > >
>> > >
>> >
>> >
>> >
>>
>>
>>
>

Re: Maven Plugin and JSR330

Posted by Dan Tran <da...@gmail.com>.
Thanks Stuart, very much appreciated

-D

On Sun, Sep 11, 2016 at 7:22 PM, Stuart McCulloch <mc...@gmail.com> wrote:

> Sorry, last week was very busy with work and family
>
> I’ve listed the necessary config changes in https://issues.apache.org/
> jira/browse/MNG-6084
>
> --
> Cheers, Stuart
>
>
> On Sunday, 11 September 2016 at 04:28, Dan Tran wrote:
>
> > @Stuart, ping :-)
> >
> > On Tue, Sep 6, 2016 at 7:06 PM, Dan Tran <dantran@gmail.com (mailto:
> dantran@gmail.com)> wrote:
> >
> > > @Stuart, could you provide instructions on how to enable JSR 250
> support?
> > >
> > > Thanks
> > >
> > >
> > > -Dan
> > >
> > > On Fri, Sep 2, 2016 at 9:22 AM, Dan Tran <dantran@gmail.com (mailto:
> dantran@gmail.com)> wrote:
> > >
> > > > here you go https://issues.apache.org/jira/browse/MNG-6084
> > > >
> > > > Very much appreciated
> > > >
> > > > -Dan
> > > >
> > > > On Fri, Sep 2, 2016 at 8:42 AM, Stuart McCulloch <mcculls@gmail.com
> (mailto:mcculls@gmail.com)>
> > > > wrote:
> > > >
> > > > > On Wednesday, 31 August 2016 at 19:05, Dan Tran wrote:
> > > > > > Hi Stuart
> > > > > >
> > > > > > Thanks for helping out.
> > > > > >
> > > > > > I have 3 mojos, sharing one singleton component which depends on
> > > > > another
> > > > > > singleton component thru injection. All working now via both
> injection
> > > > >
> > > > > type
> > > > > > ( after some cleanup)
> > > > > >
> > > > > > should I file a JIRA to enable JSR-250 support fo rmaven 3.4?
> > > > > Sure - send me the ticket number and I’ll add some commentary this
> > > > > weekend
> > > > > > looking forward to use it
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > -Dan
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <
> mcculls@gmail.com (mailto:mcculls@gmail.com)
> > > > > (mailto:mcculls@gmail.com)> wrote:
> > > > > >
> > > > > > > Hi Dan,
> > > > > > >
> > > > > > > Constructor injection (and component injection) is working for
> me
> > > > > with
> > > > > > > Maven 3.3.9 if I follow the example in
> > > > > >
> > > > >
> > > > > http://maven.apache.org/maven-
> > > > > > > jsr330.html
> > > > > > >
> > > > > > > Is your plugin code available somewhere?
> > > > > > >
> > > > > > > PS. at the moment Maven doesn’t enable container support for
> JSR-250
> > > > > > > lifecycle, but it is implemented by Sisu under a feature flag:
> > > > > > >
> > > > > > > https://github.com/eclipse/sisu.plexus/blob/releases/0.3.
> > > > > > > 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
> > > > > > > ContainerConfiguration.java#L62
> > > > > > >
> > > > > > > --
> > > > > > > Cheers, Stuart
> > > > > > >
> > > > > > >
> > > > > > > On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
> > > > > > >
> > > > > > > > Hi Thomas,
> > > > > > > >
> > > > > > > > You are right!!! looking for how to fix this...
> > > > > > > >
> > > > > > > > The only thing working for me is field injection at MOJO.
> event The
> > > > > > > > constructor injection ( as documented) at MOJO is not.
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > > -Dan
> > > > > > > >
> > > > > > > > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <
> t.broyer@gmail.com (mailto:t.broyer@gmail.com)
> > > > > (mailto:t.broyer@gmail.com)
> > > > > > > (mailto:t.broyer@gmail.com)> wrote:
> > > > > > > >
> > > > > > > > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <
> dantran@gmail.com (mailto:dantran@gmail.com)
> > > > > (mailto:dantran@gmail.com) (mailto:
> > > > > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > > > > > > >
> > > > > > > > > > Hi
> > > > > > > > > >
> > > > > > > > > > I have a need to inject my jsr330 component into my
> plugins[1]
> > > > > and I
> > > > > > > > > > found 2 issues
> > > > > > > > > >
> > > > > > > > > > 1. @Inject under MOJO works, but my singleton component
> > > > > @PreDestroy
> > > > > > > never
> > > > > > > > > > got called
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > @PreDestroy is not part of JSR 330, it's a CDI thing, so no
> > > > > wonder
> > > > > > > it's not
> > > > > > > > > called.
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
>
>
>

Re: Maven Plugin and JSR330

Posted by Stuart McCulloch <mc...@gmail.com>.
Sorry, last week was very busy with work and family

I’ve listed the necessary config changes in https://issues.apache.org/jira/browse/MNG-6084  

--  
Cheers, Stuart


On Sunday, 11 September 2016 at 04:28, Dan Tran wrote:

> @Stuart, ping :-)
>  
> On Tue, Sep 6, 2016 at 7:06 PM, Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com)> wrote:
>  
> > @Stuart, could you provide instructions on how to enable JSR 250 support?
> >  
> > Thanks
> >  
> >  
> > -Dan
> >  
> > On Fri, Sep 2, 2016 at 9:22 AM, Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com)> wrote:
> >  
> > > here you go https://issues.apache.org/jira/browse/MNG-6084
> > >  
> > > Very much appreciated
> > >  
> > > -Dan
> > >  
> > > On Fri, Sep 2, 2016 at 8:42 AM, Stuart McCulloch <mcculls@gmail.com (mailto:mcculls@gmail.com)>
> > > wrote:
> > >  
> > > > On Wednesday, 31 August 2016 at 19:05, Dan Tran wrote:
> > > > > Hi Stuart
> > > > >  
> > > > > Thanks for helping out.
> > > > >  
> > > > > I have 3 mojos, sharing one singleton component which depends on
> > > > another
> > > > > singleton component thru injection. All working now via both injection
> > > >  
> > > > type
> > > > > ( after some cleanup)
> > > > >  
> > > > > should I file a JIRA to enable JSR-250 support fo rmaven 3.4?
> > > > Sure - send me the ticket number and I’ll add some commentary this
> > > > weekend
> > > > > looking forward to use it
> > > > >  
> > > > > Thanks
> > > > >  
> > > > > -Dan
> > > > >  
> > > > >  
> > > > >  
> > > > > On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <mcculls@gmail.com (mailto:mcculls@gmail.com)
> > > > (mailto:mcculls@gmail.com)> wrote:
> > > > >  
> > > > > > Hi Dan,
> > > > > >  
> > > > > > Constructor injection (and component injection) is working for me
> > > > with
> > > > > > Maven 3.3.9 if I follow the example in
> > > > >  
> > > >  
> > > > http://maven.apache.org/maven-
> > > > > > jsr330.html
> > > > > >  
> > > > > > Is your plugin code available somewhere?
> > > > > >  
> > > > > > PS. at the moment Maven doesn’t enable container support for JSR-250
> > > > > > lifecycle, but it is implemented by Sisu under a feature flag:
> > > > > >  
> > > > > > https://github.com/eclipse/sisu.plexus/blob/releases/0.3.
> > > > > > 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
> > > > > > ContainerConfiguration.java#L62
> > > > > >  
> > > > > > --
> > > > > > Cheers, Stuart
> > > > > >  
> > > > > >  
> > > > > > On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
> > > > > >  
> > > > > > > Hi Thomas,
> > > > > > >  
> > > > > > > You are right!!! looking for how to fix this...
> > > > > > >  
> > > > > > > The only thing working for me is field injection at MOJO. event The
> > > > > > > constructor injection ( as documented) at MOJO is not.
> > > > > > >  
> > > > > > > Thanks
> > > > > > >  
> > > > > > > -Dan
> > > > > > >  
> > > > > > > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <t.broyer@gmail.com (mailto:t.broyer@gmail.com)
> > > > (mailto:t.broyer@gmail.com)
> > > > > > (mailto:t.broyer@gmail.com)> wrote:
> > > > > > >  
> > > > > > > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com)
> > > > (mailto:dantran@gmail.com) (mailto:
> > > > > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > > > > > >  
> > > > > > > > > Hi
> > > > > > > > >  
> > > > > > > > > I have a need to inject my jsr330 component into my plugins[1]
> > > > and I
> > > > > > > > > found 2 issues
> > > > > > > > >  
> > > > > > > > > 1. @Inject under MOJO works, but my singleton component
> > > > @PreDestroy
> > > > > > never
> > > > > > > > > got called
> > > > > > > >  
> > > > > > > >  
> > > > > > > >  
> > > > > > > >  
> > > > > > > > @PreDestroy is not part of JSR 330, it's a CDI thing, so no
> > > > wonder
> > > > > > it's not
> > > > > > > > called.
> > > > > > >  
> > > > > >  
> > > > > >  
> > > > >  
> > > >  
> > > >  
> > >  
> > >  
> >  
> >  
>  
>  
>  



Re: Maven Plugin and JSR330

Posted by Dan Tran <da...@gmail.com>.
@Stuart, ping :-)

On Tue, Sep 6, 2016 at 7:06 PM, Dan Tran <da...@gmail.com> wrote:

> @Stuart, could you provide instructions on how to enable JSR 250 support?
>
> Thanks
>
>
> -Dan
>
> On Fri, Sep 2, 2016 at 9:22 AM, Dan Tran <da...@gmail.com> wrote:
>
>> here you go https://issues.apache.org/jira/browse/MNG-6084
>>
>> Very much appreciated
>>
>> -Dan
>>
>> On Fri, Sep 2, 2016 at 8:42 AM, Stuart McCulloch <mc...@gmail.com>
>> wrote:
>>
>>> On Wednesday, 31 August 2016 at 19:05, Dan Tran wrote:
>>> > Hi Stuart
>>> >
>>> > Thanks for helping out.
>>> >
>>> > I have 3 mojos, sharing one singleton component which depends on
>>> another
>>> > singleton component thru injection. All working now via both injection
>>> type
>>> > ( after some cleanup)
>>> >
>>> > should I file a JIRA to enable JSR-250 support fo rmaven 3.4?
>>> Sure - send me the ticket number and I’ll add some commentary this
>>> weekend
>>> > looking forward to use it
>>> >
>>> > Thanks
>>> >
>>> > -Dan
>>> >
>>> >
>>> >
>>> > On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <mcculls@gmail.com
>>> (mailto:mcculls@gmail.com)> wrote:
>>> >
>>> > > Hi Dan,
>>> > >
>>> > > Constructor injection (and component injection) is working for me
>>> with
>>> > > Maven 3.3.9 if I follow the example in
>>> http://maven.apache.org/maven-
>>> > > jsr330.html
>>> > >
>>> > > Is your plugin code available somewhere?
>>> > >
>>> > > PS. at the moment Maven doesn’t enable container support for JSR-250
>>> > > lifecycle, but it is implemented by Sisu under a feature flag:
>>> > >
>>> > > https://github.com/eclipse/sisu.plexus/blob/releases/0.3.
>>> > > 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
>>> > > ContainerConfiguration.java#L62
>>> > >
>>> > > --
>>> > > Cheers, Stuart
>>> > >
>>> > >
>>> > > On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
>>> > >
>>> > > > Hi Thomas,
>>> > > >
>>> > > > You are right!!! looking for how to fix this...
>>> > > >
>>> > > > The only thing working for me is field injection at MOJO. event The
>>> > > > constructor injection ( as documented) at MOJO is not.
>>> > > >
>>> > > > Thanks
>>> > > >
>>> > > > -Dan
>>> > > >
>>> > > > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <t.broyer@gmail.com
>>> (mailto:t.broyer@gmail.com)
>>> > > (mailto:t.broyer@gmail.com)> wrote:
>>> > > >
>>> > > > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <dantran@gmail.com
>>> (mailto:dantran@gmail.com) (mailto:
>>> > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
>>> > > > >
>>> > > > > > Hi
>>> > > > > >
>>> > > > > > I have a need to inject my jsr330 component into my plugins[1]
>>> and I
>>> > > > > > found 2 issues
>>> > > > > >
>>> > > > > > 1. @Inject under MOJO works, but my singleton component
>>> @PreDestroy
>>> > > never
>>> > > > > > got called
>>> > > > >
>>> > > > >
>>> > > > >
>>> > > > > @PreDestroy is not part of JSR 330, it's a CDI thing, so no
>>> wonder
>>> > > it's not
>>> > > > > called.
>>> > > >
>>> > >
>>> > >
>>> >
>>>
>>>
>>>
>>
>

Re: Maven Plugin and JSR330

Posted by Dan Tran <da...@gmail.com>.
@Stuart, could you provide instructions on how to enable JSR 250 support?

Thanks


-Dan

On Fri, Sep 2, 2016 at 9:22 AM, Dan Tran <da...@gmail.com> wrote:

> here you go https://issues.apache.org/jira/browse/MNG-6084
>
> Very much appreciated
>
> -Dan
>
> On Fri, Sep 2, 2016 at 8:42 AM, Stuart McCulloch <mc...@gmail.com>
> wrote:
>
>> On Wednesday, 31 August 2016 at 19:05, Dan Tran wrote:
>> > Hi Stuart
>> >
>> > Thanks for helping out.
>> >
>> > I have 3 mojos, sharing one singleton component which depends on another
>> > singleton component thru injection. All working now via both injection
>> type
>> > ( after some cleanup)
>> >
>> > should I file a JIRA to enable JSR-250 support fo rmaven 3.4?
>> Sure - send me the ticket number and I’ll add some commentary this weekend
>> > looking forward to use it
>> >
>> > Thanks
>> >
>> > -Dan
>> >
>> >
>> >
>> > On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <mcculls@gmail.com
>> (mailto:mcculls@gmail.com)> wrote:
>> >
>> > > Hi Dan,
>> > >
>> > > Constructor injection (and component injection) is working for me with
>> > > Maven 3.3.9 if I follow the example in http://maven.apache.org/maven-
>> > > jsr330.html
>> > >
>> > > Is your plugin code available somewhere?
>> > >
>> > > PS. at the moment Maven doesn’t enable container support for JSR-250
>> > > lifecycle, but it is implemented by Sisu under a feature flag:
>> > >
>> > > https://github.com/eclipse/sisu.plexus/blob/releases/0.3.
>> > > 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
>> > > ContainerConfiguration.java#L62
>> > >
>> > > --
>> > > Cheers, Stuart
>> > >
>> > >
>> > > On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
>> > >
>> > > > Hi Thomas,
>> > > >
>> > > > You are right!!! looking for how to fix this...
>> > > >
>> > > > The only thing working for me is field injection at MOJO. event The
>> > > > constructor injection ( as documented) at MOJO is not.
>> > > >
>> > > > Thanks
>> > > >
>> > > > -Dan
>> > > >
>> > > > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <t.broyer@gmail.com
>> (mailto:t.broyer@gmail.com)
>> > > (mailto:t.broyer@gmail.com)> wrote:
>> > > >
>> > > > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <dantran@gmail.com
>> (mailto:dantran@gmail.com) (mailto:
>> > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
>> > > > >
>> > > > > > Hi
>> > > > > >
>> > > > > > I have a need to inject my jsr330 component into my plugins[1]
>> and I
>> > > > > > found 2 issues
>> > > > > >
>> > > > > > 1. @Inject under MOJO works, but my singleton component
>> @PreDestroy
>> > > never
>> > > > > > got called
>> > > > >
>> > > > >
>> > > > >
>> > > > > @PreDestroy is not part of JSR 330, it's a CDI thing, so no wonder
>> > > it's not
>> > > > > called.
>> > > >
>> > >
>> > >
>> >
>>
>>
>>
>

Re: Maven Plugin and JSR330

Posted by Dan Tran <da...@gmail.com>.
here you go https://issues.apache.org/jira/browse/MNG-6084

Very much appreciated

-Dan

On Fri, Sep 2, 2016 at 8:42 AM, Stuart McCulloch <mc...@gmail.com> wrote:

> On Wednesday, 31 August 2016 at 19:05, Dan Tran wrote:
> > Hi Stuart
> >
> > Thanks for helping out.
> >
> > I have 3 mojos, sharing one singleton component which depends on another
> > singleton component thru injection. All working now via both injection
> type
> > ( after some cleanup)
> >
> > should I file a JIRA to enable JSR-250 support fo rmaven 3.4?
> Sure - send me the ticket number and I’ll add some commentary this weekend
> > looking forward to use it
> >
> > Thanks
> >
> > -Dan
> >
> >
> >
> > On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <mcculls@gmail.com
> (mailto:mcculls@gmail.com)> wrote:
> >
> > > Hi Dan,
> > >
> > > Constructor injection (and component injection) is working for me with
> > > Maven 3.3.9 if I follow the example in http://maven.apache.org/maven-
> > > jsr330.html
> > >
> > > Is your plugin code available somewhere?
> > >
> > > PS. at the moment Maven doesn’t enable container support for JSR-250
> > > lifecycle, but it is implemented by Sisu under a feature flag:
> > >
> > > https://github.com/eclipse/sisu.plexus/blob/releases/0.3.
> > > 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
> > > ContainerConfiguration.java#L62
> > >
> > > --
> > > Cheers, Stuart
> > >
> > >
> > > On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
> > >
> > > > Hi Thomas,
> > > >
> > > > You are right!!! looking for how to fix this...
> > > >
> > > > The only thing working for me is field injection at MOJO. event The
> > > > constructor injection ( as documented) at MOJO is not.
> > > >
> > > > Thanks
> > > >
> > > > -Dan
> > > >
> > > > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <t.broyer@gmail.com
> (mailto:t.broyer@gmail.com)
> > > (mailto:t.broyer@gmail.com)> wrote:
> > > >
> > > > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <dantran@gmail.com
> (mailto:dantran@gmail.com) (mailto:
> > > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > > >
> > > > > > Hi
> > > > > >
> > > > > > I have a need to inject my jsr330 component into my plugins[1]
> and I
> > > > > > found 2 issues
> > > > > >
> > > > > > 1. @Inject under MOJO works, but my singleton component
> @PreDestroy
> > > never
> > > > > > got called
> > > > >
> > > > >
> > > > >
> > > > > @PreDestroy is not part of JSR 330, it's a CDI thing, so no wonder
> > > it's not
> > > > > called.
> > > >
> > >
> > >
> >
>
>
>

Re: Maven Plugin and JSR330

Posted by Stuart McCulloch <mc...@gmail.com>.
On Wednesday, 31 August 2016 at 19:05, Dan Tran wrote:
> Hi Stuart
>  
> Thanks for helping out.
>  
> I have 3 mojos, sharing one singleton component which depends on another
> singleton component thru injection. All working now via both injection type
> ( after some cleanup)
>  
> should I file a JIRA to enable JSR-250 support fo rmaven 3.4?
Sure - send me the ticket number and I’ll add some commentary this weekend
> looking forward to use it
>  
> Thanks
>  
> -Dan
>  
>  
>  
> On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <mcculls@gmail.com (mailto:mcculls@gmail.com)> wrote:
>  
> > Hi Dan,
> >  
> > Constructor injection (and component injection) is working for me with
> > Maven 3.3.9 if I follow the example in http://maven.apache.org/maven-
> > jsr330.html
> >  
> > Is your plugin code available somewhere?
> >  
> > PS. at the moment Maven doesn’t enable container support for JSR-250
> > lifecycle, but it is implemented by Sisu under a feature flag:
> >  
> > https://github.com/eclipse/sisu.plexus/blob/releases/0.3.
> > 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
> > ContainerConfiguration.java#L62
> >  
> > --
> > Cheers, Stuart
> >  
> >  
> > On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
> >  
> > > Hi Thomas,
> > >  
> > > You are right!!! looking for how to fix this...
> > >  
> > > The only thing working for me is field injection at MOJO. event The
> > > constructor injection ( as documented) at MOJO is not.
> > >  
> > > Thanks
> > >  
> > > -Dan
> > >  
> > > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <t.broyer@gmail.com (mailto:t.broyer@gmail.com)
> > (mailto:t.broyer@gmail.com)> wrote:
> > >  
> > > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com) (mailto:
> > dantran@gmail.com (mailto:dantran@gmail.com))> wrote:
> > > >  
> > > > > Hi
> > > > >  
> > > > > I have a need to inject my jsr330 component into my plugins[1] and I
> > > > > found 2 issues
> > > > >  
> > > > > 1. @Inject under MOJO works, but my singleton component @PreDestroy
> > never
> > > > > got called
> > > >  
> > > >  
> > > >  
> > > > @PreDestroy is not part of JSR 330, it's a CDI thing, so no wonder
> > it's not
> > > > called.
> > >  
> >  
> >  
>  



Re: Maven Plugin and JSR330

Posted by Dan Tran <da...@gmail.com>.
Hi Stuart

Thanks for helping out.

I have 3 mojos, sharing one singleton component which depends on another
singleton component thru injection. All working now via both injection type
( after some cleanup)

should I file a JIRA to enable JSR-250 support fo rmaven 3.4?

looking forward to use it

Thanks

-Dan



On Wed, Aug 31, 2016 at 9:22 AM, Stuart McCulloch <mc...@gmail.com> wrote:

> Hi Dan,
>
> Constructor injection (and component injection) is working for me with
> Maven 3.3.9 if I follow the example in http://maven.apache.org/maven-
> jsr330.html
>
> Is your plugin code available somewhere?
>
> PS. at the moment Maven doesn’t enable container support for JSR-250
> lifecycle, but it is implemented by Sisu under a feature flag:
>
> https://github.com/eclipse/sisu.plexus/blob/releases/0.3.
> 3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/
> ContainerConfiguration.java#L62
>
> --
> Cheers, Stuart
>
>
> On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:
>
> > Hi Thomas,
> >
> > You are right!!! looking for how to fix this...
> >
> > The only thing working for me is field injection at MOJO. event The
> > constructor injection ( as documented) at MOJO is not.
> >
> > Thanks
> >
> > -Dan
> >
> > On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <t.broyer@gmail.com
> (mailto:t.broyer@gmail.com)> wrote:
> >
> > > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <dantran@gmail.com (mailto:
> dantran@gmail.com)> wrote:
> > >
> > > > Hi
> > > >
> > > > I have a need to inject my jsr330 component into my plugins[1] and I
> > > > found 2 issues
> > > >
> > > > 1. @Inject under MOJO works, but my singleton component @PreDestroy
> never
> > > > got called
> > > >
> > >
> > >
> > > @PreDestroy is not part of JSR 330, it's a CDI thing, so no wonder
> it's not
> > > called.
> > >
> >
> >
> >
>
>
>

Re: Maven Plugin and JSR330

Posted by Stuart McCulloch <mc...@gmail.com>.
Hi Dan,  

Constructor injection (and component injection) is working for me with Maven 3.3.9 if I follow the example in http://maven.apache.org/maven-jsr330.html

Is your plugin code available somewhere?  

PS. at the moment Maven doesn’t enable container support for JSR-250 lifecycle, but it is implemented by Sisu under a feature flag:

https://github.com/eclipse/sisu.plexus/blob/releases/0.3.3/org.eclipse.sisu.plexus/src/org/codehaus/plexus/ContainerConfiguration.java#L62

--  
Cheers, Stuart


On Wednesday, 31 August 2016 at 16:59, Dan Tran wrote:

> Hi Thomas,
>  
> You are right!!! looking for how to fix this...
>  
> The only thing working for me is field injection at MOJO. event The
> constructor injection ( as documented) at MOJO is not.
>  
> Thanks
>  
> -Dan
>  
> On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <t.broyer@gmail.com (mailto:t.broyer@gmail.com)> wrote:
>  
> > On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <dantran@gmail.com (mailto:dantran@gmail.com)> wrote:
> >  
> > > Hi
> > >  
> > > I have a need to inject my jsr330 component into my plugins[1] and I
> > > found 2 issues
> > >  
> > > 1. @Inject under MOJO works, but my singleton component @PreDestroy never
> > > got called
> > >  
> >  
> >  
> > @PreDestroy is not part of JSR 330, it's a CDI thing, so no wonder it's not
> > called.
> >  
>  
>  
>  



Re: Maven Plugin and JSR330

Posted by Dan Tran <da...@gmail.com>.
Hi Thomas,

You are right!!! looking for how to fix this...

The only thing working for me is field injection at MOJO. event The
constructor injection ( as documented) at MOJO is not.

Thanks

-Dan

On Wed, Aug 31, 2016 at 1:20 AM, Thomas Broyer <t....@gmail.com> wrote:

> On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <da...@gmail.com> wrote:
>
> > Hi
> >
> > I have a need  to  inject my jsr330 component into my plugins[1] and I
> > found 2 issues
> >
> > 1. @Inject under MOJO works, but my singleton component @PreDestroy never
> > got called
> >
>
> @PreDestroy is not part of JSR 330, it's a CDI thing, so no wonder it's not
> called.
>

Re: Maven Plugin and JSR330

Posted by Thomas Broyer <t....@gmail.com>.
On Wed, Aug 31, 2016 at 8:43 AM Dan Tran <da...@gmail.com> wrote:

> Hi
>
> I have a need  to  inject my jsr330 component into my plugins[1] and I
> found 2 issues
>
> 1. @Inject under MOJO works, but my singleton component @PreDestroy never
> got called
>

@PreDestroy is not part of JSR 330, it's a CDI thing, so no wonder it's not
called.