private MavenEmbedder( File mavenHome, MavenRequest mavenRequest, PlexusContainer plexusContainer ) throws MavenEmbedderException { this.mavenHome = mavenHome; this.mavenRequest = mavenRequest; this.plexusContainer = plexusContainer; try { this.buildMavenExecutionRequest(); RepositorySystemSession rss = ((DefaultMaven) lookup(Maven.class)).newRepositorySession(mavenExecutionRequest); mavenSession = new MavenSession( plexusContainer, rss, mavenExecutionRequest, new DefaultMavenExecutionResult() ); lookup(LegacySupport.class).setSession(mavenSession); } catch (MavenEmbedderException e) { throw new MavenEmbedderException(e.getMessage(), e); } catch (ComponentLookupException e) { throw new MavenEmbedderException(e.getMessage(), e); } }
private DependencyResolvingMavenEmbedder(File mavenHome, MavenRequest mavenRequest, PlexusContainer plexusContainer) throws MavenEmbedderException { this.mavenHome = mavenHome; this.mavenRequest = mavenRequest; this.plexusContainer = plexusContainer; try { this.buildMavenExecutionRequest(); RepositorySystemSession rss = ((DefaultMaven) lookup(Maven.class)).newRepositorySession(mavenExecutionRequest); mavenSession = new MavenSession(plexusContainer, rss, mavenExecutionRequest, new DefaultMavenExecutionResult()); lookup(LegacySupport.class).setSession(mavenSession); } catch (MavenEmbedderException e) { throw new MavenEmbedderException(e.getMessage(), e); } catch (ComponentLookupException e) { throw new MavenEmbedderException(e.getMessage(), e); } }
e.printStackTrace(listener.error(e.getMessage())); } catch (ComponentLookupException e) { e.printStackTrace(listener.error(e.getMessage()));