You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Matt Raible (JIRA)" <ji...@codehaus.org> on 2012/09/26 16:20:36 UTC

[jira] (MNG-5294) Attempt to restore backward compatibility for the MavenEmbedder

    [ https://jira.codehaus.org/browse/MNG-5294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=309790#comment-309790 ] 

Matt Raible commented on MNG-5294:
----------------------------------

Any update on this issue?
                
> Attempt to restore backward compatibility for the MavenEmbedder
> ---------------------------------------------------------------
>
>                 Key: MNG-5294
>                 URL: https://jira.codehaus.org/browse/MNG-5294
>             Project: Maven 2 & 3
>          Issue Type: Task
>            Reporter: Jason van Zyl
>            Assignee: Jason van Zyl
>
> Problem reported by Matt Raible where Appfuse uses the MavenEmbedder in the app fuse-maven-plugin:full-source goal:
> http://issues.appfuse.org/browse/APF-1220
> Here is the specific block of code used in the Appfuse Plugin:
> {code}
>     private MavenProject createProjectFromPom(File pom) {
>         MavenEmbedder maven = new MavenEmbedder();
>         maven.setOffline(true);
>         maven.setClassLoader(Thread.currentThread().getContextClassLoader());
>         maven.setLogger(new MavenEmbedderConsoleLogger());
>         MavenProject p = null;
>         try {
>             maven.setAlignWithUserInstallation(true);
>             maven.start();
>             p = maven.readProjectWithDependencies(pom);
>             maven.stop();
>         } catch (Exception e) {
>             e.printStackTrace();
>         }
>         return p;
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira