List of usage examples for org.apache.maven.execution MavenExecutionRequest setUserSettingsFile
MavenExecutionRequest setUserSettingsFile(File userSettingsFile);
From source file:hudson.maven.MavenEmbedder.java
License:Apache License
protected MavenExecutionRequest buildMavenExecutionRequest(MavenRequest mavenRequest) throws MavenEmbedderException, ComponentLookupException { MavenExecutionRequest mavenExecutionRequest = new DefaultMavenExecutionRequest(); if (mavenRequest.getGlobalSettingsFile() != null) { mavenExecutionRequest.setGlobalSettingsFile(new File(mavenRequest.getGlobalSettingsFile())); }/*from w w w .j av a2 s .c om*/ if (mavenExecutionRequest.getUserSettingsFile() != null) { mavenExecutionRequest.setUserSettingsFile(new File(mavenRequest.getUserSettingsFile())); } try { lookup(MavenExecutionRequestPopulator.class).populateFromSettings(mavenExecutionRequest, getSettings()); lookup(MavenExecutionRequestPopulator.class).populateDefaults(mavenExecutionRequest); } catch (MavenExecutionRequestPopulationException e) { throw new MavenEmbedderException(e.getMessage(), e); } ArtifactRepository localRepository = getLocalRepository(); mavenExecutionRequest.setLocalRepository(localRepository); mavenExecutionRequest.setLocalRepositoryPath(localRepository.getBasedir()); mavenExecutionRequest.setOffline(mavenRequest.isOffline()); mavenExecutionRequest.setUpdateSnapshots(mavenRequest.isUpdateSnapshots()); // TODO check null and create a console one ? mavenExecutionRequest.setTransferListener(mavenRequest.getTransferListener()); mavenExecutionRequest.setCacheNotFound(mavenRequest.isCacheNotFound()); mavenExecutionRequest.setCacheTransferError(true); mavenExecutionRequest.setUserProperties(mavenRequest.getUserProperties()); mavenExecutionRequest.getSystemProperties().putAll(System.getProperties()); if (mavenRequest.getSystemProperties() != null) { mavenExecutionRequest.getSystemProperties().putAll(mavenRequest.getSystemProperties()); } mavenExecutionRequest.getSystemProperties().putAll(getEnvVars()); if (this.mavenHome != null) { mavenExecutionRequest.getSystemProperties().put("maven.home", this.mavenHome.getAbsolutePath()); } if (mavenRequest.getProfiles() != null && !mavenRequest.getProfiles().isEmpty()) { for (String id : mavenRequest.getProfiles()) { Profile p = new Profile(); p.setId(id); p.setSource("cli"); mavenExecutionRequest.addProfile(p); mavenExecutionRequest.addActiveProfile(id); } } mavenExecutionRequest.setLoggingLevel(mavenRequest.getLoggingLevel()); lookup(Logger.class).setThreshold(mavenRequest.getLoggingLevel()); mavenExecutionRequest.setExecutionListener(mavenRequest.getExecutionListener()) .setInteractiveMode(mavenRequest.isInteractive()) .setGlobalChecksumPolicy(mavenRequest.getGlobalChecksumPolicy()).setGoals(mavenRequest.getGoals()); if (mavenRequest.getPom() != null) { mavenExecutionRequest.setPom(new File(mavenRequest.getPom())); } if (mavenRequest.getWorkspaceReader() != null) { mavenExecutionRequest.setWorkspaceReader(mavenRequest.getWorkspaceReader()); } // FIXME inactive profiles //this.mavenExecutionRequest.set return mavenExecutionRequest; }
From source file:io.takari.maven.testing.Maven30xRuntime.java
License:Open Source License
@SuppressWarnings("deprecation") protected MavenExecutionRequest newExecutionRequest() throws Exception { // system properties Properties buildProperties = getMavenBuildProperties(); String mavenVersion = buildProperties.getProperty("version"); Properties systemProperties = new Properties(); systemProperties.putAll(System.getProperties()); // TODO not thread safe systemProperties.setProperty("maven.version", mavenVersion); systemProperties.setProperty("maven.build.version", mavenVersion); // request with initial configuration MavenExecutionRequest request = new DefaultMavenExecutionRequest(); request.setLocalRepositoryPath(properties.getLocalRepository()); request.setUserSettingsFile(properties.getUserSettings()); request.setGlobalSettingsFile(properties.getGlobalSettings()); request.setOffline(properties.getOffline()); request.setUpdateSnapshots(properties.getUpdateSnapshots()); request.setSystemProperties(systemProperties); // read settings SettingsBuildingRequest settingsRequest = new DefaultSettingsBuildingRequest(); settingsRequest.setGlobalSettingsFile(request.getGlobalSettingsFile()); settingsRequest.setUserSettingsFile(request.getUserSettingsFile()); settingsRequest.setSystemProperties(request.getSystemProperties()); settingsRequest.setUserProperties(request.getUserProperties()); Settings settings = lookup(SettingsBuilder.class).build(settingsRequest).getEffectiveSettings(); MavenExecutionRequestPopulator populator = container.lookup(MavenExecutionRequestPopulator.class); request = populator.populateFromSettings(request, settings); return populator.populateDefaults(request); }
From source file:net.oneandone.maven.embedded.Maven.java
License:Apache License
/** * @param globalSettings null to use default * @param userSettings null to use default *///from www . j av a 2 s .co m public static Settings loadSettings(World world, FileNode globalSettings, FileNode userSettings, DefaultPlexusContainer container) throws IOException, XmlPullParserException, ComponentLookupException { DefaultMavenSettingsBuilder builder; MavenExecutionRequest request; builder = (DefaultMavenSettingsBuilder) container.lookup(MavenSettingsBuilder.ROLE); request = new DefaultMavenExecutionRequest(); if (globalSettings == null) { globalSettings = locateMaven(world).join("conf/settings.xml"); } if (userSettings == null) { userSettings = (FileNode) world.getHome().join(".m2/settings.xml"); } request.setGlobalSettingsFile(globalSettings.toPath().toFile()); request.setUserSettingsFile(userSettings.toPath().toFile()); return builder.buildSettings(request); }
From source file:org.appformer.maven.integration.embedder.MavenEmbedder.java
License:Apache License
protected MavenExecutionRequest buildMavenExecutionRequest(MavenRequest mavenRequest) throws MavenEmbedderException, ComponentLookupException { MavenExecutionRequest mavenExecutionRequest = new DefaultMavenExecutionRequest(); if (mavenRequest.getGlobalSettingsFile() != null) { mavenExecutionRequest.setGlobalSettingsFile(new File(mavenRequest.getGlobalSettingsFile())); }//from w w w .ja va2 s . c o m SettingsSource userSettings = mavenRequest.getUserSettingsSource(); if (userSettings != null) { if (userSettings instanceof FileSettingsSource) { mavenExecutionRequest.setUserSettingsFile(((FileSettingsSource) userSettings).getSettingsFile()); } else { try { mavenExecutionRequest.setUserSettingsFile(copyInTempFile(userSettings.getInputStream(), "xml")); } catch (IOException ioe) { log.warn("Unable to use maven settings defined in " + userSettings, ioe); } } } try { componentProvider.lookup(MavenExecutionRequestPopulator.class) .populateFromSettings(mavenExecutionRequest, getSettings()); componentProvider.lookup(MavenExecutionRequestPopulator.class).populateDefaults(mavenExecutionRequest); } catch (MavenExecutionRequestPopulationException e) { throw new MavenEmbedderException(e.getMessage(), e); } ArtifactRepository localRepository = getLocalRepository(); mavenExecutionRequest.setLocalRepository(localRepository); mavenExecutionRequest.setLocalRepositoryPath(localRepository.getBasedir()); mavenExecutionRequest.setOffline(mavenRequest.isOffline()); mavenExecutionRequest.setUpdateSnapshots(mavenRequest.isUpdateSnapshots()); // TODO check null and create a console one ? mavenExecutionRequest.setTransferListener(mavenRequest.getTransferListener()); mavenExecutionRequest.setCacheNotFound(mavenRequest.isCacheNotFound()); mavenExecutionRequest.setCacheTransferError(true); mavenExecutionRequest.setUserProperties(mavenRequest.getUserProperties()); mavenExecutionRequest.getSystemProperties().putAll(System.getProperties()); if (mavenRequest.getSystemProperties() != null) { mavenExecutionRequest.getSystemProperties().putAll(mavenRequest.getSystemProperties()); } mavenExecutionRequest.getSystemProperties().putAll(getEnvVars()); if (mavenRequest.getProfiles() != null && !mavenRequest.getProfiles().isEmpty()) { for (String id : mavenRequest.getProfiles()) { Profile p = new Profile(); p.setId(id); p.setSource("cli"); mavenExecutionRequest.addProfile(p); mavenExecutionRequest.addActiveProfile(id); } } MavenRepositoryConfiguration mavenRepoConf = getMavenRepositoryConfiguration(); //DROOLS-899: Copy repositories defined in settings to execution request for (ArtifactRepository artifactRepository : mavenRepoConf.getArtifactRepositoriesForRequest()) { mavenExecutionRequest.addRemoteRepository(artifactRepository); } mavenExecutionRequest.setProxies(mavenRepoConf.getProxies()); mavenExecutionRequest.setLoggingLevel(mavenRequest.getLoggingLevel()); componentProvider.lookup(Logger.class).setThreshold(mavenRequest.getLoggingLevel()); mavenExecutionRequest.setExecutionListener(mavenRequest.getExecutionListener()) .setInteractiveMode(mavenRequest.isInteractive()) .setGlobalChecksumPolicy(mavenRequest.getGlobalChecksumPolicy()).setGoals(mavenRequest.getGoals()); if (mavenRequest.getPom() != null) { mavenExecutionRequest.setPom(new File(mavenRequest.getPom())); } if (mavenRequest.getWorkspaceReader() != null) { mavenExecutionRequest.setWorkspaceReader(mavenRequest.getWorkspaceReader()); } return mavenExecutionRequest; }
From source file:org.commonjava.maven.ext.cli.Cli.java
License:Apache License
private void createSession(File target, File settings) { try {//from w w w .j ava 2 s . c o m final DefaultContainerConfiguration config = new DefaultContainerConfiguration(); config.setClassPathScanning(PlexusConstants.SCANNING_ON); config.setComponentVisibility(PlexusConstants.GLOBAL_VISIBILITY); config.setName("PME-CLI"); PlexusContainer container = new DefaultPlexusContainer(config); pomIO = container.lookup(PomIO.class); session = container.lookup(ManipulationSession.class); manipulationManager = container.lookup(ManipulationManager.class); final MavenExecutionRequest req = new DefaultMavenExecutionRequest() .setUserProperties(System.getProperties()).setUserProperties(userProps) .setRemoteRepositories(Collections.<ArtifactRepository>emptyList()); ArtifactRepository ar = null; if (settings == null) { // No, this is not a typo. If current default is null, supply new local and global. // This function passes in settings to make it easier to test. this.settings = settings = new File(System.getProperty("user.home"), ".m2/settings.xml"); ar = new MavenArtifactRepository(); ar.setUrl("file://" + System.getProperty("user.home") + "/.m2/repository"); req.setLocalRepository(ar); } req.setUserSettingsFile(settings); req.setGlobalSettingsFile(settings); MavenExecutionRequestPopulator executionRequestPopulator = container .lookup(MavenExecutionRequestPopulator.class); executionRequestPopulator.populateFromSettings(req, parseSettings(settings)); executionRequestPopulator.populateDefaults(req); if (ar != null) { ar.setUrl("file://" + req.getLocalRepositoryPath()); } if (userProps != null && userProps.containsKey("maven.repo.local")) { if (ar == null) { ar = new MavenArtifactRepository(); } ar.setUrl("file://" + userProps.getProperty("maven.repo.local")); req.setLocalRepository(ar); } final MavenSession mavenSession = new MavenSession(container, null, req, new DefaultMavenExecutionResult()); mavenSession.getRequest().setPom(target); session.setMavenSession(mavenSession); } catch (ComponentLookupException e) { logger.debug("Caught problem instantiating ", e); System.err.println("Unable to start Cli subsystem"); System.exit(100); } catch (PlexusContainerException e) { logger.debug("Caught problem instantiating ", e); System.err.println("Unable to start Cli subsystem"); System.exit(100); } catch (SettingsBuildingException e) { logger.debug("Caught problem parsing settings file ", e); System.err.println("Unable to parse settings.xml file"); System.exit(100); } catch (MavenExecutionRequestPopulationException e) { logger.debug("Caught problem populating maven request from settings file ", e); System.err.println("Unable to create maven execution request from settings.xml file"); System.exit(100); } }
From source file:org.commonjava.maven.ext.manip.Cli.java
License:Apache License
private void createSession(File target, File settings) { try {/*from w w w . j a v a 2 s.co m*/ PlexusContainer container = new DefaultPlexusContainer(); final MavenExecutionRequest req = new DefaultMavenExecutionRequest() .setUserProperties(System.getProperties()).setUserProperties(userProps) .setRemoteRepositories(Collections.<ArtifactRepository>emptyList()); if (userProps != null && userProps.containsKey("maven.repo.local")) { ArtifactRepository ar = new MavenArtifactRepository(); ar.setUrl("file://" + userProps.getProperty("maven.repo.local")); req.setLocalRepository(ar); } if (settings != null) { req.setUserSettingsFile(settings); req.setGlobalSettingsFile(settings); MavenExecutionRequestPopulator executionRequestPopulator = container .lookup(MavenExecutionRequestPopulator.class); executionRequestPopulator.populateFromSettings(req, parseSettings(settings)); executionRequestPopulator.populateDefaults(req); } final MavenSession mavenSession = new MavenSession(container, null, req, new DefaultMavenExecutionResult()); mavenSession.getRequest().setPom(target); pomIO = container.lookup(PomIO.class); session = container.lookup(ManipulationSession.class); manipulationManager = container.lookup(ManipulationManager.class); session.setMavenSession(mavenSession); } catch (ComponentLookupException e) { logger.debug("Caught problem instantiating ", e); System.err.println("Unable to start Cli subsystem"); System.exit(100); e.printStackTrace(); } catch (PlexusContainerException e) { logger.debug("Caught problem instantiating ", e); System.err.println("Unable to start Cli subsystem"); System.exit(100); } catch (SettingsBuildingException e) { logger.debug("Caught problem parsing settings file ", e); System.err.println("Unable to parse settings.xml file"); System.exit(100); } catch (MavenExecutionRequestPopulationException e) { logger.debug("Caught problem populating maven request from settings file ", e); System.err.println("Unable to create maven execution request from settings.xml file"); System.exit(100); } }
From source file:org.eclipse.m2e.core.internal.embedder.MavenImpl.java
License:Open Source License
MavenExecutionRequest createExecutionRequest() throws CoreException { MavenExecutionRequest request = new DefaultMavenExecutionRequest(); // this causes problems with unexpected "stale project configuration" error markers // need to think how to manage ${maven.build.timestamp} properly inside workspace //request.setStartTime( new Date() ); if (mavenConfiguration.getGlobalSettingsFile() != null) { request.setGlobalSettingsFile(new File(mavenConfiguration.getGlobalSettingsFile())); }/*from w w w. j a v a 2 s . c om*/ if (mavenConfiguration.getUserSettingsFile() != null) { request.setUserSettingsFile(new File(mavenConfiguration.getUserSettingsFile())); } try { lookup(MavenExecutionRequestPopulator.class).populateFromSettings(request, getSettings()); } catch (MavenExecutionRequestPopulationException ex) { throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1, Messages.MavenImpl_error_no_exec_req, ex)); } ArtifactRepository localRepository = getLocalRepository(); request.setLocalRepository(localRepository); request.setLocalRepositoryPath(localRepository.getBasedir()); request.setOffline(mavenConfiguration.isOffline()); request.getUserProperties().put("m2e.version", MavenPluginActivator.getVersion()); //$NON-NLS-1$ request.getUserProperties().put(ConfigurationProperties.USER_AGENT, MavenPluginActivator.getUserAgent()); EnvironmentUtils.addEnvVars(request.getSystemProperties()); request.getSystemProperties().putAll(System.getProperties()); request.setCacheNotFound(true); request.setCacheTransferError(true); // the right way to disable snapshot update // request.setUpdateSnapshots(false); return request; }
From source file:org.jvnet.hudson.plugins.mavendepsupdate.MavenUpdateChecker.java
License:Apache License
ProjectBuildingRequest getProjectBuildingRequest(Properties userProperties, PlexusContainer plexusContainer)
throws ComponentLookupException, SettingsBuildingException, MavenExecutionRequestPopulationException,
InvalidRepositoryException {//from www . j a v a2 s . c o m
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
request.setLoggingLevel(MavenExecutionRequest.LOGGING_LEVEL_DEBUG);
request.setWorkspaceReader(new ReactorReader(new HashMap<String, MavenProject>(0)));
SettingsBuilder settingsBuilder = plexusContainer.lookup(SettingsBuilder.class);
RepositorySystem repositorySystem = plexusContainer.lookup(RepositorySystem.class);
org.sonatype.aether.RepositorySystem repoSystem = plexusContainer
.lookup(org.sonatype.aether.RepositorySystem.class);
SettingsBuildingRequest settingsRequest = new DefaultSettingsBuildingRequest();
if (globalSettings != null) {
mavenUpdateCheckerResult.addDebugLine("globalSettings " + globalSettings.getRemote());
settingsRequest.setGlobalSettingsFile(new File(globalSettings.getRemote()));
} else {
File globalSettings = new File(mavenHome, "conf/settings.xml");
if (globalSettings.exists()) {
settingsRequest.setGlobalSettingsFile(globalSettings);
}
}
if (alternateSettings != null) {
mavenUpdateCheckerResult.addDebugLine("alternateSettings " + alternateSettings.getRemote());
settingsRequest.setUserSettingsFile(new File(alternateSettings.getRemote()));
request.setUserSettingsFile(new File(alternateSettings.getRemote()));
} else {
File defaultUserSettings = new File(new File(System.getProperty("user.home"), ".m2"), "settings.xml");
settingsRequest.setUserSettingsFile(defaultUserSettings);
request.setUserSettingsFile(defaultUserSettings);
}
settingsRequest.setSystemProperties(System.getProperties());
settingsRequest.setUserProperties(userProperties);
SettingsBuildingResult settingsBuildingResult = settingsBuilder.build(settingsRequest);
MavenExecutionRequestPopulator executionRequestPopulator = plexusContainer
.lookup(MavenExecutionRequestPopulator.class);
executionRequestPopulator.populateFromSettings(request, settingsBuildingResult.getEffectiveSettings());
executionRequestPopulator.populateDefaults(request);
MavenRepositorySystemSession session = new MavenRepositorySystemSession();
session.setUpdatePolicy(RepositoryPolicy.UPDATE_POLICY_ALWAYS);
SnapshotTransfertListener snapshotTransfertListener = new SnapshotTransfertListener(this.lastBuildTime);
session.setTransferListener(snapshotTransfertListener);
LocalRepository localRepo = getLocalRepo(settingsBuildingResult);
session.setLocalRepositoryManager(repoSystem.newLocalRepositoryManager(localRepo));
ArtifactRepository localArtifactRepository = getLocalArtifactRepo(settingsBuildingResult, repositorySystem);
request.setLocalRepository(localArtifactRepository);
if (this.activeProfiles != null && !this.activeProfiles.isEmpty()) {
for (String id : this.activeProfiles) {
Profile p = new Profile();
p.setId(id);
p.setSource("cli");
request.addProfile(p);
request.addActiveProfile(id);
}
}
ProjectBuildingRequest projectBuildingRequest = request.getProjectBuildingRequest();
return projectBuildingRequest.setRepositorySession(session);
}
From source file:org.kie.scanner.embedder.MavenEmbedder.java
License:Apache License
protected MavenExecutionRequest buildMavenExecutionRequest(MavenRequest mavenRequest) throws MavenEmbedderException, ComponentLookupException { MavenExecutionRequest mavenExecutionRequest = new DefaultMavenExecutionRequest(); if (mavenRequest.getGlobalSettingsFile() != null) { mavenExecutionRequest.setGlobalSettingsFile(new File(mavenRequest.getGlobalSettingsFile())); }/*w w w .ja v a 2 s. com*/ if (mavenExecutionRequest.getUserSettingsFile() != null) { mavenExecutionRequest.setUserSettingsFile(new File(mavenRequest.getUserSettingsFile())); } try { lookup(MavenExecutionRequestPopulator.class).populateFromSettings(mavenExecutionRequest, getSettings()); lookup(MavenExecutionRequestPopulator.class).populateDefaults(mavenExecutionRequest); } catch (MavenExecutionRequestPopulationException e) { throw new MavenEmbedderException(e.getMessage(), e); } ArtifactRepository localRepository = getLocalRepository(); mavenExecutionRequest.setLocalRepository(localRepository); mavenExecutionRequest.setLocalRepositoryPath(localRepository.getBasedir()); mavenExecutionRequest.setOffline(mavenRequest.isOffline()); mavenExecutionRequest.setUpdateSnapshots(mavenRequest.isUpdateSnapshots()); // TODO check null and create a console one ? mavenExecutionRequest.setTransferListener(mavenRequest.getTransferListener()); mavenExecutionRequest.setCacheNotFound(mavenRequest.isCacheNotFound()); mavenExecutionRequest.setCacheTransferError(true); mavenExecutionRequest.setUserProperties(mavenRequest.getUserProperties()); mavenExecutionRequest.getSystemProperties().putAll(System.getProperties()); if (mavenRequest.getSystemProperties() != null) { mavenExecutionRequest.getSystemProperties().putAll(mavenRequest.getSystemProperties()); } mavenExecutionRequest.getSystemProperties().putAll(getEnvVars()); if (this.mavenHome != null) { mavenExecutionRequest.getSystemProperties().put("maven.home", this.mavenHome.getAbsolutePath()); } if (mavenRequest.getProfiles() != null && !mavenRequest.getProfiles().isEmpty()) { for (String id : mavenRequest.getProfiles()) { Profile p = new Profile(); p.setId(id); p.setSource("cli"); mavenExecutionRequest.addProfile(p); mavenExecutionRequest.addActiveProfile(id); } } mavenExecutionRequest.setLoggingLevel(mavenRequest.getLoggingLevel()); lookup(Logger.class).setThreshold(mavenRequest.getLoggingLevel()); mavenExecutionRequest.setExecutionListener(mavenRequest.getExecutionListener()) .setInteractiveMode(mavenRequest.isInteractive()) .setGlobalChecksumPolicy(mavenRequest.getGlobalChecksumPolicy()).setGoals(mavenRequest.getGoals()); if (mavenRequest.getPom() != null) { mavenExecutionRequest.setPom(new File(mavenRequest.getPom())); } if (mavenRequest.getWorkspaceReader() != null) { mavenExecutionRequest.setWorkspaceReader(mavenRequest.getWorkspaceReader()); } return mavenExecutionRequest; }
From source file:org.kie.workbench.common.services.backend.compiler.external339.AFConfigurationProcessor.java
License:Apache License
public void process(AFCliRequest cliRequest) throws Exception { CommandLine commandLine = cliRequest.getCommandLine(); String workingDirectory = cliRequest.getWorkingDirectory(); MavenExecutionRequest request = cliRequest.getRequest(); Path userSettingsFile;/* w w w . j a v a 2 s. c om*/ if (commandLine.hasOption('s')) { userSettingsFile = Paths.get(commandLine.getOptionValue('s')); userSettingsFile = resolvePath(userSettingsFile, workingDirectory); if (!Files.isRegularFile(userSettingsFile)) { throw new FileNotFoundException( "The specified user settings file does not exist: " + userSettingsFile); } } else { userSettingsFile = DEFAULT_USER_SETTINGS_FILE; } Path globalSettingsFile; if (commandLine.hasOption("gs")) { globalSettingsFile = Paths.get(commandLine.getOptionValue("gs")); globalSettingsFile = resolvePath(globalSettingsFile, workingDirectory); if (!Files.isRegularFile(globalSettingsFile)) { throw new FileNotFoundException( "The specified global settings file does not exist: " + globalSettingsFile); } } else { globalSettingsFile = DEFAULT_GLOBAL_SETTINGS_FILE; } request.setGlobalSettingsFile(globalSettingsFile.toFile()); request.setUserSettingsFile(userSettingsFile.toFile()); SettingsBuildingRequest settingsRequest = new DefaultSettingsBuildingRequest(); settingsRequest.setGlobalSettingsFile(globalSettingsFile.toFile()); settingsRequest.setUserSettingsFile(userSettingsFile.toFile()); settingsRequest.setSystemProperties(cliRequest.getSystemProperties()); settingsRequest.setUserProperties(cliRequest.getUserProperties()); if (request.getEventSpyDispatcher() != null) { request.getEventSpyDispatcher().onEvent(settingsRequest); } this.logger.debug("Reading global settings from " + this .getLocation(settingsRequest.getGlobalSettingsSource(), settingsRequest.getGlobalSettingsFile())); this.logger.debug("Reading user settings from " + this.getLocation(settingsRequest.getUserSettingsSource(), settingsRequest.getUserSettingsFile())); SettingsBuildingResult settingsResult = this.settingsBuilder.build(settingsRequest); if (request.getEventSpyDispatcher() != null) { request.getEventSpyDispatcher().onEvent(settingsResult); } this.populateFromSettings(request, settingsResult.getEffectiveSettings()); if (!settingsResult.getProblems().isEmpty() && this.logger.isWarnEnabled()) { this.logger.warn(""); this.logger.warn("Some problems were encountered while building the effective settings"); Iterator i$ = settingsResult.getProblems().iterator(); while (i$.hasNext()) { SettingsProblem problem = (SettingsProblem) i$.next(); this.logger.warn(problem.getMessage() + " @ " + problem.getLocation()); } this.logger.warn(""); } }