You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Dmitri Maximovich (JIRA)" <ji...@codehaus.org> on 2006/01/18 17:33:40 UTC

[jira] Created: (MNG-1979) LIfecycle state is not enforced in embedder

LIfecycle state is not enforced in embedder
-------------------------------------------

         Key: MNG-1979
         URL: http://jira.codehaus.org/browse/MNG-1979
     Project: Maven 2
        Type: Bug

  Components: Embedding  
    Versions: 2.0.2    
    Reporter: Dmitri Maximovich


MavenEmbedder lifecycle methods (start() & stop()) are not enforced: 

For example, it's possible to run code like this:

        MavenEmbedder maven = new MavenEmbedder();
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        maven.setClassLoader( classLoader );
        maven.setLogger( new MavenEmbedderConsoleLogger() );                
        
        maven.start();
        maven.stop();
        
        MavenProject pom = maven.readProjectWithDependencies( pomFile );

Shouldn't call to embedder after stop() throw IllegalStateException or similar?


-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org