selectedFile,
- File defaultFile) {
- Link link = new Link(composite, SWT.NONE);
- link.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
- link.setText(text);
- link.setToolTipText(tooltip);
- link.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
- File file = Optional.ofNullable(selectedFile.get()).map(File::new).orElse(defaultFile);
- if(file != null) {
- openEditor(file);
- }
- }));
- return link;
+ /**
+ * @param composite
+ * @param mavenSettingsPreferencePage_globalPreferences
+ */
+ private void createHeading(Composite composite, String caption, boolean sep) {
+ if(sep) {
+ Label lblSpace = new Label(composite, SWT.NONE);
+ GridData gridData = new GridData(SWT.LEFT, SWT.CENTER, true, false, 4, 1);
+ gridData.heightHint = 20;
+ lblSpace.setLayoutData(gridData);
+ }
+
+ Label lblCaption = new Label(composite, SWT.NONE);
+ lblCaption.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 4, 1));
+ lblCaption.setText(caption);
+
+ Label separator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.SHADOW_NONE);
+ GridData gd_separator = new GridData(SWT.FILL, SWT.TOP, true, false, 4, 1);
+ gd_separator.heightHint = 10;
+ separator.setLayoutData(gd_separator);
}
- private Text createFileSelectionWidgets(Composite composite, String selectedFile, File defaultFile) {
+
+
+ private Text createFileSelectionWidgets(Composite composite, String label, String selectedFile, File defaultFile) {
+ Label lbSetting = new Label(composite, SWT.NONE);
+ lbSetting.setLayoutData(new GridData(SWT.LEFT, SWT.LEFT, false, false, 1, 1));
+ lbSetting.setText(label);
+
Text fileText = new Text(composite, SWT.BORDER);
fileText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
if(defaultFile != null) {
@@ -266,16 +293,23 @@ private Text createFileSelectionWidgets(Composite composite, String selectedFile
});
Button browseButton = new Button(composite, SWT.NONE);
- browseButton.setLayoutData(new GridData(SWT.FILL, SWT.RIGHT, false, false, 1, 1));
- browseButton.setText(Messages.MavenSettingsPreferencePage_settingsBrowseButton_text);
+ browseButton.setLayoutData(new GridData(SWT.LEFT, SWT.LEFT, false, false, 1, 1));
+ browseButton.setText(Messages.MavenSettingsPreferencePage_btnBrowse_text);
+ browseButton.setToolTipText(Messages.MavenSettingsPreferencePage_btnBrowse_tooltip);
browseButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> browseSettingsAction(fileText)));
- return fileText;
- }
- private void updateLink(Link link, String path, File defaultFile, String activeText, String inactiveText) {
- File file = path != null ? new File(path) : defaultFile;
- boolean active = file != null && file.canRead();
- link.setText(active ? activeText : inactiveText);
+ Button editButton = new Button(composite, SWT.NONE);
+ editButton.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, false, false, 1, 1));
+ editButton.setText(Messages.MavenSettingsPreferencePage_btnEdit_text);
+ editButton.setToolTipText(Messages.MavenSettingsPreferencePage_btnEdit_tooltip);
+ editButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
+ final String path = fileText.getText();
+ final File file = (path.isBlank()) ? defaultFile : new File(path);
+ if(file != null) {
+ openEditor(file);
+ }
+ }));
+ return fileText;
}
protected void updateLocalRepository() {
@@ -295,6 +329,7 @@ protected void updateLocalRepository() {
}
}
+
protected void checkSettings() {
setErrorMessage(null);
setMessage(null);
@@ -302,22 +337,18 @@ protected void checkSettings() {
// NB: enable/disable links regardless of validation errors
String globalSettings = getGlobalSettings();
- updateLink(globalSettingsLink, globalSettings, null, Messages.MavenSettingsPreferencePage_globalSettingslink2,
- Messages.MavenSettingsPreferencePage_globalSettingslink1);
-
+ String globalToolchains = getGlobalToolchains();
String userSettings = getUserSettings();
- updateLink(userSettingsLink, userSettings, SettingsXmlConfigurationProcessor.DEFAULT_USER_SETTINGS_FILE,
- Messages.MavenSettingsPreferencePage_userSettingslink2, Messages.MavenSettingsPreferencePage_userSettingslink1);
-
String userToolchains = getUserToolchains();
- updateLink(userToolchainsLink, userToolchains, MavenCli.DEFAULT_USER_TOOLCHAINS_FILE,
- Messages.MavenSettingsPreferencePage_userToolchainslink2,
- Messages.MavenSettingsPreferencePage_userToolchainslink1);
setMessage(null);
checkSettings(globalSettings, Messages.MavenSettingsPreferencePage_error_globalSettingsMissing,
l -> maven.validateSettings(l).stream().map(SettingsProblem::getMessage),
Messages.MavenSettingsPreferencePage_error_globalSettingsParse);
+ checkSettings(globalToolchains, Messages.MavenSettingsPreferencePage_error_globalToolchainsMissing,
+ l -> IMavenToolbox.of(maven).validateToolchains(l).stream().map(Problem::getMessage),
+ Messages.MavenSettingsPreferencePage_error_globalToolchainsParse);
+
checkSettings(userSettings, Messages.MavenSettingsPreferencePage_error_userSettingsMissing,
l -> maven.validateSettings(l).stream().map(SettingsProblem::getMessage),
Messages.MavenSettingsPreferencePage_error_userSettingsParse);
@@ -343,10 +374,8 @@ void openEditor(File file) {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
-
- IEditorDescriptor desc = workbench.getEditorRegistry().getDefaultEditor("settings.xml"); //$NON-NLS-1$
-
- IEditorInput input = new FileStoreEditorInput(EFS.getLocalFileSystem().fromLocalFile(file));
+ IEditorDescriptor desc = workbench.getEditorRegistry().getDefaultEditor(file.getName()); //$NON-NLS-1$
+ IEditorInput input = new FileStoreEditorInput(EFS.getLocalFileSystem().fromLocalFile(file.getAbsoluteFile()));
try {
IEditorPart editor = IDE.openEditor(page, input, desc.getId());
if(editor == null) {
@@ -363,6 +392,29 @@ void openEditor(File file) {
}
}
+ private File getDefaultGlobalSettingsFile() {
+ return this.getRuntimeBasedFile("conf/settings.xml");
+ }
+
+ private File getDefaultGlobalToolchainsFile() {
+ return this.getRuntimeBasedFile("conf/toolchains.xml");
+ }
+
+ /**
+ * Calcuate relative path of an file to the configured maven runtime.
+ *
+ * @param relativePath the expected relative path.
+ * @return null
if the runtime has no accessible location e.g. EMBEDDED.
+ */
+ private File getRuntimeBasedFile(String relativePath) {
+ final AbstractMavenRuntime runtime = this.runtimeManager.getRuntime(MavenRuntimeManagerImpl.DEFAULT);
+ final String location = runtime.getLocation();
+ if(null != location && !location.isBlank() && runtime.isEditable()) {
+ return new File(location, relativePath);
+ }
+ return null;
+ }
+
private String getUserSettings() {
return getSettings(userSettingsText);
}
@@ -375,6 +427,10 @@ private String getGlobalSettings() {
return getSettings(globalSettingsText);
}
+ private String getGlobalToolchains() {
+ return getSettings(globalToolchainsText);
+ }
+
private String getSettings(Text settings) {
String location = settings.getText().trim();
return location.length() > 0 ? location : null;
@@ -392,4 +448,12 @@ protected void browseSettingsAction(Text settings) {
checkSettings();
}
}
+
+ protected void updateGlobalSettingsDefaultFiles() {
+ this.globalSettingsText
+ .setMessage(Optional.ofNullable(this.getDefaultGlobalSettingsFile()).map(File::getAbsolutePath).orElse(""));
+
+ this.globalToolchainsText
+ .setMessage(Optional.ofNullable(this.getDefaultGlobalToolchainsFile()).map(File::getAbsolutePath).orElse(""));
+ }
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/CoreSupplier.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/CoreSupplier.java
new file mode 100644
index 0000000000..dc456b0751
--- /dev/null
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/CoreSupplier.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2024 Georg Tsakumagos and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Georg Tsakumagos - initial declaration
+ *******************************************************************************/
+
+package org.eclipse.m2e.core.embedder;
+
+import org.eclipse.core.runtime.CoreException;
+
+
+/**
+ * Represents a supplier of results that throws a {@link CoreException}
+ *
+ * There is no requirement that a new or distinct result be returned each time the supplier is invoked.
+ *
+ * This is a functional interface whose functional method is {@link #get()}.
+ *
+ * @param the type of results supplied by this supplier
+ * @since 2.1.0
+ * @author Georg Tsakumagos
+ */
+@FunctionalInterface
+public interface CoreSupplier {
+
+ /**
+ * Gets a result.
+ *
+ * @return a result
+ * @throws CoreException If something went wrong.
+ */
+ T get() throws CoreException;
+}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMavenConfiguration.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMavenConfiguration.java
index 4858b3cc92..397e951896 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMavenConfiguration.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMavenConfiguration.java
@@ -51,6 +51,10 @@ public interface IMavenConfiguration {
//settable for embedded maven
void setGlobalSettingsFile(String absolutePath) throws CoreException;
+ String getGlobalToolchainsFile();
+
+ void setGlobalToolchainsFile(String absolutePath) throws CoreException;
+
String getUserSettingsFile();
void setUserSettingsFile(String absolutePath) throws CoreException;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExecutionContext.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExecutionContext.java
index edf5cb23a2..0ce802f0d0 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExecutionContext.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExecutionContext.java
@@ -208,6 +208,9 @@ static MavenExecutionRequest createExecutionRequest(IMavenConfiguration mavenCon
updateSettingsFiles(request, settingsLocations);
//and settings are actually derived from IMavenConfiguration
File userToolchainsFile = MavenCli.DEFAULT_USER_TOOLCHAINS_FILE;
+ if(mavenConfiguration.getGlobalToolchainsFile() != null) {
+ request.setGlobalToolchainsFile(new File(mavenConfiguration.getGlobalToolchainsFile()));
+ }
if(mavenConfiguration.getUserToolchainsFile() != null) {
userToolchainsFile = new File(mavenConfiguration.getUserToolchainsFile());
}
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 e58327cc3d..f45a510388 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
@@ -127,6 +127,7 @@
import org.apache.maven.settings.building.SettingsBuilder;
import org.apache.maven.settings.building.SettingsBuildingException;
import org.apache.maven.settings.building.SettingsBuildingRequest;
+import org.apache.maven.settings.building.SettingsBuildingResult;
import org.apache.maven.settings.building.SettingsProblem;
import org.apache.maven.settings.building.SettingsProblem.Severity;
import org.apache.maven.settings.crypto.DefaultSettingsDecryptionRequest;
@@ -310,7 +311,8 @@ public List validateSettings(String settings) {
SettingsBuildingRequest request = new DefaultSettingsBuildingRequest();
request.setUserSettingsFile(settingsFile);
try {
- lookup(SettingsBuilder.class).build(request);
+ SettingsBuildingResult result = lookup(SettingsBuilder.class).build(request);
+ problems.addAll(result.getProblems());
} catch(SettingsBuildingException ex) {
problems.addAll(ex.getProblems());
} catch(CoreException ex) {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenConfigurationImpl.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenConfigurationImpl.java
index d9d5d479fb..8f778d80ec 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenConfigurationImpl.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenConfigurationImpl.java
@@ -100,6 +100,11 @@ public String getGlobalSettingsFile() {
return getStringPreference(MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE, null);
}
+ @Override
+ public String getGlobalToolchainsFile() {
+ return getStringPreference(MavenPreferenceConstants.P_GLOBAL_TOOLCHAINS_FILE, null);
+ }
+
@Override
public String getUserSettingsFile() {
return getStringPreference(MavenPreferenceConstants.P_USER_SETTINGS_FILE, null);
@@ -157,6 +162,11 @@ public void setGlobalSettingsFile(String globalSettingsFile) throws CoreExceptio
setSettingsFile(globalSettingsFile, MavenPreferenceConstants.P_GLOBAL_SETTINGS_FILE);
}
+ @Override
+ public void setGlobalToolchainsFile(String globalToolchainsFile) throws CoreException {
+ setSettingsFile(globalToolchainsFile, MavenPreferenceConstants.P_GLOBAL_TOOLCHAINS_FILE);
+ }
+
@Override
public void setUserToolchainsFile(String settingsFile) throws CoreException {
setSettingsFile(settingsFile, MavenPreferenceConstants.P_USER_TOOLCHAINS_FILE);
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenPreferenceConstants.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenPreferenceConstants.java
index f5d1297ef8..7ace01f635 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenPreferenceConstants.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenPreferenceConstants.java
@@ -58,6 +58,9 @@ public interface MavenPreferenceConstants {
/** String */
String P_GLOBAL_SETTINGS_FILE = PREFIX + "globalSettingsFile"; //$NON-NLS-1$
+ /** String */
+ String P_GLOBAL_TOOLCHAINS_FILE = PREFIX + "globalToolchainsFile"; //$NON-NLS-1$
+
/** String */
String P_USER_SETTINGS_FILE = PREFIX + "userSettingsFile"; //$NON-NLS-1$
diff --git a/org.eclipse.m2e.launching/META-INF/MANIFEST.MF b/org.eclipse.m2e.launching/META-INF/MANIFEST.MF
index 523d712280..9d3d8c5799 100644
--- a/org.eclipse.m2e.launching/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.launching/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.m2e.launching;singleton:=true
-Bundle-Version: 2.0.601.qualifier
+Bundle-Version: 2.0.602.qualifier
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
org.eclipse.core.variables,
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
index 3fad7104e1..4d20cf620a 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
@@ -58,11 +58,13 @@
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.cli.CLIManager;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.project.MavenProject;
import org.eclipse.m2e.actions.MavenLaunchConstants;
import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.CoreSupplier;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.core.internal.launch.AbstractMavenRuntime;
@@ -113,6 +115,40 @@ public MavenLaunchDelegate() {
allowAdvancedSourcelookup();
}
+ /**
+ * Appends file based configuration key if not already set.
+ *
+ * @param name The name of the setting.
+ * @param arg The argument without dash. Must not be null
.
+ * @param sb The target. Must not be null
.
+ * @param goals The configured goals. Used to override settings.
+ * @param substitute true
, if variables in settings should be substituted.
+ * @param source Source for the settings. Must not be null
.
+ * @throws CoreException If something went wrong.
+ * @throws IllegalArgumentException If the configured file does not exists.
+ */
+ private void appendFileSetting(String name, String arg, StringBuilder sb, String goals, boolean substitute,
+ CoreSupplier source) throws CoreException, IllegalArgumentException {
+ final String key = "-" + arg + " ";
+ if(!goals.contains(key) && 0 >= sb.indexOf(key)) {
+ String setting = source.get();
+
+ if(substitute && null != setting) {
+ setting = LaunchingUtils.substituteVar(setting);
+ }
+
+ if(null != setting && !setting.isBlank()) {
+ final File file = new File(setting.trim());
+ if(file.exists()) {
+ sb.append(" "); //$NON-NLS-1$
+ sb.append(key).append(quote(file.getAbsolutePath()));
+ } else {
+ throw new IllegalArgumentException("invalid path for " + name + ": " + file.getAbsolutePath());
+ }
+ }
+ }
+ }
+
@Override
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
throws CoreException {
@@ -433,7 +469,7 @@ private void getProperties(StringBuilder sb, ILaunchConfiguration configuration)
try {
String profiles = configuration.getAttribute(ATTR_PROFILES, (String) null);
if(profiles != null && profiles.trim().length() > 0) {
- sb.append(" -P").append(profiles.replaceAll("\\s+", ",")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ sb.append(" -P").append(profiles.replaceAll("\\s+", ",")); ////$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
} catch(CoreException ex) {
log.error("Exception while getting configuration attribute " + ATTR_PROFILES, ex);
@@ -494,28 +530,19 @@ private void getPreferences(StringBuilder sb, ILaunchConfiguration configuration
"Unexpected value for" + MavenLaunchConstants.ATTR_COLOR + ": " + colors);
};
sb.append(" -Dstyle.color=" + enableColor);
-
- if(!goals.contains("-gs ")) { //$NON-NLS-1$
- String globalSettings = launchSupport.getSettings();
- if(globalSettings != null && !globalSettings.trim().isEmpty() && !new File(globalSettings.trim()).exists()) {
- globalSettings = null;
- }
- if(globalSettings != null && !globalSettings.trim().isEmpty()) {
- sb.append(" -gs ").append(quote(globalSettings)); //$NON-NLS-1$
- }
- }
-
- String settings = configuration.getAttribute(MavenLaunchConstants.ATTR_USER_SETTINGS, (String) null);
- settings = LaunchingUtils.substituteVar(settings);
- if(settings == null || settings.trim().isEmpty()) {
- settings = mavenConfiguration.getUserSettingsFile();
- if(settings != null && !settings.trim().isEmpty() && !new File(settings.trim()).exists()) {
- settings = null;
- }
- }
- if(settings != null && !settings.trim().isEmpty()) {
- sb.append(" -s ").append(quote(settings)); //$NON-NLS-1$
- }
+ this.appendFileSetting("global settings", CLIManager.ALTERNATE_GLOBAL_SETTINGS, sb, goals, false, //$NON-NLS-1$
+ mavenConfiguration::getGlobalSettingsFile);
+ this.appendFileSetting("global settings", CLIManager.ALTERNATE_GLOBAL_SETTINGS, sb, goals, false, //$NON-NLS-1$
+ launchSupport::getSettings); //$NON-NLS-2$
+ this.appendFileSetting("global toolchains", CLIManager.ALTERNATE_GLOBAL_TOOLCHAINS, sb, goals, false, //$NON-NLS-1$
+ mavenConfiguration::getGlobalToolchainsFile); //$NON-NLS-2$
+
+ this.appendFileSetting("user settings", String.valueOf(CLIManager.ALTERNATE_USER_SETTINGS), sb, goals, false, //$NON-NLS-1$ //$NON-NLS-2$
+ () -> configuration.getAttribute(MavenLaunchConstants.ATTR_USER_SETTINGS, (String) null));
+ this.appendFileSetting("user settings", String.valueOf(CLIManager.ALTERNATE_USER_SETTINGS), sb, goals, false, //$NON-NLS-1$
+ mavenConfiguration::getUserSettingsFile); //$NON-NLS-2$
+ this.appendFileSetting("user toolchains", String.valueOf(CLIManager.ALTERNATE_USER_TOOLCHAINS), sb, goals, false, //$NON-NLS-1$
+ mavenConfiguration::getUserToolchainsFile); //$NON-NLS-2$
// boolean b = preferenceStore.getBoolean(MavenPreferenceConstants.P_CHECK_LATEST_PLUGIN_VERSION);
// sb.append(" -D").append(MavenPreferenceConstants.P_CHECK_LATEST_PLUGIN_VERSION).append("=").append(b);
diff --git a/org.eclipse.m2e.model.edit/META-INF/MANIFEST.MF b/org.eclipse.m2e.model.edit/META-INF/MANIFEST.MF
index ad1cf50843..0647f1e1fa 100644
--- a/org.eclipse.m2e.model.edit/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.model.edit/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-Name: M2E Maven Project Model Edit
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-Vendor: Eclipse.org - m2e
-Bundle-Version: 2.0.400.qualifier
+Bundle-Version: 2.0.401.qualifier
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.m2e.model.edit;singleton:=true
Require-Bundle: org.eclipse.core.runtime,
diff --git a/org.eclipse.m2e.model.edit/plugin.xml b/org.eclipse.m2e.model.edit/plugin.xml
index b843e7c1df..f0aec4987e 100644
--- a/org.eclipse.m2e.model.edit/plugin.xml
+++ b/org.eclipse.m2e.model.edit/plugin.xml
@@ -30,6 +30,14 @@
uri="xsd/maven-v4_0_0.xsd"/>
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+ Root element of the user configuration file.
+
+
+
+
+
+ 1.0.0+
+
+ Root element of the user configuration file.
+
+
+
+
+
+ 1.0.0+
+
+
+ The local repository.<br><b>Default value is:</b> <code>${user.home}/.m2/repository</code>
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Whether Maven should attempt to interact with the user for input.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Whether Maven should use the plugin-registry.xml file to manage plugin versions.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Indicate whether maven should operate in offline mode full-time.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Configuration for different proxy profiles. Multiple proxy profiles
+ might come in handy for anyone working from a notebook or other
+ mobile platform, to enable easy switching of entire proxy
+ configurations by simply specifying the profile id, again either from
+ the command line or from the defaults section below.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Configuration of server-specific settings, mainly authentication
+ method. This allows configuration of authentication on a per-server
+ basis.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+ Configuration of download mirrors for repositories.
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Configuration of build profiles for adjusting the build
+ according to environmental parameters.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ List of manually-activated build profiles, specified in the order in which
+ they should be applied.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+ List of groupIds to search for a plugin when that plugin
+ groupId is not explicitly provided.
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The <code><proxy></code> element contains informations required to a proxy settings.
+
+
+
+
+
+ 1.0.0+
+
+
+ Whether this proxy configuration is the active one.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The proxy protocol.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The proxy user.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The proxy password.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The proxy port.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The proxy host.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The list of non-proxied hosts (delimited by |).
+
+
+
+
+
+
+ 1.0.0+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The <code><server></code> element contains informations required to a server settings.
+
+
+
+
+
+ 1.0.0+
+
+
+ The username used to authenticate.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The password used in conjunction with the username to authenticate.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The private key location used to authenticate.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The passphrase used in conjunction with the privateKey to authenticate.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The permissions for files when they are created.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The permissions for directories when they are created.
+
+
+
+
+
+
+ 0.0.0+
+
+
+ Extra configuration for the transport layer.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+
+
+
+
+ 1.0.0+
+
+ A download mirror for a given repository.
+
+
+
+
+
+ 1.0.0+
+
+ The server ID of the repository being mirrored, e.g.,
+ "central". This MUST NOT match the mirror id.
+
+
+
+
+
+ 1.0.0+
+
+ The optional name that describes the mirror.
+
+
+
+
+
+ 1.0.0+
+ The URL of the mirror repository.
+
+
+
+
+ 1.1.0+
+ The layout of the mirror repository. Since Maven 3.
+
+
+
+
+ 1.1.0+
+
+ The layouts of repositories being mirrored. This value can be used to restrict the usage
+ of the mirror to repositories with a matching layout (apart from a matching id). Since Maven 3.
+
+
+
+
+
+ 1.0.0+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Modifications to the build process which is keyed on some
+ sort of environmental parameter.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The conditional logic which will automatically
+ trigger the inclusion of this profile.
+
+
+
+
+
+
+ 0.0.0+
+
+
+ Extended configuration specific to this profile goes here.
+ Contents take the form of
+ <code><property.name>property.value</property.name></code>
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The lists of the remote repositories.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The lists of the remote repositories for discovering plugins.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+
+
+
+
+ 1.0.0+
+
+ Repository contains the information needed for establishing
+ connections with remote repository
+
+
+
+
+
+ 1.0.0+
+
+ How to handle downloading of releases from this repository
+
+
+
+
+
+ 1.0.0+
+
+ How to handle downloading of snapshots from this repository
+
+
+
+
+
+ 1.0.0+
+
+
+ A unique identifier for a repository.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Human readable name of the repository.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The url of the repository.
+
+
+
+
+
+
+ 1.0.0+
+
+ The type of layout this repository uses for locating and
+ storing artifacts - can be "legacy" or "default".
+
+
+
+
+
+
+
+ 1.0.0+
+ Download policy
+
+
+
+
+ 1.0.0+
+
+ Whether to use this repository for downloading this type of
+ artifact.
+
+
+
+
+
+ 1.0.0+
+
+ The frequency for downloading updates - can be "always",
+ "daily" (default), "interval:XXX" (in minutes) or "never"
+ (only if it doesn't exist locally).
+
+
+
+
+
+ 1.0.0+
+
+ What to do when verification of an artifact checksum fails -
+ warn, fail, etc. Valid values are "fail" or "warn".
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The conditions within the build runtime environment which will trigger
+ the automatic inclusion of the parent build profile.
+
+
+
+
+
+
+ 1.0.0+
+
+ Flag specifying whether this profile is active as a default.
+
+
+
+
+
+ 1.0.0+
+
+
+ Specifies that this profile will be activated when a matching JDK is detected.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Specifies that this profile will be activated when matching OS attributes are detected.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Specifies that this profile will be activated when this System property is specified.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Specifies that this profile will be activated based on existence of a file.
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ This is an activator which will detect an operating system's attributes in order to activate
+ its profile.
+
+
+
+
+
+
+ 1.0.0+
+
+ The name of the OS to be used to activate a profile.
+
+
+
+
+
+ 1.0.0+
+
+ The general family of the OS to be used to activate a
+ profile (e.g. 'windows')
+
+
+
+
+
+ 1.0.0+
+
+ The architecture of the OS to be used to activate a profile.
+
+
+
+
+
+ 1.0.0+
+
+ The version of the OS to be used to activate a profile.
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ This is the property specification used to activate a profile. If the value field is empty,
+ then the existence of the named property will activate the profile, otherwise it does a case-sensitive
+ match against the property value as well.
+
+
+
+
+
+
+ 1.0.0+
+
+ The name of the property to be used to activate a profile.
+
+
+
+
+
+ 1.0.0+
+
+ The value of the property to be used to activate a profile.
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ This is the file specification used to activate a profile. The missing value will be a the location
+ of a file that needs to exist, and if it doesn't the profile must run. On the other hand exists will test
+ for the existence of the file and if it is there will run the profile.
+
+
+
+
+
+
+ 1.0.0+
+
+ The name of the file that should be missing to activate a
+ profile.
+
+
+
+
+
+ 1.0.0+
+
+ The name of the file that should exist to activate a profile.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/org.eclipse.m2e.model.edit/xsd/settings-1.2.0.xsd b/org.eclipse.m2e.model.edit/xsd/settings-1.2.0.xsd
new file mode 100644
index 0000000000..797779902d
--- /dev/null
+++ b/org.eclipse.m2e.model.edit/xsd/settings-1.2.0.xsd
@@ -0,0 +1,762 @@
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+ Root element of the user configuration file.
+
+
+
+
+
+ 1.0.0+
+
+ Root element of the user configuration file.
+
+
+
+
+
+ 1.0.0+
+
+
+ The local repository.<br><b>Default value is:</b> <code>${user.home}/.m2/repository</code>
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Whether Maven should attempt to interact with the user for input.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Whether Maven should use the plugin-registry.xml file to manage plugin versions.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Indicate whether maven should operate in offline mode full-time.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Configuration for different proxy profiles. Multiple proxy profiles
+ might come in handy for anyone working from a notebook or other
+ mobile platform, to enable easy switching of entire proxy
+ configurations by simply specifying the profile id, again either from
+ the command line or from the defaults section below.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Configuration of server-specific settings, mainly authentication
+ method. This allows configuration of authentication on a per-server
+ basis.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+ Configuration of download mirrors for repositories.
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Configuration of build profiles for adjusting the build
+ according to environmental parameters.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ List of manually-activated build profiles, specified in the order in which
+ they should be applied.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+ List of groupIds to search for a plugin when that plugin
+ groupId is not explicitly provided.
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The <code><proxy></code> element contains informations required to a proxy settings.
+
+
+
+
+
+ 1.0.0+
+
+
+ Whether this proxy configuration is the active one.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The proxy protocol.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The proxy user.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The proxy password.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The proxy port.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The proxy host.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The list of non-proxied hosts (delimited by |).
+
+
+
+
+
+
+ 1.0.0+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The <code><server></code> element contains informations required to a server settings.
+
+
+
+
+
+ 1.0.0+
+
+
+ The username used to authenticate.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The password used in conjunction with the username to authenticate.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The private key location used to authenticate.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The passphrase used in conjunction with the privateKey to authenticate.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The permissions for files when they are created.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The permissions for directories when they are created.
+
+
+
+
+
+
+ 0.0.0+
+
+
+ Extra configuration for the transport layer.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+
+
+
+
+ 1.0.0+
+
+ A download mirror for a given repository.
+
+
+
+
+
+ 1.0.0+
+
+ The server ID of the repository being mirrored, e.g.,
+ "central". This MUST NOT match the mirror id.
+
+
+
+
+
+ 1.0.0+
+
+ The optional name that describes the mirror.
+
+
+
+
+
+ 1.0.0+
+ The URL of the mirror repository.
+
+
+
+
+ 1.1.0+
+ The layout of the mirror repository. Since Maven 3.
+
+
+
+
+ 1.1.0+
+
+ The layouts of repositories being mirrored. This value can be used to restrict the usage
+ of the mirror to repositories with a matching layout (apart from a matching id). Since Maven 3.
+
+
+
+
+
+ 1.2.0+
+
+ Whether this mirror should be blocked from any download request but fail the download process, explaining why.
+
+
+
+
+
+ 1.0.0+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Modifications to the build process which is keyed on some
+ sort of environmental parameter.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The conditional logic which will automatically
+ trigger the inclusion of this profile.
+
+
+
+
+
+
+ 0.0.0+
+
+
+ Extended configuration specific to this profile goes here.
+ Contents take the form of
+ <code><property.name>property.value</property.name></code>
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The lists of the remote repositories.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The lists of the remote repositories for discovering plugins.
+
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+
+
+
+
+ 1.0.0+
+
+ Repository contains the information needed for establishing
+ connections with remote repository
+
+
+
+
+
+ 1.0.0+
+
+ How to handle downloading of releases from this repository
+
+
+
+
+
+ 1.0.0+
+
+ How to handle downloading of snapshots from this repository
+
+
+
+
+
+ 1.0.0+
+
+
+ A unique identifier for a repository.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Human readable name of the repository.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The url of the repository.
+
+
+
+
+
+
+ 1.0.0+
+
+ The type of layout this repository uses for locating and
+ storing artifacts - can be "legacy" or "default".
+
+
+
+
+
+
+
+ 1.0.0+
+ Download policy
+
+
+
+
+ 1.0.0+
+
+ Whether to use this repository for downloading this type of
+ artifact.
+
+
+
+
+
+ 1.0.0+
+
+ The frequency for downloading updates - can be "always",
+ "daily" (default), "interval:XXX" (in minutes) or "never"
+ (only if it doesn't exist locally).
+
+
+
+
+
+ 1.0.0+
+
+ What to do when verification of an artifact checksum fails -
+ warn, fail, etc. Valid values are "fail" or "warn".
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ The conditions within the build runtime environment which will trigger
+ the automatic inclusion of the parent build profile.
+
+
+
+
+
+
+ 1.0.0+
+
+ Flag specifying whether this profile is active as a default.
+
+
+
+
+
+ 1.0.0+
+
+
+ Specifies that this profile will be activated when a matching JDK is detected.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Specifies that this profile will be activated when matching OS attributes are detected.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Specifies that this profile will be activated when this System property is specified.
+
+
+
+
+
+
+ 1.0.0+
+
+
+ Specifies that this profile will be activated based on existence of a file.
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ This is an activator which will detect an operating system's attributes in order to activate
+ its profile.
+
+
+
+
+
+
+ 1.0.0+
+
+ The name of the OS to be used to activate a profile.
+
+
+
+
+
+ 1.0.0+
+
+ The general family of the OS to be used to activate a
+ profile (e.g. 'windows')
+
+
+
+
+
+ 1.0.0+
+
+ The architecture of the OS to be used to activate a profile.
+
+
+
+
+
+ 1.0.0+
+
+ The version of the OS to be used to activate a profile.
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ This is the property specification used to activate a profile. If the value field is empty,
+ then the existence of the named property will activate the profile, otherwise it does a case-sensitive
+ match against the property value as well.
+
+
+
+
+
+
+ 1.0.0+
+
+ The name of the property to be used to activate a profile.
+
+
+
+
+
+ 1.0.0+
+
+ The value of the property to be used to activate a profile.
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ This is the file specification used to activate a profile. The missing value will be a the location
+ of a file that needs to exist, and if it doesn't the profile must run. On the other hand exists will test
+ for the existence of the file and if it is there will run the profile.
+
+
+
+
+
+
+ 1.0.0+
+
+ The name of the file that should be missing to activate a
+ profile.
+
+
+
+
+
+ 1.0.0+
+
+ The name of the file that should exist to activate a profile.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/org.eclipse.m2e.model.edit/xsd/toolchains-1.0.0.xsd b/org.eclipse.m2e.model.edit/xsd/toolchains-1.0.0.xsd
new file mode 100644
index 0000000000..7146a3c5ab
--- /dev/null
+++ b/org.eclipse.m2e.model.edit/xsd/toolchains-1.0.0.xsd
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+ The <code><toolchains></code> element is the root of the descriptor.
+ The following table lists all of the possible child elements.
+
+
+
+
+
+ 1.0.0+
+
+ The <code><toolchains></code> element is the root of the descriptor.
+ The following table lists all of the possible child elements.
+
+
+
+
+
+ 1.0.0+
+ The toolchain instance definition.
+
+
+
+
+
+
+ 1.0.0+
+ Definition of a toolchain instance.
+
+
+
+
+ 1.0.0+
+
+ Type of toolchain:<ul>
+ <li><code>jdk</code> for
+ <a href="http://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/jdk.html">JDK Standard Toolchain</a>,</li>
+ <li>...</li>
+ </ul>
+
+
+
+
+
+ 1.0.0+
+
+
+ <p>Toolchain identification information, which will be matched against project requirements.</p>
+ <p>Actual content structure is completely open: each toochain type will define its own format and semantics.</p>
+ <p>In general, this is a properties format: <code><name>value</name></code> with
+ predefined properties names.</p>
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ <p>Toolchain configuration information, like location or any information that is to be retrieved.</p>
+ <p>Actual content structure is completely open: each toochain type will define its own format and semantics.</p>
+ <p>In general, this is a properties format: <code><name>value</name></code> wih
+ predefined properties names.</p>
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/org.eclipse.m2e.model.edit/xsd/toolchains-1.1.0.xsd b/org.eclipse.m2e.model.edit/xsd/toolchains-1.1.0.xsd
new file mode 100644
index 0000000000..95449af90b
--- /dev/null
+++ b/org.eclipse.m2e.model.edit/xsd/toolchains-1.1.0.xsd
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+ The <code><toolchains></code> element is the root of the descriptor.
+ The following table lists all of the possible child elements.
+
+
+
+
+
+ 1.0.0+
+
+ The <code><toolchains></code> element is the root of the descriptor.
+ The following table lists all of the possible child elements.
+
+
+
+
+
+ 1.0.0+
+ The toolchain instance definition.
+
+
+
+
+
+
+ 1.0.0+
+ Definition of a toolchain instance.
+
+
+
+
+ 1.0.0+
+
+ Type of toolchain:<ul>
+ <li><code>jdk</code> for
+ <a href="https://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/jdk.html">JDK Standard Toolchain</a>,</li>
+ <li>other value for
+ <a href="https://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/custom.html">Custom Toolchain</a></li>
+ </ul>
+
+
+
+
+
+ 1.1.0+
+
+
+ <p>Toolchain identification information, which will be matched against project requirements.</p>
+ <p>For Maven 2.0.9 to 3.2.3, the actual content structure was completely open: each toolchain type would define its own format and semantics.
+ In general, this was a properties format.</p>
+ <p>Since Maven 3.2.4, the type for this field has been changed to Properties to match the de-facto format.</p>
+ <p>Each toolchain defines its own properties names and semantics.</p>
+
+
+
+
+
+
+
+
+
+
+ 1.0.0+
+
+
+ <p>Toolchain configuration information, like location or any information that is to be retrieved.</p>
+ <p>Actual content structure is completely open: each toolchain type will define its own format and semantics.</p>
+ <p>In general, this is a properties format: <code><name>value</name></code> with
+ per-toolchain defined properties names.</p>
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file