[ 
http://jira.codehaus.org/browse/MNG-2875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason van Zyl updated MNG-2875:
-------------------------------

    Fix Version/s:     (was: Reviewed Pending Version Assignment)
                   2.1.x
      Component/s:     (was: Plugins and Lifecycle)
                   Embedding

> Maven does not honour Plexus component lifecycles in embedded environment for 
> singleton-keep-alive components
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-2875
>                 URL: http://jira.codehaus.org/browse/MNG-2875
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Embedding
>    Affects Versions: 2.0.5
>            Reporter: Ross Lamont
>             Fix For: 2.1.x
>
>
> I have a plugin which is injected with a Plexus Component.  This plexus 
> component implements the plexus Startable interface, and therefore expects 
> stop() to be called upon completion in order to perform cleanup.  In 
> addition, the component is a singleton-keep-alive component so it sticks 
> around for a while and is available to other plugins.
> Now this plugin spawns and monitors a thread (it actually kicks off a copy of 
> Jetty 5 so I can do integration tests).  Naturally, I want to shut down Jetty 
> 5 after my tests have run.  To do this I have another plugin which is run 
> after my integration tests which gets the component and tells it to shutdown 
> the threads.
> All works well so far, provided that the tests don't fail.
> If the tests do fail, the stop plugin is never reached.  In standalone maven 
> this all works fine, because the process ends, killing the threads.
> In embedded maven however, the stop method of the component is never called, 
> so that my copy of Jetty keeps on running and I have to shutdown my entire 
> embedded environment (in this case Netbeans with Mevenide, but I believe the 
> same problem occurs in Eclipse).
> Running through the code, it appears that Maven never shuts down the top 
> level component, thus components never have the opportunity to cleanup.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to