maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r1054773 - in /maven/plugins/trunk/maven-changes-plugin/src/main: java/org/apache/maven/plugin/jira/ java/org/apache/maven/plugin/trac/ resources/
Date Mon, 03 Jan 2011 21:35:34 GMT
Author: dennisl
Date: Mon Jan  3 21:35:33 2011
New Revision: 1054773

URL: http://svn.apache.org/viewvc?rev=1054773&view=rev
Log:
o Refactoring: Use only one set of column identifiers. Rename resource bundle keys.

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/trac/TracMojo.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
    maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties
    maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_de.properties
    maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_fr.properties
    maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_sv.properties

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=1054773&r1=1054772&r2=1054773&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:35:33 2011
@@ -42,17 +42,21 @@ import org.apache.maven.settings.Setting
 public class JiraMojo
     extends AbstractChangesReport
 {
-    static final int COLUMN_KEY = 0;
-    static final int COLUMN_SUMMARY = 1;
-    static final int COLUMN_STATUS = 2;
-    static final int COLUMN_RESOLUTION = 3;
-    static final int COLUMN_ASSIGNEE = 4;
-    static final int COLUMN_REPORTER = 5;
-    static final int COLUMN_TYPE = 6;
-    static final int COLUMN_PRIORITY = 7;
-    static final int COLUMN_VERSION = 8;
-    static final int COLUMN_FIX_VERSION = 9;
-    static final int COLUMN_COMPONENT = 10;
+    //@todo Move to utility class
+    public static final int COLUMN_KEY = 0;
+    public static final int COLUMN_SUMMARY = 1;
+    public static final int COLUMN_STATUS = 2;
+    public static final int COLUMN_RESOLUTION = 3;
+    public static final int COLUMN_ASSIGNEE = 4;
+    public static final int COLUMN_REPORTER = 5;
+    public static final int COLUMN_TYPE = 6;
+    public static final int COLUMN_PRIORITY = 7;
+    public static final int COLUMN_VERSION = 8;
+    public static final int COLUMN_FIX_VERSION = 9;
+    public static final int COLUMN_COMPONENT = 10;
+    public static final int COLUMN_ID = 11;
+    public static final int COLUMN_CREATED = 12;
+    public static final int COLUMN_CHANGED = 13;
 
     /**
      * Valid JIRA columns.

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=1054773&r1=1054772&r2=1054773&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:35:33 2011
@@ -46,19 +46,6 @@ import org.apache.xmlrpc.XmlRpcException
 public class TracMojo
     extends AbstractChangesReport
 {
-    static final int COLUMN_ID = 0;
-    static final int COLUMN_TYPE = 1;
-    static final int COLUMN_SUMMARY = 2;
-    static final int COLUMN_STATUS = 3;
-    static final int COLUMN_RESOLUTION = 4;
-    static final int COLUMN_MILESTONE = 5;
-    static final int COLUMN_OWNER = 6;
-    static final int COLUMN_PRIORITY = 7;
-    static final int COLUMN_REPORTER = 8;
-    static final int COLUMN_COMPONENT = 9;
-    static final int COLUMN_CREATED = 10;
-    static final int COLUMN_CHANGED = 11;
-
     /**
      * Valid Trac columns.
      */
@@ -66,18 +53,18 @@ public class TracMojo
 
     static
     {
-        TRAC_COLUMNS.put( "id", new Integer( COLUMN_ID ) );
-        TRAC_COLUMNS.put( "type", new Integer( COLUMN_TYPE ) );
-        TRAC_COLUMNS.put( "summary", new Integer( COLUMN_SUMMARY ) );
-        TRAC_COLUMNS.put( "status", new Integer( COLUMN_STATUS ) );
-        TRAC_COLUMNS.put( "resolution", new Integer( COLUMN_RESOLUTION ) );
-        TRAC_COLUMNS.put( "milestone", new Integer( COLUMN_MILESTONE ) );
-        TRAC_COLUMNS.put( "owner", new Integer( COLUMN_OWNER ) );
-        TRAC_COLUMNS.put( "priority", new Integer( COLUMN_PRIORITY ) );
-        TRAC_COLUMNS.put( "reporter", new Integer( COLUMN_REPORTER ) );
-        TRAC_COLUMNS.put( "component", new Integer( COLUMN_COMPONENT ) );
-        TRAC_COLUMNS.put( "created", new Integer( COLUMN_CREATED ) );
-        TRAC_COLUMNS.put( "changed", new Integer( COLUMN_CHANGED ) );
+        TRAC_COLUMNS.put( "id", new Integer( JiraMojo.COLUMN_ID ) );
+        TRAC_COLUMNS.put( "type", new Integer( JiraMojo.COLUMN_TYPE ) );
+        TRAC_COLUMNS.put( "summary", new Integer( JiraMojo.COLUMN_SUMMARY ) );
+        TRAC_COLUMNS.put( "status", new Integer( JiraMojo.COLUMN_STATUS ) );
+        TRAC_COLUMNS.put( "resolution", new Integer( JiraMojo.COLUMN_RESOLUTION ) );
+        TRAC_COLUMNS.put( "milestone", new Integer( JiraMojo.COLUMN_FIX_VERSION ) );
+        TRAC_COLUMNS.put( "owner", new Integer( JiraMojo.COLUMN_ASSIGNEE ) );
+        TRAC_COLUMNS.put( "priority", new Integer( JiraMojo.COLUMN_PRIORITY ) );
+        TRAC_COLUMNS.put( "reporter", new Integer( JiraMojo.COLUMN_REPORTER ) );
+        TRAC_COLUMNS.put( "component", new Integer( JiraMojo.COLUMN_COMPONENT ) );
+        TRAC_COLUMNS.put( "created", new Integer( JiraMojo.COLUMN_CREATED ) );
+        TRAC_COLUMNS.put( "changed", new Integer( JiraMojo.COLUMN_CHANGED ) );
     }
 
     /**

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=1054773&r1=1054772&r2=1054773&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:35:33 2011
@@ -22,6 +22,7 @@ package org.apache.maven.plugin.trac;
 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.plugin.jira.JiraMojo;
 import org.apache.maven.reporting.MavenReportException;
 
 import java.text.SimpleDateFormat;
@@ -90,51 +91,51 @@ public class TracReportGenerator
         {
             switch ( columns[columnIndex] )
             {
-                case TracMojo.COLUMN_CHANGED:
+                case JiraMojo.COLUMN_CHANGED:
                     sinkHeader( sink, bundle.getString( "report.issues.label.changed" ) );
                     break;
 
-                case TracMojo.COLUMN_COMPONENT:
+                case JiraMojo.COLUMN_COMPONENT:
                     sinkHeader( sink, bundle.getString( "report.issues.label.component" )
);
                     break;
 
-                case TracMojo.COLUMN_CREATED:
+                case JiraMojo.COLUMN_CREATED:
                     sinkHeader( sink, bundle.getString( "report.issues.label.created" ) );
                     break;
 
-                case TracMojo.COLUMN_ID:
+                case JiraMojo.COLUMN_ID:
                     sinkHeader( sink, bundle.getString( "report.issues.label.id" ) );
                     break;
 
-                case TracMojo.COLUMN_MILESTONE:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.milestone" )
);
+                case JiraMojo.COLUMN_FIX_VERSION:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.fixVersion"
) );
                     break;
 
-                case TracMojo.COLUMN_OWNER:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.owner" ) );
+                case JiraMojo.COLUMN_ASSIGNEE:
+                    sinkHeader( sink, bundle.getString( "report.issues.label.by" ) );
                     break;
 
-                case TracMojo.COLUMN_PRIORITY:
+                case JiraMojo.COLUMN_PRIORITY:
                     sinkHeader( sink, bundle.getString( "report.issues.label.priority" )
);
                     break;
 
-                case TracMojo.COLUMN_REPORTER:
+                case JiraMojo.COLUMN_REPORTER:
                     sinkHeader( sink, bundle.getString( "report.issues.label.reporter" )
);
                     break;
 
-                case TracMojo.COLUMN_RESOLUTION:
+                case JiraMojo.COLUMN_RESOLUTION:
                     sinkHeader( sink, bundle.getString( "report.issues.label.resolution"
) );
                     break;
 
-                case TracMojo.COLUMN_STATUS:
+                case JiraMojo.COLUMN_STATUS:
                     sinkHeader( sink, bundle.getString( "report.issues.label.status" ) );
                     break;
 
-                case TracMojo.COLUMN_SUMMARY:
+                case JiraMojo.COLUMN_SUMMARY:
                     sinkHeader( sink, bundle.getString( "report.issues.label.summary" ) );
                     break;
 
-                case TracMojo.COLUMN_TYPE:
+                case JiraMojo.COLUMN_TYPE:
                     sinkHeader( sink, bundle.getString( "report.issues.label.type" ) );
                     break;
 
@@ -166,19 +167,19 @@ public class TracReportGenerator
             {
                 switch ( columns[columnIndex] )
                 {
-                    case TracMojo.COLUMN_CHANGED:
+                    case JiraMojo.COLUMN_CHANGED:
                         sinkCell( sink, sdf.format( issue.getUpdated() ) );
                         break;
 
-                    case TracMojo.COLUMN_COMPONENT:
+                    case JiraMojo.COLUMN_COMPONENT:
                         sinkCell( sink, IssuesReportGenerator.printValues( issue.getComponents()
) );
                         break;
 
-                    case TracMojo.COLUMN_CREATED:
+                    case JiraMojo.COLUMN_CREATED:
                         sinkCell( sink, sdf.format( issue.getCreated() ) );
                         break;
 
-                    case TracMojo.COLUMN_ID:
+                    case JiraMojo.COLUMN_ID:
                         sink.tableCell();
                         sink.link( issue.getLink() );
                         sink.text( issue.getId() );
@@ -186,35 +187,35 @@ public class TracReportGenerator
                         sink.tableCell_();
                         break;
 
-                    case TracMojo.COLUMN_MILESTONE:
+                    case JiraMojo.COLUMN_FIX_VERSION:
                         sinkCell( sink, IssuesReportGenerator.printValues( issue.getFixVersions()
) );
                         break;
 
-                    case TracMojo.COLUMN_OWNER:
+                    case JiraMojo.COLUMN_ASSIGNEE:
                         sinkCell( sink, issue.getAssignee() );
                         break;
 
-                    case TracMojo.COLUMN_PRIORITY:
+                    case JiraMojo.COLUMN_PRIORITY:
                         sinkCell( sink, issue.getPriority() );
                         break;
 
-                    case TracMojo.COLUMN_REPORTER:
+                    case JiraMojo.COLUMN_REPORTER:
                         sinkCell( sink, issue.getReporter() );
                         break;
 
-                    case TracMojo.COLUMN_RESOLUTION:
+                    case JiraMojo.COLUMN_RESOLUTION:
                         sinkCell( sink, issue.getResolution() );
                         break;
 
-                    case TracMojo.COLUMN_STATUS:
+                    case JiraMojo.COLUMN_STATUS:
                         sinkCell( sink, issue.getStatus() );
                         break;
 
-                    case TracMojo.COLUMN_SUMMARY:
+                    case JiraMojo.COLUMN_SUMMARY:
                         sinkCell( sink, issue.getSummary() );
                         break;
 
-                    case TracMojo.COLUMN_TYPE:
+                    case JiraMojo.COLUMN_TYPE:
                         sinkCell( sink, issue.getType() );
                         break;
 

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties?rev=1054773&r1=1054772&r2=1054773&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report.properties Mon
Jan  3 21:35:33 2011
@@ -26,8 +26,8 @@ report.issues.label.type=Type
 report.issues.label.summary=Summary
 report.issues.label.status=Status
 report.issues.label.resolution=Resolution
-report.issues.label.milestone=Milestone
-report.issues.label.owner=Owner
+report.issues.label.fixVersion=Milestone
+report.issues.label.by=Owner
 report.issues.label.priority=Priority
 report.issues.label.reporter=Reporter
 report.issues.label.component=Component

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_de.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_de.properties?rev=1054773&r1=1054772&r2=1054773&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_de.properties
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_de.properties
Mon Jan  3 21:35:33 2011
@@ -26,8 +26,8 @@ report.issues.label.type=Typ
 report.issues.label.summary=Zusammenfassung
 report.issues.label.status=Status
 report.issues.label.resolution=L\u00F6sung
-report.issues.label.milestone=Meilenstein
-report.issues.label.owner=Besitzer
+report.issues.label.fixVersion=Meilenstein
+report.issues.label.by=Besitzer
 report.issues.label.priority=Priorit\u00E4t
 report.issues.label.reporter=Reporter
 report.issues.label.component=Komponente

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_fr.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_fr.properties?rev=1054773&r1=1054772&r2=1054773&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_fr.properties
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_fr.properties
Mon Jan  3 21:35:33 2011
@@ -26,8 +26,8 @@ report.issues.label.type=Type
 report.issues.label.summary=Description
 report.issues.label.status=Statut
 report.issues.label.resolution=R\u00E9solution
-report.issues.label.milestone=milestone
-report.issues.label.owner=Propri\u00E9taire
+report.issues.label.fixVersion=milestone
+report.issues.label.by=Propri\u00E9taire
 report.issues.label.priority=Priorit\u00E9
 report.issues.label.reporter=Rapporteur
 report.issues.label.component=Composant

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_sv.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_sv.properties?rev=1054773&r1=1054772&r2=1054773&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_sv.properties
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/resources/trac-report_sv.properties
Mon Jan  3 21:35:33 2011
@@ -26,8 +26,8 @@ report.issues.label.type=Typ
 report.issues.label.summary=Summering
 report.issues.label.status=Status
 report.issues.label.resolution=L\u00f6sning
-report.issues.label.milestone=milstolpe
-report.issues.label.owner=\u00c4gare
+report.issues.label.fixVersion=milstolpe
+report.issues.label.by=\u00c4gare
 report.issues.label.priority=Prioritet
 report.issues.label.reporter=Rapport\u00f6r
 report.issues.label.component=Komponent



Mime
View raw message