maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r1054750 - in /maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin: jira/JiraMojo.java jira/JiraReportGenerator.java trac/TracMojo.java trac/TracReportGenerator.java
Date Mon, 03 Jan 2011 21:04:40 GMT
Author: dennisl
Date: Mon Jan  3 21:04:40 2011
New Revision: 1054750

URL: http://svn.apache.org/viewvc?rev=1054750&view=rev
Log:
o Refactoring: Make the two mojos and report generators more alike.

Modified:
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java?rev=1054750&r1=1054749&r2=1054750&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
Mon Jan  3 21:04:40 2011
@@ -314,7 +314,7 @@ public class JiraMojo
             }
             else
             {
-                report = new JiraReportGenerator();
+                report = new JiraReportGenerator( null );
 
                 report.doGenerateEmptyReport( getBundle( locale ), getSink() );
             }

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java?rev=1054750&r1=1054749&r2=1054750&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
Mon Jan  3 21:04:40 2011
@@ -40,11 +40,6 @@ public class JiraReportGenerator
      */
     private int[] columns;
 
-    public JiraReportGenerator()
-    {
-
-    }
-
     /**
      * @param includedColumns The id:s of the columns to include in the report
      */
@@ -73,7 +68,7 @@ public class JiraReportGenerator
 
         constructHeaderRow( sink, issueList, bundle );
 
-        constructDetailRows( sink, issueList );
+        constructDetailRows( sink, issueList, bundle );
 
         sinkEndReport( sink );
     }
@@ -146,7 +141,7 @@ public class JiraReportGenerator
         sink.tableRow_();
     }
 
-    private void constructDetailRows( Sink sink, List issueList )
+    private void constructDetailRows( Sink sink, List issueList, ResourceBundle bundle )
     {
         if ( issueList == null )
         {
@@ -212,7 +207,7 @@ public class JiraReportGenerator
                         break;
 
                     default:
-                        // Do not add a cell for this column
+                        // Do not add this column
                         break;
                 }
             }

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java?rev=1054750&r1=1054749&r2=1054750&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracMojo.java
Mon Jan  3 21:04:40 2011
@@ -30,7 +30,6 @@ import org.apache.maven.doxia.siterender
 import org.apache.maven.plugin.changes.AbstractChangesReport;
 import org.apache.maven.plugin.changes.ProjectUtils;
 import org.apache.maven.plugin.jira.JiraMojo;
-import org.apache.maven.plugin.jira.JiraReportGenerator;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.MavenReportException;
 import org.apache.xmlrpc.XmlRpcException;

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java?rev=1054750&r1=1054749&r2=1054750&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
Mon Jan  3 21:04:40 2011
@@ -19,15 +19,15 @@ package org.apache.maven.plugin.trac;
  * under the License.
  */
 
-import java.text.SimpleDateFormat;
-import java.util.List;
-import java.util.ResourceBundle;
-
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.plugin.issues.Issue;
 import org.apache.maven.plugin.issues.IssuesReportGenerator;
 import org.apache.maven.reporting.MavenReportException;
 
+import java.text.SimpleDateFormat;
+import java.util.List;
+import java.util.ResourceBundle;
+
 /**
  * Generates a Trac report.
  *
@@ -93,39 +93,51 @@ public class TracReportGenerator
                 case TracMojo.COLUMN_ID:
                     sinkHeader( sink, bundle.getString( "report.trac.label.id" ) );
                     break;
+
                 case TracMojo.COLUMN_TYPE:
                     sinkHeader( sink, bundle.getString( "report.trac.label.type" ) );
                     break;
+
                 case TracMojo.COLUMN_SUMMARY:
                     sinkHeader( sink, bundle.getString( "report.trac.label.summary" ) );
                     break;
+
                 case TracMojo.COLUMN_OWNER:
                     sinkHeader( sink, bundle.getString( "report.trac.label.owner" ) );
                     break;
+
                 case TracMojo.COLUMN_REPORTER:
                     sinkHeader( sink, bundle.getString( "report.trac.label.reporter" ) );
                     break;
+
                 case TracMojo.COLUMN_PRIORITY:
                     sinkHeader( sink, bundle.getString( "report.trac.label.priority" ) );
                     break;
+
                 case TracMojo.COLUMN_STATUS:
                     sinkHeader( sink, bundle.getString( "report.trac.label.status" ) );
                     break;
+
                 case TracMojo.COLUMN_RESOLUTION:
                     sinkHeader( sink, bundle.getString( "report.trac.label.resolution" )
);
                     break;
+
                 case TracMojo.COLUMN_CREATED:
                     sinkHeader( sink, bundle.getString( "report.trac.label.created" ) );
                     break;
+
                 case TracMojo.COLUMN_CHANGED:
                     sinkHeader( sink, bundle.getString( "report.trac.label.changed" ) );
                     break;
+
                 case TracMojo.COLUMN_MILESTONE:
                     sinkHeader( sink, bundle.getString( "report.trac.label.milestone" ) );
                     break;
+
                 case TracMojo.COLUMN_COMPONENT:
                     sinkHeader( sink, bundle.getString( "report.trac.label.component" ) );
                     break;
+
                 default:
                     // Do not add a header for this column
                     break;
@@ -161,41 +173,53 @@ public class TracReportGenerator
                         sink.link_();
                         sink.tableCell_();
                         break;
+
                     case TracMojo.COLUMN_TYPE:
                         sinkCell( sink, issue.getType() );
                         break;
+
                     case TracMojo.COLUMN_SUMMARY:
                         sinkCell( sink, issue.getSummary() );
                         break;
+
                     case TracMojo.COLUMN_OWNER:
                         sinkCell( sink, issue.getAssignee() );
                         break;
+
                     case TracMojo.COLUMN_REPORTER:
                         sinkCell( sink, issue.getReporter() );
                         break;
+
                     case TracMojo.COLUMN_PRIORITY:
                         sinkCell( sink, issue.getPriority() );
                         break;
+
                     case TracMojo.COLUMN_STATUS:
                         sinkCell( sink, issue.getStatus() );
                         break;
+
                     case TracMojo.COLUMN_RESOLUTION:
                         sinkCell( sink, issue.getResolution() );
                         break;
+
                     case TracMojo.COLUMN_CREATED:
                         sinkCell( sink, sdf.format( issue.getCreated() ) );
                         break;
+
                     case TracMojo.COLUMN_CHANGED:
                         sinkCell( sink, sdf.format( issue.getUpdated() ) );
                         break;
+
                     case TracMojo.COLUMN_MILESTONE:
                         sinkCell( sink, IssuesReportGenerator.printValues( issue.getFixVersions()
) );
                         break;
+
                     case TracMojo.COLUMN_COMPONENT:
                         sinkCell( sink, IssuesReportGenerator.printValues( issue.getComponents()
) );
                         break;
+
                     default:
-                        // Do not add details for this column
+                        // Do not add this column
                         break;
                 }
             }



Mime
View raw message