Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2014-04-30 23:06:47 -0400
committerIgor Fedorenko2014-04-30 23:07:03 -0400
commitbf177a958d453e059a472eec073d6f684a57ff0d (patch)
treebb7291444ba1f777292aeefa69b36755300dc854 /org.eclipse.m2e.core
parent5a6d84ae5da85978dd4ada4a56de1cd729655f61 (diff)
downloadm2e-core-bf177a958d453e059a472eec073d6f684a57ff0d.tar.gz
m2e-core-bf177a958d453e059a472eec073d6f684a57ff0d.tar.xz
m2e-core-bf177a958d453e059a472eec073d6f684a57ff0d.zip
433224 fixed default user settings.xml is not used
Change-Id: Icd1305e66680fe904be4994bc66a9587cb42b62f Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Diffstat (limited to 'org.eclipse.m2e.core')
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java
index 2e3b921e..a6904220 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java
@@ -82,6 +82,7 @@ import org.apache.maven.RepositoryUtils;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.InvalidRepositoryException;
import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.cli.MavenCli;
import org.apache.maven.execution.DefaultMavenExecutionRequest;
import org.apache.maven.execution.DefaultMavenExecutionResult;
import org.apache.maven.execution.MavenExecutionRequest;
@@ -222,9 +223,11 @@ public class MavenImpl implements IMaven, IMavenConfigurationChangeListener {
if(mavenConfiguration.getGlobalSettingsFile() != null) {
request.setGlobalSettingsFile(new File(mavenConfiguration.getGlobalSettingsFile()));
}
+ File userSettingsFile = MavenCli.DEFAULT_USER_SETTINGS_FILE;
if(mavenConfiguration.getUserSettingsFile() != null) {
- request.setUserSettingsFile(new File(mavenConfiguration.getUserSettingsFile()));
+ userSettingsFile = new File(mavenConfiguration.getUserSettingsFile());
}
+ request.setUserSettingsFile(userSettingsFile);
try {
lookup(MavenExecutionRequestPopulator.class).populateFromSettings(request, getSettings());
@@ -435,7 +438,7 @@ public class MavenImpl implements IMaven, IMavenConfigurationChangeListener {
public synchronized Settings getSettings(final boolean force_reload) throws CoreException {
// MUST NOT use createRequest!
- File userSettingsFile = null;
+ File userSettingsFile = MavenCli.DEFAULT_USER_SETTINGS_FILE;
if(mavenConfiguration.getUserSettingsFile() != null) {
userSettingsFile = new File(mavenConfiguration.getUserSettingsFile());
}

Back to the top