[ http://jira.codehaus.org/browse/MNG-1979?page=all ]
     
Milos Kleint closed MNG-1979:
-----------------------------

     Resolution: Fixed
    Fix Version: 2.1

done, added checks to methods that require a started 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
>     Assignee: Milos Kleint
>      Fix For: 2.1

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

Reply via email to