Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvladt2011-02-10 21:30:34 +0000
committervladt2011-02-10 21:45:44 +0000
commitd778f2782d0a1dd50307452f30961bbecf1b1075 (patch)
tree1c3dc01676ed67d88ddf8b9b780f15a15bee4185
parente461dc3b585b794992d4d0fe349c722bcc7b16fc (diff)
downloadm2e-core-d778f2782d0a1dd50307452f30961bbecf1b1075.tar.gz
m2e-core-d778f2782d0a1dd50307452f30961bbecf1b1075.tar.xz
m2e-core-d778f2782d0a1dd50307452f30961bbecf1b1075.zip
335872: Replaced MavenLogger with slf4j loggers
-rw-r--r--org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenImages.java12
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddDependencyAction.java8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddPluginAction.java8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/DisableNatureAction.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/EnableNatureAction.java94
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenActionSupport.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenPomAction.java19
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenUrlAction.java14
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/RefreshMavenModelsAction.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/SelectionUtil.java8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/UpdateConfigurationAction.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/console/MavenConsoleImpl.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AddDependencyDialog.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenGoalSelectionDialog.java8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java12
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java10
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileArtifactWizardPage.java8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileRepositoryWizardPage.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileWizard.java8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenModuleWizardParentPage.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizard.java6
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizardPage.java2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectSelectionDialog.java8
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java10
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypeParametersPage.java10
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ProjectsImportPage.java12
-rw-r--r--org.eclipse.m2e.discovery/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java1
-rw-r--r--org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java31
-rw-r--r--org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java16
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertExpressionProposal.java7
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnImages.java8
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnIndexPlugin.java9
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java9
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java29
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java7
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java8
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/XMLSchemaMarkerResolution.java9
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerHoverControl.java5
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerLocationService.java30
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/PomEdits.java3
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/XmlUtils.java7
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/lifecycle/LifecycleMappingOperation.java7
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/lifecycle/LifecycleMappingProposal.java14
-rw-r--r--org.eclipse.m2e.editor/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/MavenEditorImages.java6
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java6
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyDetailComposite.java6
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyLabelProvider.java2
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/PluginsComposite.java6
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ReportingComposite.java2
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/RepositoriesComposite.java2
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/ManageDependenciesDialog.java6
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/plugins/PluginExtensionDescriptor.java7
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/BuildPage.java3
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java8
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/FormUtils.java9
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java38
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java10
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java2
69 files changed, 388 insertions, 290 deletions
diff --git a/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF b/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
index 203f8d13..b8adfb6d 100644
--- a/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
@@ -39,5 +39,6 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.5.2",
org.eclipse.core.filesystem;bundle-version="1.2.1",
org.eclipse.core.expressions;bundle-version="3.4.101",
org.eclipse.search;bundle-version="3.5.1",
- org.eclipse.ui.forms;bundle-version="3.4.1"
+ org.eclipse.ui.forms;bundle-version="3.4.1",
+ org.slf4j.api;bundle-version="1.5.11"
Service-Component: OSGI-INF/mavenconsole.xml
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenImages.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenImages.java
index 4125db2f..a00fd804 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenImages.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/MavenImages.java
@@ -14,16 +14,18 @@ package org.eclipse.m2e.core.ui.internal;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.viewers.DecorationOverlayIcon;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Eugene Kuleshov
*/
public class MavenImages {
+ private static final Logger log = LoggerFactory.getLogger(MavenImages.class);
// object images
@@ -127,7 +129,7 @@ public class MavenImages {
return imageDescriptor;
}
} catch(Exception ex) {
- MavenLogger.log(key, ex);
+ log.error(key, ex);
}
return null;
}
@@ -170,7 +172,7 @@ public class MavenImages {
}
catch ( Exception ex )
{
- MavenLogger.log(key, ex);
+ log.error(key, ex);
}
return null;
}
@@ -190,7 +192,7 @@ public class MavenImages {
ImageDescriptor overlay = createDescriptor( overlaykey );
if ( base == null || overlay == null )
{
- MavenLogger.log( "cannot construct overlay image descriptor for " + basekey + " " + overlaykey );
+ log.error( "cannot construct overlay image descriptor for " + basekey + " " + overlaykey );
return null;
}
imageDescriptor = createOverlayDescriptor( base, overlay, quadrant );
@@ -201,7 +203,7 @@ public class MavenImages {
}
catch ( Exception ex )
{
- MavenLogger.log(key, ex);
+ log.error(key, ex);
}
return null;
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddDependencyAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddDependencyAction.java
index 180e4a5e..d1d65534 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddDependencyAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddDependencyAction.java
@@ -20,19 +20,21 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class AddDependencyAction extends MavenActionSupport implements IWorkbenchWindowActionDelegate {
+ private static final Logger log = LoggerFactory.getLogger(AddDependencyAction.class);
public static final String ID = "org.eclipse.m2e.addDependencyAction"; //$NON-NLS-1$
@@ -70,7 +72,7 @@ public class AddDependencyAction extends MavenActionSupport implements IWorkbenc
modelManager.addDependency(file, dependency);
} catch(Exception ex) {
String msg = NLS.bind(Messages.AddDependencyAction_error_msg, file);
- MavenLogger.log(msg, ex);
+ log.error(msg, ex);
MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.AddDependencyAction_error_title, msg);
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddPluginAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddPluginAction.java
index b0660505..e296703b 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddPluginAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/AddPluginAction.java
@@ -18,17 +18,19 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.window.Window;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class AddPluginAction extends MavenActionSupport implements IWorkbenchWindowActionDelegate {
+ private static final Logger log = LoggerFactory.getLogger(AddPluginAction.class);
public static final String ID = "org.eclipse.m2e.addPluginAction"; //$NON-NLS-1$
@@ -60,7 +62,7 @@ public class AddPluginAction extends MavenActionSupport implements IWorkbenchWin
indexedArtifactFile.artifact, //
indexedArtifactFile.version));
} catch(Exception ex) {
- MavenLogger.log("Can't add plugin to " + file, ex);
+ log.error("Can't add plugin to " + file, ex);
}
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/DisableNatureAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/DisableNatureAction.java
index f3d01f2e..23a0f63f 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/DisableNatureAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/DisableNatureAction.java
@@ -21,12 +21,14 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class DisableNatureAction implements IObjectActionDelegate {
+ private static final Logger log = LoggerFactory.getLogger(DisableNatureAction.class);
public static final String ID = "org.eclipse.m2e.disableAction"; //$NON-NLS-1$
private ISelection selection;
@@ -53,7 +55,7 @@ public class DisableNatureAction implements IObjectActionDelegate {
plugin.getProjectConfigurationManager().disableMavenNature(project, new NullProgressMonitor());
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/EnableNatureAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/EnableNatureAction.java
index f6cae12f..cf45c264 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/EnableNatureAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/EnableNatureAction.java
@@ -31,33 +31,35 @@ import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.project.IProjectConfigurationManager;
import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.ui.internal.wizards.MavenPomWizard;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPart;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class EnableNatureAction implements IObjectActionDelegate, IExecutableExtension {
+ private static final Logger log = LoggerFactory.getLogger(EnableNatureAction.class);
public static final String ID = "org.eclipse.m2e.enableNatureAction"; //$NON-NLS-1$
static final String ID_WORKSPACE = "org.eclipse.m2e.enableWorkspaceResolutionAction"; //$NON-NLS-1$
-
+
static final String ID_MODULES = "org.eclipse.m2e.enableModulesAction"; //$NON-NLS-1$
-
+
private boolean workspaceProjects = true;
-
+
private ISelection selection;
-
+
public EnableNatureAction() {
}
-
+
public EnableNatureAction(String option) {
setInitializationData(null, null, option);
}
@@ -94,48 +96,46 @@ public class EnableNatureAction implements IObjectActionDelegate, IExecutableExt
}
private void enableNature(final IProject project, boolean isSingle) {
- final M2EUIPluginActivator plugin = M2EUIPluginActivator.getDefault();
- IFile pom = project.getFile(IMavenConstants.POM_FILE_NAME);
- if(isSingle && !pom.exists()) {
- // XXX move into AbstractProjectConfigurator and use Eclipse project settings
- IWorkbench workbench = plugin.getWorkbench();
-
- MavenPomWizard wizard = new MavenPomWizard();
- wizard.init(workbench, (IStructuredSelection) selection);
-
- Shell shell = workbench.getActiveWorkbenchWindow().getShell();
- WizardDialog wizardDialog = new WizardDialog(shell, wizard);
- wizardDialog.create();
- wizardDialog.getShell().setText(Messages.EnableNatureAction_wizard_shell);
- if(wizardDialog.open() == Window.CANCEL) {
- return;
- }
+ final M2EUIPluginActivator plugin = M2EUIPluginActivator.getDefault();
+ IFile pom = project.getFile(IMavenConstants.POM_FILE_NAME);
+ if(isSingle && !pom.exists()) {
+ // XXX move into AbstractProjectConfigurator and use Eclipse project settings
+ IWorkbench workbench = plugin.getWorkbench();
+
+ MavenPomWizard wizard = new MavenPomWizard();
+ wizard.init(workbench, (IStructuredSelection) selection);
+
+ Shell shell = workbench.getActiveWorkbenchWindow().getShell();
+ WizardDialog wizardDialog = new WizardDialog(shell, wizard);
+ wizardDialog.create();
+ wizardDialog.getShell().setText(Messages.EnableNatureAction_wizard_shell);
+ if(wizardDialog.open() == Window.CANCEL) {
+ return;
}
- Job job = new Job(Messages.EnableNatureAction_job_enable) {
-
- protected IStatus run(IProgressMonitor monitor) {
- try {
- ResolverConfiguration configuration = new ResolverConfiguration();
- configuration.setResolveWorkspaceProjects(workspaceProjects);
- configuration.setActiveProfiles(""); //$NON-NLS-1$
-
- boolean hasMavenNature = project.hasNature(IMavenConstants.NATURE_ID);
-
- IProjectConfigurationManager configurationManager = MavenPlugin.getDefault().getProjectConfigurationManager();
-
- configurationManager.enableMavenNature(project, configuration, new NullProgressMonitor());
-
- if(!hasMavenNature) {
- configurationManager.updateProjectConfiguration(project, monitor);
- }
- } catch(CoreException ex) {
- MavenLogger.log(ex);
+ }
+ Job job = new Job(Messages.EnableNatureAction_job_enable) {
+
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ ResolverConfiguration configuration = new ResolverConfiguration();
+ configuration.setResolveWorkspaceProjects(workspaceProjects);
+ configuration.setActiveProfiles(""); //$NON-NLS-1$
+
+ boolean hasMavenNature = project.hasNature(IMavenConstants.NATURE_ID);
+
+ IProjectConfigurationManager configurationManager = MavenPlugin.getDefault().getProjectConfigurationManager();
+
+ configurationManager.enableMavenNature(project, configuration, new NullProgressMonitor());
+
+ if(!hasMavenNature) {
+ configurationManager.updateProjectConfiguration(project, monitor);
}
- return Status.OK_STATUS;
+ } catch(CoreException ex) {
+ log.error(ex.getMessage(), ex);
}
- };
- job.schedule();
-
+ return Status.OK_STATUS;
+ }
+ };
+ job.schedule();
}
-
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenActionSupport.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenActionSupport.java
index b7fc256e..7b351e81 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenActionSupport.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenActionSupport.java
@@ -22,7 +22,6 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.ArtifactRef;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
@@ -38,6 +37,8 @@ import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
*
@@ -46,6 +47,7 @@ import org.eclipse.ui.PlatformUI;
* @author Jason van Zyl
*/
public abstract class MavenActionSupport implements IObjectActionDelegate {
+ private static final Logger log = LoggerFactory.getLogger(MavenActionSupport.class);
protected IStructuredSelection selection;
protected IWorkbenchPart targetPart;
@@ -61,7 +63,7 @@ public abstract class MavenActionSupport implements IObjectActionDelegate {
}
} catch(Exception ex) {
String msg = "Can't read Maven project";
- MavenLogger.log(msg, ex);
+ log.error(msg, ex);
plugin.getConsole().logError(msg + "; " + ex.toString());
}
return Collections.emptySet();
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenPomAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenPomAction.java
index 2226f22b..e28d95d8 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenPomAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenPomAction.java
@@ -17,7 +17,6 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.util.Collections;
import java.util.List;
import org.apache.maven.artifact.Artifact;
@@ -25,8 +24,6 @@ import org.apache.maven.artifact.repository.ArtifactRepository;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -43,15 +40,14 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexedArtifact;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
-import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
@@ -70,6 +66,8 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionDelegate;
import org.eclipse.ui.part.FileEditorInput;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -78,6 +76,7 @@ import org.eclipse.ui.part.FileEditorInput;
* @author Eugene Kuleshov
*/
public class OpenPomAction extends ActionDelegate implements IWorkbenchWindowActionDelegate {
+ private static final Logger log = LoggerFactory.getLogger(OpenPomAction.class);
private static final String ID = "org.eclipse.m2e.openPomAction"; //$NON-NLS-1$
@@ -120,7 +119,7 @@ public class OpenPomAction extends ActionDelegate implements IWorkbenchWindowAct
return;
}
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
MessageDialog.openInformation(Display.getDefault().getActiveShell(), //
@@ -184,10 +183,10 @@ public class OpenPomAction extends ActionDelegate implements IWorkbenchWindowAct
} catch(IOException ex) {
String msg = NLS.bind(Messages.OpenPomAction_error_open_editor, name);
- MavenLogger.log(msg, ex);
+ log.error(msg, ex);
openDialog(msg + "\n" + ex.toString()); //$NON-NLS-1$
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
openDialog(ex.getMessage() + "\n" + ex.toString()); //$NON-NLS-1$
}
}
@@ -222,10 +221,10 @@ public class OpenPomAction extends ActionDelegate implements IWorkbenchWindowAct
} catch(IOException ex) {
String msg = NLS.bind(Messages.OpenPomAction_error_open_pom, name);
- MavenLogger.log(msg, ex);
+ log.error(msg, ex);
openDialog(msg + "\n" + ex.toString()); //$NON-NLS-1$
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
openDialog(ex.getMessage() + "\n" + ex.toString()); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenUrlAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenUrlAction.java
index 56aebcb6..7bd3c52a 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenUrlAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/OpenUrlAction.java
@@ -34,11 +34,10 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.IMaven;
-import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbenchWindow;
@@ -48,6 +47,8 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionDelegate;
import org.eclipse.ui.browser.IWebBrowser;
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -56,6 +57,7 @@ import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
* @author Eugene Kuleshov
*/
public class OpenUrlAction extends ActionDelegate implements IWorkbenchWindowActionDelegate, IExecutableExtension {
+ private static final Logger log = LoggerFactory.getLogger(OpenUrlAction.class);
public static final String ID_PROJECT = "org.eclipse.m2e.openProjectPage"; //$NON-NLS-1$
@@ -106,7 +108,7 @@ public class OpenUrlAction extends ActionDelegate implements IWorkbenchWindowAct
return;
}
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
MessageDialog.openInformation(Display.getDefault().getActiveShell(), //
@@ -130,15 +132,15 @@ public class OpenUrlAction extends ActionDelegate implements IWorkbenchWindowAct
| IWorkbenchBrowserSupport.LOCATION_BAR, url, url, url);
browser.openURL(new URL(url));
} catch(PartInitException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
} catch(MalformedURLException ex) {
- MavenLogger.log("Malformed url " + url, ex);
+ log.error("Malformed url " + url, ex);
}
}
});
}
} catch(Exception ex) {
- MavenLogger.log("Can't open URL", ex);
+ log.error("Can't open URL", ex);
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/RefreshMavenModelsAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/RefreshMavenModelsAction.java
index 1c2d0cc1..d8934456 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/RefreshMavenModelsAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/RefreshMavenModelsAction.java
@@ -25,15 +25,17 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.project.MavenProjectManager;
import org.eclipse.m2e.core.project.MavenUpdateRequest;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.eclipse.ui.IWorkingSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class RefreshMavenModelsAction implements IWorkbenchWindowActionDelegate, IExecutableExtension {
+ private static final Logger log = LoggerFactory.getLogger(RefreshMavenModelsAction.class);
public static final String ID = "org.eclipse.m2e.refreshMavenModelsAction"; //$NON-NLS-1$
@@ -97,7 +99,7 @@ public class RefreshMavenModelsAction implements IWorkbenchWindowActionDelegate,
projectList.add(project);
}
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/SelectionUtil.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/SelectionUtil.java
index 44a91311..670146a9 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/SelectionUtil.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/SelectionUtil.java
@@ -41,12 +41,11 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.IMaven;
-import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectManager;
+import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.ui.internal.util.Util;
import org.eclipse.m2e.core.ui.internal.util.Util.FileStoreEditorInputStub;
import org.eclipse.m2e.model.edit.pom.Dependency;
@@ -59,12 +58,15 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
import org.eclipse.ui.PlatformUI;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Helper methods to deal with workspace resources passed as navigator selection to actions and wizards.
*/
public class SelectionUtil {
+ private static final Logger log = LoggerFactory.getLogger(SelectionUtil.class);
public static final int UNSUPPORTED = 0;
@@ -289,7 +291,7 @@ public class SelectionUtil {
IOUtil.copy(is, os);
return readMavenProject(tempPomFile, monitor);
} catch(IOException ex) {
- MavenLogger.log("Can't close stream", ex);
+ log.error("Can't close stream", ex);
} finally {
IOUtil.close(is);
IOUtil.close(os);
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/UpdateConfigurationAction.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/UpdateConfigurationAction.java
index 99d33112..df7d3eae 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/UpdateConfigurationAction.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/UpdateConfigurationAction.java
@@ -23,15 +23,17 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.ui.internal.UpdateConfigurationJob;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkingSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class UpdateConfigurationAction implements IObjectActionDelegate {
+ private static final Logger log = LoggerFactory.getLogger(UpdateConfigurationAction.class);
public static final String ID = "org.eclipse.m2e.updateConfigurationAction"; //$NON-NLS-1$
@@ -82,7 +84,7 @@ public class UpdateConfigurationAction implements IObjectActionDelegate {
projects.add(project);
}
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
} else if(element instanceof IAdaptable) {
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/console/MavenConsoleImpl.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/console/MavenConsoleImpl.java
index f1757440..a3f6dfa6 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/console/MavenConsoleImpl.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/console/MavenConsoleImpl.java
@@ -20,10 +20,9 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Display;
@@ -151,7 +150,8 @@ public class MavenConsoleImpl extends IOConsole implements IPropertyChangeListen
break;
}
} catch(IOException ex) {
- MavenLogger.log("Console error", ex);
+ // Don't log using slf4j - it will cause a cycle
+ ex.printStackTrace();
}
} else {
getConsoleDocument().appendConsoleLine(type, line);
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AddDependencyDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AddDependencyDialog.java
index cc1a83fd..b4bffcaf 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AddDependencyDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/AddDependencyDialog.java
@@ -31,7 +31,6 @@ import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexManager;
import org.eclipse.m2e.core.index.IndexedArtifact;
@@ -63,6 +62,8 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.ibm.icu.text.DateFormat;
@@ -74,6 +75,7 @@ import com.ibm.icu.text.DateFormat;
* @author rgould
*/
public class AddDependencyDialog extends AbstractMavenDialog {
+ private static final Logger log = LoggerFactory.getLogger(AddDependencyDialog.class);
public static final String[] SCOPES = new String[] {"compile", "provided", "runtime", "test", "system"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
@@ -651,7 +653,7 @@ public class AddDependencyDialog extends AbstractMavenDialog {
} catch(CoreException ex) {
setResults(IStatus.ERROR, NLS.bind(Messages.AddDependencyDialog_searchError, ex.getMessage()),
Collections.<String, IndexedArtifact> emptyMap());
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
return Status.OK_STATUS;
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenGoalSelectionDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenGoalSelectionDialog.java
index 50db493b..b1c6ebf0 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenGoalSelectionDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/dialogs/MavenGoalSelectionDialog.java
@@ -29,7 +29,6 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.core.Messages;
import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexManager;
@@ -53,9 +52,12 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.ui.dialogs.ISelectionStatusValidator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class MavenGoalSelectionDialog extends ElementTreeSelectionDialog {
+ private static final Logger log = LoggerFactory.getLogger(MavenGoalSelectionDialog.class);
Button isQualifiedNameButton;
@@ -170,7 +172,7 @@ public class MavenGoalSelectionDialog extends ElementTreeSelectionDialog {
// groups.add(new Group(Messages.getString("launch.goalsDialog.lifecycleClean"), //$NON-NLS-1$
// null, null, getLifecyclePhases(embedder.getCleanLifecyclePhases())));
// } catch(Exception e) {
-// MavenLogger.log("Unable to get lifecycle phases", e);
+// log.error("Unable to get lifecycle phases", e);
// }
IndexManager indexManager = MavenPlugin.getDefault().getIndexManager();
@@ -195,7 +197,7 @@ public class MavenGoalSelectionDialog extends ElementTreeSelectionDialog {
}
groups.addAll(map.values());
} catch(CoreException e) {
- MavenLogger.log(e);
+ log.error(e.getMessage(), e);
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java
index 45d49092..4e779fa7 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/lifecycle/LifecycleMappingPropertyPageFactory.java
@@ -24,13 +24,14 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.IProjectConfigurationManager;
import org.eclipse.m2e.core.project.MavenProjectManager;
import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.m2e.core.project.configurator.ILifecycleMapping;
import org.eclipse.swt.widgets.Shell;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -39,6 +40,7 @@ import org.eclipse.swt.widgets.Shell;
* @author dyocum
*/
public class LifecycleMappingPropertyPageFactory {
+ private static final Logger log = LoggerFactory.getLogger(LifecycleMappingPropertyPageFactory.class);
public static final String EXTENSION_LIFECYCLE_MAPPING_PROPERTY_PAGE = IMavenConstants.PLUGIN_ID + ".lifecycleMappingPropertyPage"; //$NON-NLS-1$
@@ -114,7 +116,7 @@ public class LifecycleMappingPropertyPageFactory {
}
pageMap.put(id, propPage);
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java
index 66aef8a3..3032c947 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenArchetypesPreferencePage.java
@@ -36,7 +36,6 @@ import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory;
import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.LocalCatalogFactory;
import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.RemoteCatalogFactory;
import org.eclipse.m2e.core.archetype.ArchetypeManager;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -58,6 +57,8 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.browser.IWebBrowser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -66,6 +67,7 @@ import org.eclipse.ui.browser.IWebBrowser;
* @author Eugene Kuleshov
*/
public class MavenArchetypesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+ private static final Logger log = LoggerFactory.getLogger(MavenArchetypesPreferencePage.class);
ArchetypeManager archetypeManager;
TableViewer archetypesViewer;
@@ -136,9 +138,9 @@ public class MavenArchetypesPreferencePage extends PreferencePage implements IWo
IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser();
browser.openURL(url);
} catch(MalformedURLException ex) {
- MavenLogger.log("Malformed URL", ex);
+ log.error("Malformed URL", ex);
} catch(PartInitException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
});
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java
index 6f59d02f..6d0310ad 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenInstallationsPreferencePage.java
@@ -40,16 +40,15 @@ import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
import org.eclipse.m2e.core.embedder.MavenRuntime;
import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
import org.eclipse.m2e.core.index.IndexManager;
-import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.internal.embedder.MavenEmbeddedRuntime;
import org.eclipse.m2e.core.internal.preferences.MavenPreferenceConstants;
import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -82,6 +81,8 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.browser.IWebBrowser;
import org.eclipse.ui.ide.IDE;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -90,6 +91,7 @@ import org.eclipse.ui.ide.IDE;
* @author Eugene Kuleshov
*/
public class MavenInstallationsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+ private static final Logger log = LoggerFactory.getLogger(MavenInstallationsPreferencePage.class);
final MavenPlugin mavenPlugin;
@@ -528,9 +530,9 @@ public class MavenInstallationsPreferencePage extends PreferencePage implements
IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser();
browser.openURL(url);
} catch(MalformedURLException ex) {
- MavenLogger.log("Malformed URL", ex);
+ log.error("Malformed URL", ex);
} catch(PartInitException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
});
@@ -611,7 +613,7 @@ public class MavenInstallationsPreferencePage extends PreferencePage implements
});
} catch(PartInitException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java
index 2052c5a1..87f0fa9c 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectLifecycleMappingPage.java
@@ -14,14 +14,15 @@ package org.eclipse.m2e.core.ui.internal.preferences;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.project.configurator.ILifecycleMapping;
+import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.ui.internal.lifecycle.ILifecyclePropertyPage;
import org.eclipse.m2e.core.ui.internal.lifecycle.LifecycleMappingPropertyPageFactory;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.dialogs.PropertyPage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Maven project preference page
@@ -29,6 +30,7 @@ import org.eclipse.ui.dialogs.PropertyPage;
* @author Dan Yocum
*/
public class MavenProjectLifecycleMappingPage extends PropertyPage{
+ private static final Logger log = LoggerFactory.getLogger(MavenProjectLifecycleMappingPage.class);
private ILifecyclePropertyPage currentPage;
@@ -66,8 +68,8 @@ public class MavenProjectLifecycleMappingPage extends PropertyPage{
}
page = getPage(lifecycleMapping);
return page;
- } catch(CoreException ce){
- MavenLogger.log(ce);
+ } catch(CoreException e) {
+ log.error(e.getMessage(), e);
SimpleLifecycleMappingPropertyPage p = new SimpleLifecycleMappingPropertyPage(Messages.MavenProjectLifecycleMappingPage_error_page_error);
return p;
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java
index 7c6a50a5..1258d1dd 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenProjectPreferencePage.java
@@ -20,10 +20,9 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
-import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.project.MavenProjectManager;
import org.eclipse.m2e.core.project.ResolverConfiguration;
+import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -34,6 +33,8 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.PropertyPage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Maven project preference page
@@ -41,6 +42,7 @@ import org.eclipse.ui.dialogs.PropertyPage;
* @author Eugene Kuleshov
*/
public class MavenProjectPreferencePage extends PropertyPage {
+ private static final Logger log = LoggerFactory.getLogger(MavenProjectPreferencePage.class);
private Button resolveWorspaceProjectsButton;
// private Button includeModulesButton;
@@ -111,7 +113,7 @@ public class MavenProjectPreferencePage extends PropertyPage {
return true;
}
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
return false;
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java
index 1a5b4a8c..be54ecd7 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/MavenSettingsPreferencePage.java
@@ -33,7 +33,6 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.core.Messages;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
@@ -68,6 +67,8 @@ import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -76,6 +77,7 @@ import org.eclipse.ui.ide.IDE;
* @author Eugene Kuleshov
*/
public class MavenSettingsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+ private static final Logger log = LoggerFactory.getLogger(MavenSettingsPreferencePage.class);
final MavenPlugin mavenPlugin;
@@ -399,7 +401,7 @@ public class MavenSettingsPreferencePage extends PreferencePage implements IWork
});
} catch(PartInitException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java
index d082d161..89ea59a0 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java
@@ -23,7 +23,6 @@ import org.eclipse.jface.fieldassist.IContentProposal;
import org.eclipse.jface.fieldassist.IContentProposalProvider;
import org.eclipse.jface.fieldassist.IControlContentAdapter;
import org.eclipse.jface.fieldassist.TextContentAdapter;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.m2e.core.ui.internal.search.util.CComboContentAdapter;
import org.eclipse.m2e.core.ui.internal.search.util.ControlDecoration;
@@ -34,6 +33,8 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -43,6 +44,7 @@ import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
* @author rgould
*/
public class ProposalUtil {
+ private static final Logger log = LoggerFactory.getLogger(ProposalUtil.class);
public static abstract class Searcher {
public abstract Collection<String> search() throws CoreException;
@@ -91,7 +93,7 @@ public class ProposalUtil {
}
}
} catch(CoreException e) {
- MavenLogger.log(e);
+ log.error(e.getMessage(), e);
}
return proposals.toArray(new IContentProposal[proposals.size()]);
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java
index 2d1755b6..649b03a6 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/AbstractIndexedRepositoryNode.java
@@ -14,11 +14,12 @@ package org.eclipse.m2e.core.ui.internal.views.nodes;
import java.util.Arrays;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.internal.index.IndexedArtifactGroup;
import org.eclipse.m2e.core.internal.index.NexusIndex;
import org.eclipse.m2e.core.ui.internal.MavenImages;
import org.eclipse.swt.graphics.Image;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -27,6 +28,7 @@ import org.eclipse.swt.graphics.Image;
* @author igor
*/
public abstract class AbstractIndexedRepositoryNode implements IMavenRepositoryNode {
+ private static final Logger log = LoggerFactory.getLogger(AbstractIndexedRepositoryNode.class);
protected static final Object[] NO_CHILDREN = new Object[0];
@@ -54,7 +56,7 @@ public abstract class AbstractIndexedRepositoryNode implements IMavenRepositoryN
}
return children;
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
return NO_CHILDREN;
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java
index 463beddf..ae90f559 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenImportWizardPage.java
@@ -39,7 +39,6 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.core.Messages;
import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.project.AbstractProjectScanner;
@@ -62,6 +61,8 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.IWorkingSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -70,6 +71,7 @@ import org.eclipse.ui.IWorkingSet;
* @author Eugene Kuleshov
*/
public class MavenImportWizardPage extends AbstractMavenWizardPage {
+ private static final Logger log = LoggerFactory.getLogger(MavenImportWizardPage.class);
static final Object[] EMPTY = new Object[0];
@@ -329,11 +331,11 @@ public class MavenImportWizardPage extends AbstractMavenWizardPage {
String msg;
if(e instanceof CoreException) {
msg = e.getMessage();
- MavenLogger.log(msg, e);
+ log.error(msg, e);
} else {
msg = "Scanning error " + projectScanner.getDescription() + "; " + e.toString(); //$NON-NLS-2$
MavenPlugin.getDefault().getConsole().logError(msg);
- MavenLogger.log(msg, e);
+ log.error(msg, e);
}
projectTreeViewer.setInput(null);
setPageComplete(false);
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileArtifactWizardPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileArtifactWizardPage.java
index 2dfcd3d3..4d61e559 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileArtifactWizardPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileArtifactWizardPage.java
@@ -18,7 +18,6 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
@@ -38,6 +37,8 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -48,6 +49,7 @@ import org.eclipse.swt.widgets.Text;
* @author Eugene Kuleshov
*/
public class MavenInstallFileArtifactWizardPage extends WizardPage {
+ private static final Logger log = LoggerFactory.getLogger(MavenInstallFileArtifactWizardPage.class);
Text artifactFileNameText;
Text pomFileNameText;
@@ -263,7 +265,7 @@ public class MavenInstallFileArtifactWizardPage extends WizardPage {
return;
}
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
if(n>-1) {
@@ -284,7 +286,7 @@ public class MavenInstallFileArtifactWizardPage extends WizardPage {
return;
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileRepositoryWizardPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileRepositoryWizardPage.java
index aaff216b..3a331d11 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileRepositoryWizardPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileRepositoryWizardPage.java
@@ -22,7 +22,6 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.model.edit.pom.Model;
import org.eclipse.m2e.model.edit.pom.PomFactory;
import org.eclipse.m2e.model.edit.pom.Repository;
@@ -31,6 +30,8 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -39,6 +40,7 @@ import org.eclipse.swt.widgets.Label;
* @author Mike Haller
*/
public class MavenInstallFileRepositoryWizardPage extends WizardPage {
+ private static final Logger log = LoggerFactory.getLogger(MavenInstallFileRepositoryWizardPage.class);
private final IFile pomFile;
@@ -110,7 +112,7 @@ public class MavenInstallFileRepositoryWizardPage extends WizardPage {
File localRepositoryDir = new File(MavenPlugin.getDefault().getMaven().getLocalRepository().getBasedir());
repository.setUrl(localRepositoryDir.toURI().toString());
} catch(CoreException ex) {
- MavenLogger.log("Unable to determine local repository URL, using default", ex);
+ log.error("Unable to determine local repository URL, using default", ex);
}
return repository;
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileWizard.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileWizard.java
index be19e6f7..a833d979 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileWizard.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenInstallFileWizard.java
@@ -28,13 +28,14 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.m2e.core.ui.internal.actions.OpenMavenConsoleAction;
import org.eclipse.ui.IImportWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.progress.IProgressConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -46,6 +47,7 @@ import org.eclipse.ui.progress.IProgressConstants;
* @since 0.9.7
*/
public class MavenInstallFileWizard extends Wizard implements IImportWizard {
+ private static final Logger log = LoggerFactory.getLogger(MavenInstallFileWizard.class);
private IFile selectedFile;
@@ -110,14 +112,14 @@ public class MavenInstallFileWizard extends Wizard implements IImportWizard {
for(Throwable exception : exceptions) {
String msg = Messages.MavenInstallFileWizard_error;
plugin.getConsole().logError(msg + "; " + exception.toString()); //$NON-NLS-1$
- MavenLogger.log(msg, exception);
+ log.error(msg, exception);
}
}
// TODO update index for local maven repository
} catch (CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
plugin.getConsole().logError("Failed to install artifact");
}
return Status.OK_STATUS;
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenModuleWizardParentPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenModuleWizardParentPage.java
index 002bf5b4..211ac257 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenModuleWizardParentPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenModuleWizardParentPage.java
@@ -26,7 +26,6 @@ import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.core.Messages;
import org.eclipse.m2e.core.project.ProjectImportConfiguration;
import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
@@ -44,12 +43,15 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkingSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Maven2ModuleParentPage
*/
public class MavenModuleWizardParentPage extends AbstractMavenWizardPage {
+ private static final Logger log = LoggerFactory.getLogger(MavenModuleWizardParentPage.class);
/** the module name input field */
private Combo moduleNameCombo;
@@ -228,7 +230,7 @@ public class MavenModuleWizardParentPage extends AbstractMavenWizardPage {
validateParent();
parentProjectText.setText(parentModel.getArtifactId());
} catch(CoreException e) {
- MavenLogger.log("Error loading POM: " + e.getMessage(), e);
+ log.error("Error loading POM: " + e.getMessage(), e);
}
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizard.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizard.java
index 5b6a1ed1..a0ad021f 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizard.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizard.java
@@ -35,7 +35,6 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.osgi.util.NLS;
@@ -46,12 +45,15 @@ import org.eclipse.ui.IWorkbenchWizard;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* New POM wizard
*/
public class MavenPomWizard extends Wizard implements INewWizard {
+ private static final Logger log = LoggerFactory.getLogger(MavenPomWizard.class);
private MavenPomWizardPage artifactPage;
private MavenDependenciesWizardPage dependenciesPage;
@@ -155,7 +157,7 @@ public class MavenPomWizard extends Wizard implements INewWizard {
});
} catch(Exception ex) {
- MavenLogger.log("Unable to create POM " + pom + "; " + ex.getMessage(), ex);
+ log.error("Unable to create POM " + pom + "; " + ex.getMessage(), ex);
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizardPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizardPage.java
index ed24d794..2d662f05 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizardPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomWizardPage.java
@@ -143,7 +143,7 @@ public class MavenPomWizardPage extends AbstractMavenWizardPage {
// try {
// projects = javaModel.getJavaProjects();
// } catch(JavaModelException e) {
-// MavenLogger.log(e);
+// log.error(e.getMessage(), e);
// projects = new IJavaProject[0];
// }
//
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectSelectionDialog.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectSelectionDialog.java
index 4ed6466c..31dea5b1 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectSelectionDialog.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectSelectionDialog.java
@@ -28,7 +28,6 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.core.Messages;
import org.eclipse.m2e.core.ui.internal.dialogs.AbstractMavenDialog;
import org.eclipse.swt.SWT;
@@ -40,12 +39,15 @@ import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.dialogs.PatternFilter;
import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* A simple dialog allowing the selection of Maven projects and subfolders containing POMs.
*/
public class MavenProjectSelectionDialog extends AbstractMavenDialog {
+ private static final Logger log = LoggerFactory.getLogger(MavenProjectSelectionDialog.class);
protected static final String DIALOG_SETTINGS = MavenProjectSelectionDialog.class.getName();
@@ -137,7 +139,7 @@ public class MavenProjectSelectionDialog extends AbstractMavenDialog {
children.add(project);
}
} catch(CoreException e) {
- MavenLogger.log("Error checking project: " + e.getMessage(), e);
+ log.error("Error checking project: " + e.getMessage(), e);
}
}
return children.toArray();
@@ -155,7 +157,7 @@ public class MavenProjectSelectionDialog extends AbstractMavenDialog {
}
return children.toArray();
} catch(CoreException e) {
- MavenLogger.log("Error checking container: " + e.getMessage(), e);
+ log.error("Error checking container: " + e.getMessage(), e);
}
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java
index d5622d62..a97e3b66 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypePage.java
@@ -56,7 +56,6 @@ import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory;
import org.eclipse.m2e.core.archetype.ArchetypeCatalogFactory.NexusIndexerCatalogFactory;
import org.eclipse.m2e.core.archetype.ArchetypeManager;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.core.Messages;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.IMaven;
@@ -90,6 +89,8 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -97,6 +98,7 @@ import org.eclipse.ui.dialogs.PreferencesUtil;
* creating new project.
*/
public class MavenProjectWizardArchetypePage extends AbstractMavenWizardPage implements IndexListener {
+ private static final Logger log = LoggerFactory.getLogger(MavenProjectWizardArchetypePage.class);
private static final String KEY_CATALOG = "catalog"; //$NON-NLS-1$
@@ -507,7 +509,7 @@ public class MavenProjectWizardArchetypePage extends AbstractMavenWizardPage imp
list.addAll(arcs);
}
} catch(Exception ce) {
- MavenLogger.log("Unable to read archetype catalog: " + catalog.getId(), ce);
+ log.error("Unable to read archetype catalog: " + catalog.getId(), ce);
}
}
return list;
@@ -763,7 +765,7 @@ public class MavenProjectWizardArchetypePage extends AbstractMavenWizardPage imp
} catch(final Exception ex) {
final String msg = NLS.bind(
org.eclipse.m2e.core.ui.internal.Messages.MavenProjectWizardArchetypePage_error_resolve2, archetypeName);
- MavenLogger.log(msg, ex);
+ log.error(msg, ex);
getShell().getDisplay().asyncExec(new Runnable() {
public void run() {
setErrorMessage(msg + "\n" + ex.toString()); //$NON-NLS-1$
@@ -783,7 +785,7 @@ public class MavenProjectWizardArchetypePage extends AbstractMavenWizardPage imp
} catch(InvocationTargetException ex) {
String msg = NLS.bind(org.eclipse.m2e.core.ui.internal.Messages.MavenProjectWizardArchetypePage_error_resolve2,
archetypeName);
- MavenLogger.log(msg, ex);
+ log.error(msg, ex);
setErrorMessage(msg + "\n" + ex.toString()); //$NON-NLS-1$
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypeParametersPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypeParametersPage.java
index 0d4620f6..cb7ec2c9 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypeParametersPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenProjectWizardArchetypeParametersPage.java
@@ -38,7 +38,6 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.core.Messages;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.project.ProjectImportConfiguration;
@@ -58,6 +57,8 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.ibm.icu.lang.UCharacter;
@@ -67,6 +68,7 @@ import com.ibm.icu.lang.UCharacter;
* a project (thus the class name pun).
*/
public class MavenProjectWizardArchetypeParametersPage extends AbstractMavenWizardPage {
+ private static final Logger log = LoggerFactory.getLogger(MavenProjectWizardArchetypeParametersPage.class);
public static final String DEFAULT_VERSION = "0.0.1-SNAPSHOT"; //$NON-NLS-1$
@@ -406,9 +408,9 @@ public class MavenProjectWizardArchetypeParametersPage extends AbstractMavenWiza
}
}
} catch(UnknownArchetype e) {
- MavenLogger.log(NLS.bind("Error downloading archetype {0}",archetypeName), e);
+ log.error(NLS.bind("Error downloading archetype {0}",archetypeName), e);
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
} finally {
monitor.done();
}
@@ -418,7 +420,7 @@ public class MavenProjectWizardArchetypeParametersPage extends AbstractMavenWiza
// ignore
} catch(InvocationTargetException ex) {
String msg = NLS.bind(org.eclipse.m2e.core.ui.internal.Messages.MavenProjectWizardArchetypeParametersPage_error_download, archetypeName);
- MavenLogger.log(msg, ex);
+ log.error(msg, ex);
setErrorMessage(msg + "\n" + ex.toString()); //$NON-NLS-1$
}
}
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ProjectsImportPage.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ProjectsImportPage.java
index b7576d7d..834bc837 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ProjectsImportPage.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/ProjectsImportPage.java
@@ -51,7 +51,6 @@ import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.core.MavenConsole;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.ui.internal.Messages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -64,12 +63,15 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* The ProjectsImportPage is the page that allows the user to import projects from a particular location.
*/
public class ProjectsImportPage extends WizardPage implements IOverwriteQuery {
+ private static final Logger log = LoggerFactory.getLogger(ProjectsImportPage.class);
String location;
@@ -264,7 +266,7 @@ public class ProjectsImportPage extends WizardPage implements IOverwriteQuery {
});
} catch(InvocationTargetException e) {
- MavenLogger.log(e.getMessage(), e);
+ log.error(e.getMessage(), e);
} catch(InterruptedException e) {
// Nothing to do if the user interrupts.
}
@@ -305,7 +307,7 @@ public class ProjectsImportPage extends WizardPage implements IOverwriteQuery {
try {
directoriesVisited.add(directory.getCanonicalPath());
} catch(IOException exception) {
- MavenLogger.log(exception.toString(), exception);
+ log.error(exception.toString(), exception);
}
}
@@ -330,7 +332,7 @@ public class ProjectsImportPage extends WizardPage implements IOverwriteQuery {
continue;
}
} catch(IOException exception) {
- MavenLogger.log(exception.toString(), exception);
+ log.error(exception.toString(), exception);
}
collectProjectFilesFromDirectory(files, file, directoriesVisited, monitor);
}
@@ -439,7 +441,7 @@ public class ProjectsImportPage extends WizardPage implements IOverwriteQuery {
File projectDir = projectPath.toFile();
File newProject = new File(projectDir.getParent(), projectName);
if(!projectDir.renameTo(newProject)) {
- MavenLogger.log("Can't rename " + projectDir + " to " + newProject, null);
+ log.error("Can't rename " + projectDir + " to " + newProject);
}
record.description.setLocation(null);
}
diff --git a/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF b/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF
index df116547..9055f57a 100644
--- a/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.equinox.p2.ui.discovery,
org.eclipse.equinox.p2.operations,
org.eclipse.equinox.p2.core,
org.eclipse.equinox.p2.metadata,
- org.eclipse.m2e.core.ui;bundle-version="[0.13.0,0.14.0)"
+ org.eclipse.m2e.core.ui;bundle-version="[0.13.0,0.14.0)",
+ org.slf4j.api;bundle-version="1.5.11"
Export-Package: org.eclipse.m2e.internal.discovery,
org.eclipse.m2e.internal.discovery.markers,
org.eclipse.m2e.internal.discovery.startup;x-internal:=true,
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java
index 8302d7c1..3980961c 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/markers/DiscoveryWizardProposal.java
@@ -23,7 +23,6 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.internal.discovery.MavenDiscovery;
import org.eclipse.m2e.internal.discovery.MavenDiscoveryIcons;
import org.eclipse.m2e.internal.discovery.Messages;
diff --git a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java
index c6d97ba2..2929989c 100644
--- a/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java
+++ b/org.eclipse.m2e.discovery/src/org/eclipse/m2e/internal/discovery/wizards/MavenCatalogViewer.java
@@ -15,8 +15,6 @@ import java.net.URL;
import java.util.Collection;
import org.apache.maven.plugin.MojoExecution;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.discovery.Catalog;
import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
import org.eclipse.equinox.internal.p2.discovery.model.Tag;
@@ -24,19 +22,20 @@ import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration
import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.jface.window.IShellProvider;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.internal.lifecycle.LifecycleMappingFactory;
import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadata;
import org.eclipse.m2e.core.internal.lifecycle.model.LifecycleMappingMetadataSource;
import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionMetadata;
-import org.eclipse.m2e.internal.discovery.DiscoveryActivator;
import org.eclipse.m2e.internal.discovery.MavenDiscovery;
import org.eclipse.m2e.internal.discovery.Messages;
import org.eclipse.osgi.util.NLS;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@SuppressWarnings("restriction")
public class MavenCatalogViewer extends CatalogViewer {
+ private static final Logger log = LoggerFactory.getLogger(MavenCatalogViewer.class);
private static final String CONFIGURATOR_PREFIX = "configurator:"; //$NON-NLS-1$
@@ -64,48 +63,48 @@ public class MavenCatalogViewer extends CatalogViewer {
shellProvider.getShell().getDisplay().syncExec(new Runnable() {
@SuppressWarnings("synthetic-access")
public void run() {
- for (CatalogItem ci : getCatalog().getItems()) {
+ for(CatalogItem ci : getCatalog().getItems()) {
boolean selected = false;
LifecycleMappingMetadataSource src = getLifecycleMappingMetadataSource(ci);
- if (src != null) {
- for (String packagingType : selectedPackagingTypes) {
+ if(src != null) {
+ for(String packagingType : selectedPackagingTypes) {
if(hasPackaging(src, packagingType)) {
selected = true;
select(ci);
break;
}
}
- if (selected) {
+ if(selected) {
continue;
}
for(MojoExecution mojoExecution : selectedMojos) {
- if (matchesFilter(src, mojoExecution)) {
+ if(matchesFilter(src, mojoExecution)) {
selected = true;
select(ci);
break;
}
}
- if (selected) {
+ if(selected) {
continue;
}
}
for(String configuratorId : selectedConfiguratorIds) {
Tag configuratorIdTag = new Tag(CONFIGURATOR_PREFIX + configuratorId, CONFIGURATOR_PREFIX + configuratorId);
- if (ci.hasTag(configuratorIdTag)) {
+ if(ci.hasTag(configuratorIdTag)) {
selected = true;
select(ci);
break;
}
}
- if (selected) {
+ if(selected) {
continue;
}
for(String lifecycleId : selectedLifecycleIds) {
Tag lifecycleIdTag = new Tag(LIFECYCLE_PREFIX + lifecycleId, LIFECYCLE_PREFIX + lifecycleId);
- if (ci.hasTag(lifecycleIdTag)) {
+ if(ci.hasTag(lifecycleIdTag)) {
select(ci);
break;
}
@@ -128,14 +127,12 @@ public class MavenCatalogViewer extends CatalogViewer {
}
return false;
}
-
+
private LifecycleMappingMetadataSource getLifecycleMappingMetadataSource(CatalogItem ci) {
try {
return LifecycleMappingFactory.createLifecycleMappingMetadataSource(getLifecycleMappingMetadataSourceURL(ci));
} catch(Exception e) {
- MavenLogger.log(new Status(IStatus.WARNING, DiscoveryActivator.PLUGIN_ID, NLS.bind(
- Messages.MavenCatalogViewer_Error_loading_lifecycle,
- ci.getId()), e));
+ log.warn(NLS.bind(Messages.MavenCatalogViewer_Error_loading_lifecycle, ci.getId()), e);
return null;
}
}
diff --git a/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF b/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF
index 6fab89d7..b5e6fb48 100644
--- a/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.editor.xml/META-INF/MANIFEST.MF
@@ -20,7 +20,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui.ide,
org.eclipse.core.filesystem,
org.eclipse.ui.forms,
- org.eclipse.m2e.core.ui;bundle-version="[0.13.0,0.14.0)"
+ org.eclipse.m2e.core.ui;bundle-version="[0.13.0,0.14.0)",
+ org.slf4j.api;bundle-version="1.5.11"
Export-Package: org.eclipse.m2e.editor.xml, org.eclipse.m2e.editor.xml.internal
Bundle-ClassPath: .
Bundle-Vendor: %Bundle-Vendor
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java
index 7543b3db..94fcfac6 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java
@@ -22,6 +22,8 @@ import static org.eclipse.m2e.editor.xml.internal.PomEdits.setText;
import java.io.IOException;
import org.apache.maven.project.MavenProject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -41,7 +43,6 @@ import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.ui.internal.dialogs.MavenRepositorySearchDialog;
@@ -51,6 +52,7 @@ import org.eclipse.m2e.editor.xml.internal.PomEdits.OperationTuple;
import org.eclipse.m2e.editor.xml.internal.XmlUtils;
public class InsertArtifactProposal implements ICompletionProposal, ICompletionProposalExtension4, ICompletionProposalExtension5 {
+ private static final Logger log = LoggerFactory.getLogger(InsertArtifactProposal.class);
private ISourceViewer sourceViewer;
private Region region;
@@ -119,9 +121,9 @@ public class InsertArtifactProposal implements ICompletionProposal, ICompletionP
}
}));
} catch(IOException e) {
- MavenLogger.log("Failed inserting parent element", e); //$NON-NLS-1$
+ log.error("Failed inserting parent element", e); //$NON-NLS-1$
} catch(CoreException e) {
- MavenLogger.log("Failed inserting parent element", e); //$NON-NLS-1$
+ log.error("Failed inserting parent element", e); //$NON-NLS-1$
}
}
@@ -175,9 +177,9 @@ public class InsertArtifactProposal implements ICompletionProposal, ICompletionP
}
}));
} catch(IOException e) {
- MavenLogger.log("Failed inserting plugin element", e); //$NON-NLS-1$
+ log.error("Failed inserting plugin element", e); //$NON-NLS-1$
} catch(CoreException e) {
- MavenLogger.log("Failed inserting plugin element", e); //$NON-NLS-1$
+ log.error("Failed inserting plugin element", e); //$NON-NLS-1$
}
}
// dependency type
@@ -223,9 +225,9 @@ public class InsertArtifactProposal implements ICompletionProposal, ICompletionP
}
}));
} catch(IOException e) {
- MavenLogger.log("Failed inserting dependency element", e); //$NON-NLS-1$
+ log.error("Failed inserting dependency element", e); //$NON-NLS-1$
} catch(CoreException e) {
- MavenLogger.log("Failed inserting dependency element", e); //$NON-NLS-1$
+ log.error("Failed inserting dependency element", e); //$NON-NLS-1$
}
}
}
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertExpressionProposal.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertExpressionProposal.java
index 883a5346..24c14c58 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertExpressionProposal.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertExpressionProposal.java
@@ -15,6 +15,8 @@ import org.apache.maven.model.InputLocation;
import org.apache.maven.model.InputSource;
import org.apache.maven.model.Model;
import org.apache.maven.project.MavenProject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.text.BadLocationException;
@@ -28,7 +30,6 @@ import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.editor.xml.internal.Messages;
/**
* insertion proposal for ${ expressions
@@ -36,6 +37,7 @@ import org.eclipse.m2e.editor.xml.internal.Messages;
*
*/
public class InsertExpressionProposal implements ICompletionProposal, ICompletionProposalExtension5 {
+ private static final Logger log = LoggerFactory.getLogger(InsertExpressionProposal.class);
private MavenProject project;
private String key;
@@ -93,9 +95,8 @@ public class InsertExpressionProposal implements ICompletionProposal, ICompletio
document.replace(offset, region.getLength(), replace);
len = replace.length();
} catch(BadLocationException e) {
- MavenLogger.log("Cannot apply proposal", e);
+ log.error("Cannot apply proposal", e);
}
-
}
public Point getSelection(IDocument document) {
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnImages.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnImages.java
index 90ff8203..faa96fd6 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnImages.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnImages.java
@@ -11,17 +11,19 @@
package org.eclipse.m2e.editor.xml;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
-
/**
* @author Eugene Kuleshov
*/
public class MvnImages {
+ private static final Logger log = LoggerFactory.getLogger(MvnImages.class);
// object images
@@ -84,7 +86,7 @@ public class MvnImages {
}
return imageDescriptor;
} catch (Exception ex) {
- MavenLogger.log(key, ex);
+ log.error(key, ex);
return null;
}
}
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnIndexPlugin.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnIndexPlugin.java
index 5e5812df..eb66cbfe 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnIndexPlugin.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MvnIndexPlugin.java
@@ -13,6 +13,9 @@ package org.eclipse.m2e.editor.xml;
import java.io.IOException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.osgi.framework.BundleContext;
import org.eclipse.jface.text.templates.ContextTypeRegistry;
@@ -21,13 +24,13 @@ import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
-
/**
* @author Lukas Krecan
*/
public class MvnIndexPlugin extends AbstractUIPlugin {
+ private static final Logger log = LoggerFactory.getLogger(MvnIndexPlugin.class);
+
public static final String PLUGIN_ID = "org.eclipse.m2e.editor.xml"; //$NON-NLS-1$
private static final String TEMPLATES_KEY = PLUGIN_ID + ".templates"; //$NON-NLS-1$
@@ -65,7 +68,7 @@ public class MvnIndexPlugin extends AbstractUIPlugin {
try {
templateStore.load();
} catch(IOException ex) {
- MavenLogger.log("Unable to load pom templates", ex); //$NON-NLS-1$
+ log.error("Unable to load pom templates", ex); //$NON-NLS-1$
}
}
return templateStore;
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
index bb6c35ce..e4544cc8 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
@@ -26,6 +26,8 @@ import org.apache.maven.model.Model;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.PluginManagement;
import org.apache.maven.project.MavenProject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -62,7 +64,6 @@ import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction.MavenPathStorageEditorInput;
import org.eclipse.m2e.editor.xml.internal.Messages;
@@ -75,7 +76,7 @@ import org.eclipse.m2e.editor.xml.internal.XmlUtils;
* @author Milos Kleint
*/
public class PomHyperlinkDetector implements IHyperlinkDetector {
-
+ private static final Logger log = LoggerFactory.getLogger(PomHyperlinkDetector.class);
public IHyperlink[] detectHyperlinks(final ITextViewer textViewer, final IRegion region, boolean canShowMultipleHyperlinks) {
if(region == null || textViewer == null) {
@@ -542,7 +543,7 @@ public class PomHyperlinkDetector implements IHyperlinkDetector {
IEditorPart part = OpenPomAction.openEditor(input, name);
reveal(selectEditorPage(part), line, column);
} catch(IOException e) {
- MavenLogger.log("failed opening editor", e);
+ log.error("failed opening editor", e);
}
}
} catch(PartInitException e) {
@@ -581,7 +582,7 @@ public class PomHyperlinkDetector implements IHyperlinkDetector {
int offset = document.getLineOffset(line - 1);
structured.selectAndReveal(offset + column - 1, 0);
} catch(BadLocationException e) {
- MavenLogger.log("failed selecting part of editor", e);
+ log.error("failed selecting part of editor", e);
}
}
}
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java
index 07bf0ac3..75d52ab0 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java
@@ -16,6 +16,8 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.Text;
@@ -54,7 +56,6 @@ import org.eclipse.wst.sse.core.utils.StringUtils;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionAction;
import org.eclipse.m2e.editor.xml.internal.Messages;
import org.eclipse.m2e.editor.xml.internal.NodeOperation;
@@ -62,6 +63,8 @@ import org.eclipse.m2e.editor.xml.internal.XmlUtils;
import org.eclipse.m2e.editor.xml.internal.lifecycle.LifecycleMappingProposal;
public class PomQuickAssistProcessor implements IQuickAssistProcessor {
+ private static final Logger log = LoggerFactory.getLogger(PomQuickAssistProcessor.class);
+
private static final String GROUP_ID_NODE = "groupId"; //$NON-NLS-1$
private static final String ARTIFACT_ID_NODE = "artifactId"; //$NON-NLS-1$
private static final String VERSION_NODE = "version"; //$NON-NLS-1$
@@ -224,7 +227,7 @@ class SchemaCompletionProposal implements ICompletionProposal, ICompletionPropos
}
});
} catch(Exception e) {
- MavenLogger.log("Unable to insert schema info", e); //$NON-NLS-1$
+ log.error("Unable to insert schema info", e); //$NON-NLS-1$
}
}
}
@@ -308,7 +311,7 @@ static class IdPartRemovalProposal implements ICompletionProposal, ICompletionPr
edit.apply(doc);
marker.delete();
} catch(Exception e) {
- MavenLogger.log("Unable to remove the element", e); //$NON-NLS-1$
+ log.error("Unable to remove the element", e); //$NON-NLS-1$
}
}
}
@@ -369,9 +372,9 @@ static class IdPartRemovalProposal implements ICompletionProposal, ICompletionPr
}
});
} catch(IOException e) {
- MavenLogger.log("Error processing marker", e);
+ log.error("Error processing marker", e);
} catch(CoreException e) {
- MavenLogger.log("Error processing marker", e);
+ log.error("Error processing marker", e);
}
}
@@ -412,7 +415,7 @@ static class ManagedVersionRemovalProposal implements ICompletionProposal, IComp
Element artifact = findArtifactElement(root, isdep, marker);
if (artifact == null) {
//TODO report somehow?
- MavenLogger.log("Unable to find the marked element"); //$NON-NLS-1$
+ log.error("Unable to find the marked element"); //$NON-NLS-1$
return;
}
Element value = XmlUtils.findChild(artifact, VERSION_NODE); //$NON-NLS-1$ //$NON-NLS-2$
@@ -433,7 +436,7 @@ static class ManagedVersionRemovalProposal implements ICompletionProposal, IComp
edit.apply(doc);
marker.delete();
} catch(Exception e) {
- MavenLogger.log("Unable to remove the element", e); //$NON-NLS-1$
+ log.error("Unable to remove the element", e); //$NON-NLS-1$
}
}
}
@@ -538,9 +541,9 @@ static class ManagedVersionRemovalProposal implements ICompletionProposal, IComp
}
});
} catch(IOException e) {
- MavenLogger.log("Error processing marker", e);
+ log.error("Error processing marker", e);
} catch(CoreException e) {
- MavenLogger.log("Error processing marker", e);
+ log.error("Error processing marker", e);
}
}
@@ -602,7 +605,7 @@ static class IgnoreWarningProposal implements ICompletionProposal, ICompletionPr
edit.apply(doc);
marker.delete();
} catch(Exception e) {
- MavenLogger.log("Unable to insert", e); //$NON-NLS-1$
+ log.error("Unable to insert", e); //$NON-NLS-1$
}
}
} catch(BadLocationException e1) {
@@ -672,7 +675,7 @@ static class IgnoreWarningProposal implements ICompletionProposal, ICompletionPr
}
}
} catch(BadLocationException e1) {
- MavenLogger.log("Error while computing completion proposal", e1);
+ log.error("Error while computing completion proposal", e1);
}
} finally {
if (domModel != null) {
@@ -694,9 +697,9 @@ static class IgnoreWarningProposal implements ICompletionProposal, ICompletionPr
}
});
} catch(IOException e) {
- MavenLogger.log("Error processing marker", e);
+ log.error("Error processing marker", e);
} catch(CoreException e) {
- MavenLogger.log("Error processing marker", e);
+ log.error("Error processing marker", e);
}
}
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java
index d728c12f..81a41359 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContext.java
@@ -34,6 +34,8 @@ import org.codehaus.plexus.interpolation.PrefixedObjectValueSource;
import org.codehaus.plexus.interpolation.PropertiesBasedValueSource;
import org.codehaus.plexus.interpolation.RegexBasedInterpolator;
import org.codehaus.plexus.util.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -43,7 +45,6 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.templates.Template;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.m2e.core.ui.internal.search.util.ArtifactInfo;
import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
@@ -470,6 +471,7 @@ public enum PomTemplateContext {
}
}
};
+ private static final Logger log = LoggerFactory.getLogger(PomTemplateContext.class);
private static final String PREFIX = MvnIndexPlugin.PLUGIN_ID + ".templates.contextType."; //$NON-NLS-1$
@@ -487,7 +489,7 @@ public enum PomTemplateContext {
try {
addTemplates(project, eclipsePrj, templates, node, prefix);
} catch (CoreException e) {
- MavenLogger.log(e);
+ log.error(e.getMessage(), e);
}
return templates.toArray(new Template[templates.size()]);
}
@@ -733,5 +735,4 @@ public enum PomTemplateContext {
private static void add(Collection<Template> proposals, String contextTypeId, String name, String description) {
proposals.add(new Template(name, description, contextTypeId, name, false));
}
-
}
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java
index c140d2ba..e1cd677d 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java
@@ -26,16 +26,18 @@ import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
import org.codehaus.plexus.util.IOUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.MavenConsole;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.IMaven;
class PomTemplateContextUtil {
+ private static final Logger log = LoggerFactory.getLogger(PomTemplateContextUtil.class);
public static final PomTemplateContextUtil INSTANCE = new PomTemplateContextUtil();
@@ -78,7 +80,7 @@ class PomTemplateContextUtil {
} catch(Exception ex) {
String msg = "Can't read configuration for " + name; //$NON-NLS-1$
console.logError(msg);
- MavenLogger.log(msg, ex);
+ log.error(msg, ex);
} finally {
IOUtil.close(is);
@@ -97,7 +99,7 @@ class PomTemplateContextUtil {
} else {
console.logError(status.getMessage());
}
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
return null;
}
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/XMLSchemaMarkerResolution.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/XMLSchemaMarkerResolution.java
index f35edc3d..c24d7610 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/XMLSchemaMarkerResolution.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/XMLSchemaMarkerResolution.java
@@ -11,6 +11,9 @@
package org.eclipse.m2e.editor.xml;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
@@ -23,7 +26,6 @@ import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.editor.xml.internal.Messages;
/**
@@ -32,6 +34,7 @@ import org.eclipse.m2e.editor.xml.internal.Messages;
* @author dyocum
*/
public class XMLSchemaMarkerResolution implements IMarkerResolution {
+ private static final Logger log = LoggerFactory.getLogger(XMLSchemaMarkerResolution.class);
/* (non-Javadoc)
* @see org.eclipse.ui.IMarkerResolution#getLabel()
@@ -60,14 +63,14 @@ public class XMLSchemaMarkerResolution implements IMarkerResolution {
IEditorPart activeEditor = MvnIndexPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
MvnIndexPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().saveEditor(activeEditor, false);
} catch(Exception e){
- MavenLogger.log("Unable to insert schema info", e); //$NON-NLS-1$
+ log.error("Unable to insert schema info", e); //$NON-NLS-1$
}
} else {
String msg = Messages.MavenMarkerResolution_error;
MessageDialog.openError(MvnIndexPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), Messages.MavenMarkerResolution_error_title, msg);
}
} catch(Exception e) {
- MavenLogger.log("Unable to run quick fix for maven marker", e); //$NON-NLS-1$
+ log.error("Unable to run quick fix for maven marker", e); //$NON-NLS-1$
}
}
}
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerHoverControl.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerHoverControl.java
index 87ed2449..2bebfe47 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerHoverControl.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerHoverControl.java
@@ -37,8 +37,6 @@ import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.MouseEvent;
@@ -59,7 +57,6 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.ScrollBar;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolution2;
@@ -68,9 +65,9 @@ import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess;
import org.eclipse.m2e.editor.xml.PomHyperlinkDetector;
-import org.eclipse.m2e.editor.xml.PomTextHover;
import org.eclipse.m2e.editor.xml.PomHyperlinkDetector.ExpressionRegion;
import org.eclipse.m2e.editor.xml.PomHyperlinkDetector.ManagedArtifactRegion;
+import org.eclipse.m2e.editor.xml.PomTextHover;
import org.eclipse.m2e.editor.xml.PomTextHover.CompoundRegion;
import org.eclipse.m2e.editor.xml.PomTextHover.MarkerRegion;
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerLocationService.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerLocationService.java
index f271afc2..128be22a 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerLocationService.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerLocationService.java
@@ -1,5 +1,12 @@
package org.eclipse.m2e.editor.xml.internal;
+import static org.eclipse.m2e.editor.xml.internal.PomEdits.childEquals;
+import static org.eclipse.m2e.editor.xml.internal.PomEdits.childMissingOrEqual;
+import static org.eclipse.m2e.editor.xml.internal.PomEdits.findChild;
+import static org.eclipse.m2e.editor.xml.internal.PomEdits.findChilds;
+import static org.eclipse.m2e.editor.xml.internal.PomEdits.getTextValue;
+import static org.eclipse.m2e.editor.xml.internal.PomEdits.textEquals;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
@@ -11,6 +18,8 @@ import org.apache.maven.model.DependencyManagement;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.PluginManagement;
import org.apache.maven.project.MavenProject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Comment;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -20,7 +29,6 @@ import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.sse.core.StructuredModelManager;
@@ -33,12 +41,10 @@ import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.internal.markers.IEditorMarkerService;
import org.eclipse.m2e.core.internal.markers.IMarkerLocationService;
import org.eclipse.m2e.core.internal.markers.IMavenMarkerManager;
-
-import static org.eclipse.m2e.editor.xml.internal.PomEdits.*;
+import org.eclipse.m2e.editor.xml.internal.PomEdits.Matcher;
/**
* a service impl used by the core module to improve marker locations and addition of our own markers
@@ -46,6 +52,8 @@ import static org.eclipse.m2e.editor.xml.internal.PomEdits.*;
*
*/
public class MarkerLocationService implements IMarkerLocationService, IEditorMarkerService {
+ private static final Logger log = LoggerFactory.getLogger(MarkerLocationService.class);
+
private static final String XSI_SCHEMA_LOCATION = "xsi:schemaLocation"; //$NON-NLS-1$
private static final String PROJECT_NODE = "project"; //$NON-NLS-1$
@@ -66,9 +74,9 @@ public class MarkerLocationService implements IMarkerLocationService, IEditorMar
}
});
} catch(IOException e) {
- MavenLogger.log("Error locating marker", e);
+ log.error("Error locating marker", e);
} catch(CoreException e) {
- MavenLogger.log("Error locating marker", e);
+ log.error("Error locating marker", e);
}
}
@@ -131,9 +139,9 @@ public class MarkerLocationService implements IMarkerLocationService, IEditorMar
}
});
} catch(IOException e) {
- MavenLogger.log("Error locating marker", e);
+ log.error("Error locating marker", e);
} catch(CoreException e) {
- MavenLogger.log("Error locating marker", e);
+ log.error("Error locating marker", e);
}
}
}
@@ -154,7 +162,7 @@ public class MarkerLocationService implements IMarkerLocationService, IEditorMar
}
marker.setAttribute(IMarker.LINE_NUMBER, structuredDocument.getLineOfOffset(region.getStartOffset()) + 1);
} catch(CoreException e) {
- MavenLogger.log(e);
+ log.error(e.getMessage(), e);
}
}
}
@@ -212,7 +220,7 @@ public class MarkerLocationService implements IMarkerLocationService, IEditorMar
}
}
} catch(Exception ex) {
- MavenLogger.log("Error checking for schema", ex); //$NON-NLS-1$
+ log.error("Error checking for schema", ex); //$NON-NLS-1$
}
finally {
if ( domModel != null ) {
@@ -473,7 +481,7 @@ public class MarkerLocationService implements IMarkerLocationService, IEditorMar
}
}
} catch(Exception t) {
- MavenLogger.log("Error checking for warnings", t); //$NON-NLS-1$
+ log.error("Error checking for warnings", t); //$NON-NLS-1$
} finally {
if(domModel != null) {
domModel.releaseFromRead();
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/PomEdits.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/PomEdits.java
index e23c8538..82c28016 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/PomEdits.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/PomEdits.java
@@ -30,9 +30,6 @@ import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentExtension4;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.text.rules.IStructuredRegion;
import org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/XmlUtils.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/XmlUtils.java
index a8529015..31251f6c 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/XmlUtils.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/XmlUtils.java
@@ -19,6 +19,8 @@ import java.util.Stack;
import org.apache.maven.model.InputLocation;
import org.apache.maven.model.InputSource;
import org.apache.maven.project.MavenProject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -26,7 +28,6 @@ import org.eclipse.core.filebuffers.FileBuffers;
import org.eclipse.core.filebuffers.ITextFileBuffer;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -43,7 +44,6 @@ import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
/**
@@ -51,6 +51,7 @@ import org.eclipse.m2e.core.project.IMavenProjectFacade;
* @author mkleint
*/
public class XmlUtils {
+ private static final Logger log = LoggerFactory.getLogger(XmlUtils.class);
public static Element findChild(Element parent, String name) {
return PomEdits.findChild(parent, name);
@@ -182,7 +183,7 @@ public class XmlUtils {
file = new File(maven.getLocalRepositoryPath(), path);
}
} catch(CoreException e) {
- MavenLogger.log("Failed to calculate local repository path of artifact", e);
+ log.error("Failed to calculate local repository path of artifact", e);
}
}
}
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/lifecycle/LifecycleMappingOperation.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/lifecycle/LifecycleMappingOperation.java
index be47791a..cfd82e1f 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/lifecycle/LifecycleMappingOperation.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/lifecycle/LifecycleMappingOperation.java
@@ -28,16 +28,19 @@ import java.util.List;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.artifact.versioning.VersionRange;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Comment;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.internal.lifecycle.LifecycleMappingFactory;
import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionAction;
import org.eclipse.m2e.editor.xml.internal.PomEdits.Operation;
public class LifecycleMappingOperation implements Operation {
+ private static final Logger log = LoggerFactory.getLogger(LifecycleMappingOperation.class);
+
private static final String LIFECYCLE_PLUGIN_VERSION = LifecycleMappingFactory.LIFECYCLE_MAPPING_PLUGIN_VERSION;
private static final String LIFECYCLE_PLUGIN_ARTIFACTID = LifecycleMappingFactory.LIFECYCLE_MAPPING_PLUGIN_ARTIFACTID;
@@ -97,7 +100,7 @@ public class LifecycleMappingOperation implements Operation {
setText(rangeEl, "[" + version + ",)");
}
} catch(InvalidVersionSpecificationException e) {
- MavenLogger.log("Failed to parse version range:" + versionRange, e);
+ log.error("Failed to parse version range:" + versionRange, e);
}
}
execution = exec;
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/lifecycle/LifecycleMappingProposal.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/lifecycle/LifecycleMappingProposal.java
index 7c2c92fe..b241930b 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/lifecycle/LifecycleMappingProposal.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/lifecycle/LifecycleMappingProposal.java
@@ -2,6 +2,9 @@ package org.eclipse.m2e.editor.xml.internal.lifecycle;
import java.io.IOException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
@@ -19,12 +22,13 @@ import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.texteditor.MarkerAnnotation;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.internal.lifecycle.model.PluginExecutionAction;
import org.eclipse.m2e.editor.xml.internal.Messages;
import org.eclipse.m2e.editor.xml.internal.PomEdits;
public class LifecycleMappingProposal implements ICompletionProposal, ICompletionProposalExtension5, IMarkerResolution {
+ private static final Logger log = LoggerFactory.getLogger(LifecycleMappingProposal.class);
+
private IQuickAssistInvocationContext context;
private final IMarker marker;
@@ -47,9 +51,9 @@ public class LifecycleMappingProposal implements ICompletionProposal, ICompletio
PomEdits.performOnDOMDocument(new PomEdits.OperationTuple(doc, createOperation()));
marker.delete();
} catch(IOException e) {
- MavenLogger.log("Error generating code in pom.xml", e); //$NON-NLS-1$
+ log.error("Error generating code in pom.xml", e); //$NON-NLS-1$
} catch(CoreException e) {
- MavenLogger.log(e);
+ log.error(e.getMessage(), e);
}
}
@@ -115,9 +119,9 @@ public class LifecycleMappingProposal implements ICompletionProposal, ICompletio
PomEdits.performOnDOMDocument(new PomEdits.OperationTuple((IFile) marker.getResource(), createOperation()));
marker.delete();
} catch(IOException e) {
- MavenLogger.log("Error generating code in pom.xml", e); //$NON-NLS-1$
+ log.error("Error generating code in pom.xml", e); //$NON-NLS-1$
} catch(CoreException e) {
- MavenLogger.log(e);
+ log.error(e.getMessage(), e);
}
}
diff --git a/org.eclipse.m2e.editor/META-INF/MANIFEST.MF b/org.eclipse.m2e.editor/META-INF/MANIFEST.MF
index 953c878f..7e02623a 100644
--- a/org.eclipse.m2e.editor/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.editor/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.m2e.maven.runtime;bundle-version="[0.13.0,0.14.0)",
org.eclipse.m2e.model.edit;bundle-version="[0.13.0,0.14.0)",
org.eclipse.m2e.editor.xml;bundle-version="[0.13.0,0.14.0)",
- org.eclipse.m2e.core.ui;bundle-version="[0.13.0,0.14.0)"
+ org.eclipse.m2e.core.ui;bundle-version="[0.13.0,0.14.0)",
+ org.slf4j.api;bundle-version="1.5.11"
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
JavaSE-1.6
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/MavenEditorImages.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/MavenEditorImages.java
index 2597fa6c..598c01fc 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/MavenEditorImages.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/MavenEditorImages.java
@@ -13,14 +13,16 @@ package org.eclipse.m2e.editor;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Eugene Kuleshov
*/
public class MavenEditorImages {
+ private static final Logger log = LoggerFactory.getLogger(MavenEditorImages.class);
// images
@@ -114,7 +116,7 @@ public class MavenEditorImages {
}
return imageDescriptor;
} catch (Exception ex) {
- MavenLogger.log(key, ex);
+ log.error(key, ex);
return null;
}
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java
index 6283ab0c..ad39bf25 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependenciesComposite.java
@@ -46,7 +46,6 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.window.Window;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectManager;
@@ -82,12 +81,15 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Eugene Kuleshov
*/
public class DependenciesComposite extends Composite {
+ private static final Logger log = LoggerFactory.getLogger(DependenciesComposite.class);
protected static PomPackage POM_PACKAGE = PomPackage.eINSTANCE;
@@ -664,7 +666,7 @@ public class DependenciesComposite extends Composite {
return a.getBaseVersion();
}
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
return null;
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyDetailComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyDetailComposite.java
index 4600db72..ad5f5c94 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyDetailComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyDetailComposite.java
@@ -12,7 +12,6 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
import org.eclipse.m2e.core.ui.internal.search.util.Packaging;
import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
@@ -37,9 +36,12 @@ import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Hyperlink;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class DependencyDetailComposite extends Composite {
+ private static final Logger log = LoggerFactory.getLogger(DependencyDetailComposite.class);
protected static PomPackage POM_PACKAGE = PomPackage.eINSTANCE;
@@ -102,7 +104,7 @@ public class DependencyDetailComposite extends Composite {
return a.getBaseVersion();
}
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
return null;
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyLabelProvider.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyLabelProvider.java
index 7d72d2a7..005dd0b2 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyLabelProvider.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/DependencyLabelProvider.java
@@ -17,6 +17,7 @@ import org.apache.maven.artifact.Artifact;
import org.apache.maven.model.DependencyManagement;
import org.apache.maven.model.InputLocation;
import org.apache.maven.project.MavenProject;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IDecoration;
import org.eclipse.jface.viewers.LabelProvider;
@@ -37,7 +38,6 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider;
/**
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/PluginsComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/PluginsComposite.java
index 2ddc4ecf..9ef13b52 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/PluginsComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/PluginsComposite.java
@@ -59,7 +59,6 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.window.Window;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
@@ -114,11 +113,14 @@ import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.eclipse.ui.forms.widgets.Section;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Eugene Kuleshov
*/
public class PluginsComposite extends Composite{
+ private static final Logger log = LoggerFactory.getLogger(PluginsComposite.class);
protected static PomPackage POM_PACKAGE = PomPackage.eINSTANCE;
public static final String EXTENSION_CONFIGURATION_EDITOR = "org.eclipse.m2e.editor.plugins.configurationEditorContribution"; //$NON-NLS-1$
@@ -1336,7 +1338,7 @@ public class PluginsComposite extends Composite{
}
} catch(CoreException e) {
// TODO Auto-generated catch block
- MavenLogger.log("Error retrieving available versions for " + groupId + ':' + artifactId, e); //$NON-NLS-1$
+ log.error("Error retrieving available versions for " + groupId + ':' + artifactId, e); //$NON-NLS-1$
}
createPlugin(editor, provider, pomPackage, groupId, artifactId, version);
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ReportingComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ReportingComposite.java
index cd141751..6081cf01 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ReportingComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/ReportingComposite.java
@@ -41,8 +41,6 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.window.Window;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
import org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/RepositoriesComposite.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/RepositoriesComposite.java
index ea310147..736cf576 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/RepositoriesComposite.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/composites/RepositoriesComposite.java
@@ -12,9 +12,9 @@
package org.eclipse.m2e.editor.composites;
import static org.eclipse.m2e.editor.pom.FormUtils.isEmpty;
+import static org.eclipse.m2e.editor.pom.FormUtils.nvl;
import static org.eclipse.m2e.editor.pom.FormUtils.setButton;
import static org.eclipse.m2e.editor.pom.FormUtils.setText;
-import static org.eclipse.m2e.editor.pom.FormUtils.nvl;
import java.util.Collections;
import java.util.List;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/ManageDependenciesDialog.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/ManageDependenciesDialog.java
index 7b93be6f..aae3cab4 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/ManageDependenciesDialog.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/dialogs/ManageDependenciesDialog.java
@@ -43,7 +43,6 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.ui.internal.dialogs.AbstractMavenDialog;
import org.eclipse.m2e.editor.MavenEditorPlugin;
@@ -77,6 +76,8 @@ import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -86,6 +87,7 @@ import org.eclipse.ui.PlatformUI;
* @author rgould
*/
public class ManageDependenciesDialog extends AbstractMavenDialog {
+ private static final Logger log = LoggerFactory.getLogger(ManageDependenciesDialog.class);
protected static final String DIALOG_SETTINGS = ManageDependenciesDialog.class.getName();
@@ -389,7 +391,7 @@ public class ManageDependenciesDialog extends AbstractMavenDialog {
resource.load(Collections.EMPTY_MAP);
return resource.getModel();
} catch(Exception e) {
- MavenLogger.log("Can't load model " + facade.getPomFile().getPath(), e); //$NON-NLS-1$
+ log.error("Can't load model " + facade.getPomFile().getPath(), e); //$NON-NLS-1$
return null;
}
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/plugins/PluginExtensionDescriptor.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/plugins/PluginExtensionDescriptor.java
index 3520034b..e285675d 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/plugins/PluginExtensionDescriptor.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/plugins/PluginExtensionDescriptor.java
@@ -13,10 +13,13 @@ package org.eclipse.m2e.editor.plugins;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class PluginExtensionDescriptor {
+ private static final Logger log = LoggerFactory.getLogger(PluginExtensionDescriptor.class);
+
public static final String ARTIFACT_ID = "artifactId"; //$NON-NLS-1$
public static final String GROUP_ID = "groupId"; //$NON-NLS-1$
public static final String NAME = "name"; //$NON-NLS-1$
@@ -38,7 +41,7 @@ public class PluginExtensionDescriptor {
extension = (IPluginConfigurationExtension) o;
} catch(CoreException e) {
// TODO Auto-generated catch block
- MavenLogger.log(e);
+ log.error(e.getMessage(), e);
}
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/BuildPage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/BuildPage.java
index 30165b41..4b3cc219 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/BuildPage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/BuildPage.java
@@ -16,7 +16,6 @@ import static org.eclipse.m2e.editor.pom.FormUtils.setText;
import java.util.Collections;
import java.util.List;
-import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -37,8 +36,6 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.window.Window;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.embedder.ArtifactKey;
-import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
import org.eclipse.m2e.core.ui.internal.actions.OpenUrlAction;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java
index b9a2461c..79ad43a6 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java
@@ -51,7 +51,6 @@ import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.project.IMavenProjectChangedListener;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
@@ -87,6 +86,8 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.progress.UIJob;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonatype.aether.graph.DependencyNode;
import org.sonatype.aether.graph.DependencyVisitor;
@@ -96,6 +97,7 @@ import org.sonatype.aether.graph.DependencyVisitor;
* @author Benjamin Bentmann
*/
public class DependencyTreePage extends FormPage implements IMavenProjectChangedListener, IPomFileChangedListener {
+ private static final Logger log = LoggerFactory.getLogger(DependencyTreePage.class);
protected static final Object[] EMPTY = new Object[0];
@@ -199,7 +201,7 @@ public class DependencyTreePage extends FormPage implements IMavenProjectChanged
try {
mavenProject = pomEditor.readMavenProject(force, monitor);
if(mavenProject == null){
- MavenLogger.log("Unable to read maven project. Dependencies not updated.", null); //$NON-NLS-1$
+ log.error("Unable to read maven project. Dependencies not updated."); //$NON-NLS-1$
return Status.CANCEL_STATUS;
}
@@ -229,7 +231,7 @@ public class DependencyTreePage extends FormPage implements IMavenProjectChanged
}
});
} catch(final CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
getPartControl().getDisplay().asyncExec(new Runnable() {
public void run() {
FormUtils.setMessage(getManagedForm().getForm(), ex.getMessage(), IMessageProvider.ERROR);
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/FormUtils.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/FormUtils.java
index a4778044..b811f621 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/FormUtils.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/FormUtils.java
@@ -23,12 +23,10 @@ import org.codehaus.plexus.interpolation.PropertiesBasedValueSource;
import org.codehaus.plexus.interpolation.RegexBasedInterpolator;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.ui.internal.dialogs.MavenMessageDialog;
import org.eclipse.m2e.core.ui.internal.util.Util;
import org.eclipse.m2e.editor.internal.Messages;
import org.eclipse.m2e.editor.xml.internal.FormHoverProvider;
-import org.eclipse.m2e.editor.xml.internal.FormHoverProvider.Execute;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
@@ -52,12 +50,15 @@ import org.eclipse.ui.forms.widgets.Form;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author Eugene Kuleshov
*/
public abstract class FormUtils {
+ private static final Logger log = LoggerFactory.getLogger(FormUtils.class);
public static final int MAX_MSG_LENGTH = 80;
/**
@@ -162,9 +163,9 @@ public abstract class FormUtils {
| IWorkbenchBrowserSupport.LOCATION_BAR, url, url, url);
browser.openURL(new URL(url));
} catch(PartInitException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
} catch(MalformedURLException ex) {
- MavenLogger.log("Malformed url " + url, ex); //$NON-NLS-1$
+ log.error("Malformed url " + url, ex); //$NON-NLS-1$
}
}
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
index 59af1915..b8cdf170 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
@@ -74,7 +74,6 @@ import org.eclipse.jface.text.source.IOverviewRuler;
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.MavenModelManager;
import org.eclipse.m2e.core.project.IMavenProjectChangedListener;
@@ -82,9 +81,9 @@ import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
import org.eclipse.m2e.core.project.MavenProjectManager;
import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
-import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction.MavenPathStorageEditorInput;
import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction.MavenStorageEditorInput;
+import org.eclipse.m2e.core.ui.internal.actions.SelectionUtil;
import org.eclipse.m2e.core.ui.internal.util.Util;
import org.eclipse.m2e.core.ui.internal.util.Util.FileStoreEditorInputStub;
import org.eclipse.m2e.editor.MavenEditorImages;
@@ -128,6 +127,8 @@ import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.xml.core.internal.emf2xml.EMF2DOMSSEAdapter;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -140,6 +141,7 @@ import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
@SuppressWarnings("restriction")
public class MavenPomEditor extends FormEditor implements IResourceChangeListener, IShowEditorInput, IGotoMarker,
ISearchEditorAccess, IEditingDomainProvider, IMavenProjectChangedListener {
+ private static final Logger log = LoggerFactory.getLogger(MavenPomEditor.class);
private static final String POM_XML = "pom.xml";
@@ -259,7 +261,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
});
}
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
// Reload model if pom file was changed externally.
@@ -309,9 +311,9 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
// structuredModel.reload(pomFile.getContents());
reload();
// } catch(CoreException e) {
-// MavenLogger.log(e);
+// log.error(e.getMessage(), e);
// } catch(Exception e) {
-// MavenLogger.log("Error loading pom editor model.", e);
+// log.error("Error loading pom editor model.", e);
// }
}
});
@@ -334,7 +336,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
}
});
} catch (CoreException ex ) {
- MavenLogger.log("Error updating pom file markers.", ex); //$NON-NLS-1$
+ log.error("Error updating pom file markers.", ex); //$NON-NLS-1$
}
}
};
@@ -343,7 +345,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
ChangedResourceDeltaVisitor visitor = new ChangedResourceDeltaVisitor();
event.getDelta().accept(visitor);
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
@@ -358,7 +360,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
//fix for resetting the pom document after an external change
// sourcePage.getDocumentProvider().resetDocument(sourcePage.getEditorInput());
} catch(CoreException e) {
- MavenLogger.log(e);
+ log.error(e.getMessage(), e);
}
for(MavenPomEditorPage page : pages) {
page.reload();
@@ -499,7 +501,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
factory = (MavenPomEditorPageFactory) element.createExecutableExtension("class"); //$NON-NLS-1$
factory.addPages(this);
} catch(CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
}
@@ -548,7 +550,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
effectivePomSourcePage.setInput(editorInput);
effectivePomSourcePage.update();
}catch(IOException ie){
- MavenLogger.log(new Status(IStatus.ERROR, MavenEditorPlugin.PLUGIN_ID, -1, Messages.MavenPomEditor_error_failed_effective, ie));
+ log.error(Messages.MavenPomEditor_error_failed_effective, ie);
}
}
});
@@ -734,7 +736,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
try {
readProjectDocument();
} catch(CoreException e) {
- MavenLogger.log(e);
+ log.error(e.getMessage(), e);
}
// TODO activate xml source page if model is empty or have errors
@@ -751,7 +753,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
commandStack, new HashMap<Resource, Boolean>());
}
} catch(PartInitException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
}
}
@@ -769,7 +771,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
}
return addPage(page);
} catch(PartInitException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
return -1;
}
}
@@ -806,7 +808,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
IOUtil.copy(is, os);
projectDocument = loadModel(tempPomFile.getAbsolutePath());
} catch(IOException ex) {
- MavenLogger.log("Can't close stream", ex); //$NON-NLS-1$
+ log.error("Can't close stream", ex); //$NON-NLS-1$
} finally {
IOUtil.close(is);
IOUtil.close(os);
@@ -836,7 +838,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
return (Model)resource.getContents().get(0);
} catch(Exception ex) {
- MavenLogger.log("Can't load model " + path, ex); //$NON-NLS-1$
+ log.error("Can't load model " + path, ex); //$NON-NLS-1$
return null;
}
@@ -849,7 +851,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
//mkleint: I'm wondering if the force parameter on dependencyTree is also applicable to the pom project method.
MavenProject mavenProject = readMavenProject(force, monitor);
if(mavenProject == null){
- MavenLogger.log("Unable to read maven project. Dependencies not updated.", null); //$NON-NLS-1$
+ log.error("Unable to read maven project. Dependencies not updated."); //$NON-NLS-1$
return null;
}
@@ -1164,7 +1166,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
try {
pomFile.refreshLocal(IResource.DEPTH_INFINITE, null);
} catch(CoreException e) {
- MavenLogger.log(e);
+ log.error(e.getMessage(), e);
}
}
@@ -1214,7 +1216,7 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
//we're not interested in the result, just want to get the MP instance cached.
readMavenProject(true, monitor);
} catch(CoreException e) {
- MavenLogger.log("failed to load maven project for " + getEditorInput(), e);
+ log.error("failed to load maven project for " + getEditorInput(), e);
}
return Status.OK_STATUS;
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java
index 8546ce8e..6b0a5a59 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java
@@ -52,7 +52,6 @@ import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
-import org.eclipse.m2e.core.core.MavenLogger;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectManager;
import org.eclipse.m2e.core.ui.internal.actions.OpenPomAction;
@@ -82,6 +81,8 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormPage;
import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
@@ -91,6 +92,7 @@ import org.eclipse.ui.forms.widgets.ScrolledForm;
* @author Eugene Kuleshov
*/
public abstract class MavenPomEditorPage extends FormPage implements Adapter {
+ private static final Logger log = LoggerFactory.getLogger(MavenPomEditorPage.class);
// parent editor
protected final MavenPomEditor pomEditor;
@@ -198,7 +200,7 @@ public abstract class MavenPomEditorPage extends FormPage implements Adapter {
updateParentAction();
registerListeners();
} catch(Throwable e) {
- MavenLogger.log("Error loading data", e); //$NON-NLS-1$
+ log.error("Error loading data", e); //$NON-NLS-1$
} finally {
updatingModel = false;
}
@@ -284,7 +286,7 @@ public abstract class MavenPomEditorPage extends FormPage implements Adapter {
}
}
} catch(final CoreException ex) {
- MavenLogger.log(ex);
+ log.error(ex.getMessage(), ex);
final String msg = ex.getMessage();
setErrorMessageForMarkers(msg, msg, IMessageProvider.ERROR, new IMarker[0]);
}
@@ -379,7 +381,7 @@ public abstract class MavenPomEditorPage extends FormPage implements Adapter {
}
} catch(Exception ex) {
- MavenLogger.log("Can't update view", ex); //$NON-NLS-1$
+ log.error("Can't update view", ex); //$NON-NLS-1$
} finally {
updatingModel = false;
}
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java
index 9e31167f..f5fa16c7 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/OverviewPage.java
@@ -15,7 +15,6 @@ import static org.eclipse.m2e.editor.pom.FormUtils.isEmpty;
import static org.eclipse.m2e.editor.pom.FormUtils.nvl;
import static org.eclipse.m2e.editor.pom.FormUtils.setText;
-import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -49,7 +48,6 @@ import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.core.IMavenConstants;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.embedder.ProjectUpdater;
-import org.eclipse.m2e.core.index.IIndex;
import org.eclipse.m2e.core.index.IndexedArtifactFile;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.ui.internal.MavenImages;

Back to the top