Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvladt2011-02-10 18:06:15 -0500
committervladt2011-02-10 18:06:15 -0500
commitd8a4a3e181fe1b241d7e7785312a5e2c4a8bbce5 (patch)
tree8dae073380652d49577e6ac914930a5c2de3fc96 /org.eclipse.m2e.editor.xml
parenta1639bf8aa6a6a8ba1575b1a4d183e6815128f6b (diff)
downloadm2e-core-d8a4a3e181fe1b241d7e7785312a5e2c4a8bbce5.tar.gz
m2e-core-d8a4a3e181fe1b241d7e7785312a5e2c4a8bbce5.tar.xz
m2e-core-d8a4a3e181fe1b241d7e7785312a5e2c4a8bbce5.zip
335872: Replaced direct calls to maven console logMessage/logError with slf4j log calls
Diffstat (limited to 'org.eclipse.m2e.editor.xml')
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomTemplateContextUtil.java15
1 files changed, 4 insertions, 11 deletions
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 e1cd677d..384b7b17 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
@@ -33,7 +33,6 @@ 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.embedder.IMaven;
class PomTemplateContextUtil {
@@ -51,7 +50,6 @@ class PomTemplateContextUtil {
}
MavenPlugin plugin = MavenPlugin.getDefault();
- MavenConsole console = plugin.getConsole();
try {
IMaven embedder = MavenPlugin.getDefault().getMaven();
@@ -62,7 +60,7 @@ class PomTemplateContextUtil {
File file = artifact.getFile();
if(file == null) {
String msg = "Can't resolve plugin " + name; //$NON-NLS-1$
- console.logError(msg);
+ log.error(msg);
} else {
InputStream is = null;
ZipFile zf = null;
@@ -76,12 +74,9 @@ class PomTemplateContextUtil {
descriptors.put(name, descriptor);
return descriptor;
}
-
} catch(Exception ex) {
String msg = "Can't read configuration for " + name; //$NON-NLS-1$
- console.logError(msg);
log.error(msg, ex);
-
} finally {
IOUtil.close(is);
try {
@@ -94,14 +89,12 @@ class PomTemplateContextUtil {
} catch(CoreException ex) {
IStatus status = ex.getStatus();
+ String msg = status.getMessage();
if(status.getException() != null) {
- console.logError(status.getMessage() + "; " + status.getException().getMessage());
- } else {
- console.logError(status.getMessage());
+ msg += "; " + status.getException().getMessage();
}
- log.error(ex.getMessage(), ex);
+ log.error(msg, ex);
}
return null;
}
-
}

Back to the top