You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by di...@apache.org on 2003/06/25 01:52:01 UTC
cvs commit: maven/src/java/org/apache/maven/plugin PluginCacheManager.java
dion 2003/06/24 16:52:01
Modified: src/java/org/apache/maven/plugin PluginCacheManager.java
Log:
Better error reporting for plugin xml issues.
This is a fix for MAVEN-496
Revision Changes Path
1.12 +11 -1 maven/src/java/org/apache/maven/plugin/PluginCacheManager.java
Index: PluginCacheManager.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginCacheManager.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- PluginCacheManager.java 4 May 2003 23:39:03 -0000 1.11
+++ PluginCacheManager.java 24 Jun 2003 23:52:00 -0000 1.12
@@ -70,6 +70,7 @@
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.maven.MavenSession;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
@@ -84,6 +85,9 @@
/** Log. */
private static final Log log =
LogFactory.getLog( PluginCacheManager.class );
+ /** Maven session log */
+ private static final Log sessionLog =
+ LogFactory.getLog(MavenSession.class);
/** Plug-in cache */
public static final String PLUGINS_CACHE = "plugins.cache";
@@ -356,9 +360,15 @@
InputSource is = new InputSource( new FileInputStream( getPluginScript() ) );
parser.parse( is, this );
}
+ catch (SAXParseException e)
+ {
+ sessionLog.error("An XML error occurred parsing the file '"
+ + getPluginScript().getAbsolutePath() + "' plugin", e);
+ }
catch ( Exception e )
{
- e.printStackTrace();
+ sessionLog.error("An unexpected error occurred parsing the file '"
+ + getPluginScript().getAbsolutePath() + "'", e);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org