@Test public void testProxies() { String oldSettingsXmlPath = System.getProperty( CUSTOM_SETTINGS_PROPERTY ); try { if (oldSettingsXmlPath != null) { System.clearProperty( CUSTOM_SETTINGS_PROPERTY ); } MavenSettings.reinitSettingsFromString(EMPTY_SETTINGS); final MavenRequest mavenRequest = createMavenRequest(null); final MavenEmbedder embedder = new MavenEmbedderWithProxyMock( mavenRequest ); final MavenExecutionRequest request = embedder.getMavenExecutionRequest(); assertNotNull( request ); final List<Proxy> proxies = request.getProxies(); assertEquals( 1, proxies.size() ); assertEquals( "MyProxy", proxies.get(0).getId() ); } catch ( MavenEmbedderException mee ) { fail( mee.getMessage() ); } finally { if (oldSettingsXmlPath != null) { System.setProperty( CUSTOM_SETTINGS_PROPERTY, oldSettingsXmlPath ); } MavenSettings.reinitSettings(); } }
public MavenExecutionRequest getMavenExecutionRequest() { return mavenExecutionRequest; }
MavenEmbedder { public MavenExecutionRequest getMavenExecutionRequest() { return mavenExecutionRequest; } }
MavenEmbedder { public MavenExecutionRequest getMavenExecutionRequest() { return mavenExecutionRequest; } MavenEmbedder( MavenRequest mavenRequest );  MavenEmbedder( ClassLoader mavenClassLoader,
                          ClassLoader parent,
                          MavenRequest mavenRequest ); protected  MavenEmbedder( MavenRequest mavenRequest,
                             ComponentProvider componentProvider ); }
MavenEmbedder { public MavenExecutionRequest getMavenExecutionRequest() { return mavenExecutionRequest; } MavenEmbedder( MavenRequest mavenRequest );  MavenEmbedder( ClassLoader mavenClassLoader,
                          ClassLoader parent,
                          MavenRequest mavenRequest ); protected  MavenEmbedder( MavenRequest mavenRequest,
                             ComponentProvider componentProvider ); Settings getSettings(); ArtifactRepository getLocalRepository(); String getLocalRepositoryPath(); MavenProject readProject( final InputStream mavenProjectStream ); MavenProject readProject( File mavenProject ); List<MavenProject> readProjects( File mavenProject,
                                            boolean recursive ); List<ProjectBuildingResult> buildProjects( File mavenProject,
                                                      boolean recursive ); MavenSession getMavenSession(); MavenExecutionRequest getMavenExecutionRequest(); void dispose(); MavenExecutionResult execute( final MavenRequest mavenRequest ); }
MavenEmbedder { public MavenExecutionRequest getMavenExecutionRequest() { return mavenExecutionRequest; } MavenEmbedder( MavenRequest mavenRequest );  MavenEmbedder( ClassLoader mavenClassLoader,
                          ClassLoader parent,
                          MavenRequest mavenRequest ); protected  MavenEmbedder( MavenRequest mavenRequest,
                             ComponentProvider componentProvider ); Settings getSettings(); ArtifactRepository getLocalRepository(); String getLocalRepositoryPath(); MavenProject readProject( final InputStream mavenProjectStream ); MavenProject readProject( File mavenProject ); List<MavenProject> readProjects( File mavenProject,
                                            boolean recursive ); List<ProjectBuildingResult> buildProjects( File mavenProject,
                                                      boolean recursive ); MavenSession getMavenSession(); MavenExecutionRequest getMavenExecutionRequest(); void dispose(); MavenExecutionResult execute( final MavenRequest mavenRequest ); static final File DEFAULT_GLOBAL_SETTINGS_FILE; }