@Deprecated @SuppressWarnings( "checkstyle:parameternumber" ) public MavenSession( PlexusContainer container, Settings settings, ArtifactRepository localRepository, EventDispatcher eventDispatcher, ReactorManager unused, List<String> goals, String executionRootDir, Properties executionProperties, Properties userProperties, Date startTime ) { this.container = container; this.settings = settings; this.executionProperties = executionProperties; this.request = new DefaultMavenExecutionRequest(); this.request.setUserProperties( userProperties ); this.request.setLocalRepository( localRepository ); this.request.setGoals( goals ); this.request.setBaseDirectory( ( executionRootDir != null ) ? new File( executionRootDir ) : null ); this.request.setStartTime( startTime ); }
cliRequest.systemProperties ).setUserProperties( cliRequest.userProperties ).setReactorFailureBehavior(
protected MavenExecutionRequest newMavenExecutionRequest(File pom) throws Exception { Properties systemProps = new Properties(); systemProps.putAll(System.getProperties()); Properties userProps = new Properties(); userProps.put("tycho-version", "0.0.0"); MavenExecutionRequest request = new DefaultMavenExecutionRequest(); request.setBaseDirectory(pom.getParentFile()); request.setPom(pom); request.setSystemProperties(systemProps); request.setUserProperties(userProps); request.setLocalRepository(getLocalRepository()); request.setGoals( Arrays.asList( "validate" ) ); return request; }
protected IStatus run(IProgressMonitor monitor) { setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction()); try { // Run the install:install-file goal IMaven maven = MavenPlugin.getMaven(); MavenExecutionRequest request = maven.createExecutionRequest(monitor); request.setGoals(Arrays.asList("install:install-file")); //$NON-NLS-1$ request.setUserProperties(properties); MavenExecutionResult executionResult = maven.execute(request, monitor); List<Throwable> exceptions = executionResult.getExceptions(); if(!exceptions.isEmpty()) { for(Throwable exception : exceptions) { String msg = Messages.MavenInstallFileWizard_error; msg += "; " + exception.toString(); //$NON-NLS-1$ log.error(msg, exception); } } // TODO update index for local maven repository } catch(CoreException ex) { log.error("Failed to install artifact:" + ex.getMessage(), ex); } return Status.OK_STATUS; } }.schedule();
protected MavenExecutionRequest newMavenExecutionRequest(File pom) throws Exception { Properties systemProps = new Properties(); systemProps.putAll(System.getProperties()); Properties userProps = new Properties(); userProps.put("tycho-version", "0.0.0"); MavenExecutionRequest request = new DefaultMavenExecutionRequest(); request.setBaseDirectory(pom.getParentFile()); request.setPom(pom); request.setSystemProperties(systemProps); request.setUserProperties(userProps); request.setLocalRepository(getLocalRepository()); request.setStartTime(new Date()); File settingsFile = getUserSettingsFile(); if (settingsFile.isFile()) { request.setUserSettingsFile(settingsFile); } Settings settings = settingsBuilder.buildSettings(request); requestPopulator.populateFromSettings(request, settings); request.setGoals(Arrays.asList("validate")); return request; }
request.setUserProperties(properties);
cliRequest.systemProperties ).setUserProperties( cliRequest.userProperties ).setReactorFailureBehavior(
.setUserProperties(cliRequest.getUserProperties())
.setUserProperties( cliRequest.userProperties ).setReactorFailureBehavior( reactorFailureBehaviour ) // default: fail fast
.setUserProperties( cliRequest.userProperties )
.setUserProperties( cliRequest.userProperties )
.setUserProperties( cliRequest.userProperties ).setReactorFailureBehavior( reactorFailureBehaviour ) // default: fail fast
.setUserProperties(cliRequest.getUserProperties())
public MavenExecutionResult compileAndGenerateJavadoc(File pom) throws MavenException { try { MavenExecutionRequest request = createExecutionRequest(); lookup(MavenExecutionRequestPopulator.class).populateDefaults(request); request.setPom(pom); ProjectBuildingRequest configuration = request.getProjectBuildingRequest(); configuration.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL); configuration.setRepositorySession(createRepositorySession(request)); configuration.setResolveDependencies(true); configuration.setResolveVersionRanges(true); request.setGoals(Arrays.asList(new String[] { "compile", "javadoc:javadoc" })); Properties userProperties = (Properties) request.getUserProperties().clone(); userProperties.put("show", "private"); request.setUserProperties(userProperties); return lookup(Maven.class).execute(request); } catch (MavenExecutionRequestPopulationException e) { throw new MavenException(e); } }
.setGoals( phaseCall.getPhases() ) .setSystemProperties( session.getSystemProperties() ) .setUserProperties( session.getUserProperties() ) .setActiveProfiles( activeProfileIds );
req.setUserProperties(embedderConfiguration.getUserProperties()); try {
this.mavenExecutionRequest.setCacheTransferError(true); this.mavenExecutionRequest.setUserProperties(this.mavenRequest.getUserProperties()); this.mavenExecutionRequest.getSystemProperties().putAll(System.getProperties()); if (this.mavenRequest.getSystemProperties() != null) {
this.mavenExecutionRequest.setCacheTransferError( true ); this.mavenExecutionRequest.setUserProperties( this.mavenRequest.getUserProperties() ); this.mavenExecutionRequest.getSystemProperties().putAll( System.getProperties() ); if ( this.mavenRequest.getSystemProperties() != null ) {
mavenExecutionRequest.setCacheTransferError( true ); mavenExecutionRequest.setUserProperties( mavenRequest.getUserProperties() ); mavenExecutionRequest.getSystemProperties().putAll( System.getProperties() ); if ( mavenRequest.getSystemProperties() != null ) {
mavenExecutionRequest.setCacheTransferError( true ); mavenExecutionRequest.setUserProperties( mavenRequest.getUserProperties() ); mavenExecutionRequest.getSystemProperties().putAll( System.getProperties() ); if ( mavenRequest.getSystemProperties() != null ) {