diff options
author | Mickael Istria | 2018-08-31 14:10:02 +0000 |
---|---|---|
committer | Fred Bricon | 2018-09-06 01:44:09 +0000 |
commit | db323d61161a055a1e5f200eada456650e2adddb (patch) | |
tree | d2a58421a9390ed5d1171436e9cc6dad45548823 /org.eclipse.m2e.core.ui/src/org/eclipse | |
parent | c32dfdd1f8645b94065e0a12229eeac1bb2e6289 (diff) | |
download | m2e-core-db323d61161a055a1e5f200eada456650e2adddb.tar.gz m2e-core-db323d61161a055a1e5f200eada456650e2adddb.tar.xz m2e-core-db323d61161a055a1e5f200eada456650e2adddb.zip |
Bug 538461 : let MavenBuilder use a null scheduling rule
Added an experimental and semi-hidden preference to make
the Maven builders scheduling rule null.
The preference will be visible when Eclipse is started with
the -Dm2e.showExperimentalFeatures=true flag (in eclipse.ini)
Change-Id: Ieb231142368927ed9d138afa400f1ad1cec175a1
Signed-off-by: Mickael Istria <mistria@redhat.com>
Diffstat (limited to 'org.eclipse.m2e.core.ui/src/org/eclipse')
4 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java index d1e5d1de..4cb6d17a 100644 --- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java +++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java @@ -70,6 +70,8 @@ public class M2EUIPluginActivator extends AbstractUIPlugin { private MavenUpdateConfigurationChangeListener mavenUpdateConfigurationChangeListener; + public static final String PROP_SHOW_EXPERIMENTAL_FEATURES = "m2e.showExperimentalFeatures"; + @Override public void start(BundleContext context) throws Exception { super.start(context); @@ -156,4 +158,8 @@ public class M2EUIPluginActivator extends AbstractUIPlugin { } return null; } + + public static boolean showExperimentalFeatures() { + return Boolean.parseBoolean(System.getProperty(PROP_SHOW_EXPERIMENTAL_FEATURES)); + } } diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/Messages.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/Messages.java index 1ba1ddbc..75178afe 100644 --- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/Messages.java +++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/Messages.java @@ -721,6 +721,8 @@ public class Messages extends NLS { public static String preferencesDownloadJavadoc; + public static String preferencesNullSchedulingRule; + public static String artifactComponentArtifact; public static String artifactComponentGroupId; diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/messages.properties b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/messages.properties index 9811f250..9f2383c2 100644 --- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/messages.properties +++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/messages.properties @@ -419,6 +419,7 @@ preferencesGlobalChecksumPolicy_ignore=Ignore preferencesGlobalChecksumPolicy_warn=Warn preferencesGlobalChecksumPolicy_fail=Fail preferencesReindexButton=Re&index +preferencesNullSchedulingRule=Minimize lock during build. This is highly experimental and may corrupt build results\nand/or your local Maven repository.\nPlease report any issues to http://bugs.eclipse.org/538461. projectSelectionDialogTitle=Select a Maven project resolverConfigurationAdvanced=Ad&vanced resolverConfigurationProfiles=&Profiles\: @@ -488,3 +489,4 @@ wizardProjectPageProjectTitle=New Maven project wizardProjectPageProjectValidatorInvalidLocation=Invalid project location path wizardProjectPageProjectValidatorProjectLocation=Enter a location for the project. wizardProjectTitle=New Maven Project + diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenPreferencePage.java index 1aa6774f..56d60932 100644 --- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenPreferencePage.java +++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenPreferencePage.java @@ -105,6 +105,12 @@ public class MavenPreferencePage extends FieldEditorPreferencePage implements IW Messages.preferencesGlobalChecksumPolicy_tooltip); addField(checksumPolicy); + if(M2EUIPluginActivator.showExperimentalFeatures()) { + BooleanFieldEditor nullSchedulingRule = new BooleanFieldEditor( + MavenPreferenceConstants.P_BUILDER_USE_NULL_SCHEDULING_RULE, Messages.preferencesNullSchedulingRule, + getFieldEditorParent()); + addField(nullSchedulingRule); + } } @Override |