svn commit: r422265 - in /maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven: announcement/AnnouncementMojo.java changes/ChangesMojo.java changes/ChangesReportGenerator.java changes/ChangesXML.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r422265 - in /maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven: announcement/AnnouncementMojo.java changes/ChangesMojo.java changes/ChangesReportGenerator.java changes/ChangesXML.java

Dennis Lundberg-2
Author: dennisl
Date: Sat Jul 15 09:49:50 2006
New Revision: 422265

URL: http://svn.apache.org/viewvc?rev=422265&view=rev
Log:
[MCHANGES-34] e.printStackTrace() instead of log on xml parsing error

Modified:
    maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/announcement/AnnouncementMojo.java
    maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesMojo.java
    maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesReportGenerator.java
    maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesXML.java

Modified: maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/announcement/AnnouncementMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/announcement/AnnouncementMojo.java?rev=422265&r1=422264&r2=422265&view=diff
==============================================================================
--- maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/announcement/AnnouncementMojo.java (original)
+++ maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/announcement/AnnouncementMojo.java Sat Jul 15 09:49:50 2006
@@ -225,7 +225,7 @@
     {
         if( !generateJiraAnnouncement )
         {
-            setXml( new ChangesXML( getXmlPath() ) );
+            setXml( new ChangesXML( getXmlPath(), getLog() ) );
 
             doGenerate( getXml() );
         }

Modified: maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesMojo.java
URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesMojo.java?rev=422265&r1=422264&r2=422265&view=diff
==============================================================================
--- maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesMojo.java (original)
+++ maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesMojo.java Sat Jul 15 09:49:50 2006
@@ -117,7 +117,7 @@
     public void executeReport( Locale locale )
         throws MavenReportException
     {
-        ChangesReportGenerator report = new ChangesReportGenerator( xmlPath );
+        ChangesReportGenerator report = new ChangesReportGenerator( xmlPath, getLog() );
 
         if ( ( url == null ) || ( url.trim().equals( "" ) ) )
         {

Modified: maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesReportGenerator.java?rev=422265&r1=422264&r2=422265&view=diff
==============================================================================
--- maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesReportGenerator.java (original)
+++ maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesReportGenerator.java Sat Jul 15 09:49:50 2006
@@ -20,6 +20,7 @@
 import java.util.ResourceBundle;
 
 import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.reporting.MavenReportException;
 
 public class ChangesReportGenerator
@@ -34,9 +35,9 @@
     {
     }
 
-    public ChangesReportGenerator( String xmlPath )
+    public ChangesReportGenerator( String xmlPath, Log log )
     {
-        report = new ChangesXML( xmlPath );
+        report = new ChangesXML( xmlPath, log );
     }
 
     public void setIssueLink( String issueLink )

Modified: maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesXML.java
URL: http://svn.apache.org/viewvc/maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesXML.java?rev=422265&r1=422264&r2=422265&view=diff
==============================================================================
--- maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesXML.java (original)
+++ maven/sandbox/plugins/maven-changes-plugin/src/main/java/org/apache/maven/changes/ChangesXML.java Sat Jul 15 09:49:50 2006
@@ -1,7 +1,7 @@
 package org.apache.maven.changes;
 
 /*
- * Copyright 2001-2005 The Codehaus.
+ * Copyright 2001-2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 
+import org.apache.maven.plugin.logging.Log;
 import org.xml.sax.*;
 import org.xml.sax.helpers.DefaultHandler;
 
@@ -47,7 +48,7 @@
 
     private String title;
 
-    public ChangesXML( String xmlPath )
+    public ChangesXML( String xmlPath, Log log )
     {
         SAXParserFactory factory = SAXParserFactory.newInstance();
 
@@ -59,7 +60,7 @@
         }
         catch ( Throwable t )
         {
-            t.printStackTrace();
+            log.error( "An error occured when parsing the changes.xml file:", t );
         }
     }