maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r326890 - /maven/components/trunk/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
Date Thu, 20 Oct 2005 11:29:23 GMT
Author: vsiveton
Date: Thu Oct 20 04:29:20 2005
New Revision: 326890

URL: http://svn.apache.org/viewcvs?rev=326890&view=rev
Log:
MNG-1216: Move code part to sort projectInfos and projectReports with the default locale setted

Modified:
    maven/components/trunk/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java

Modified: maven/components/trunk/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java?rev=326890&r1=326889&r2=326890&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
(original)
+++ maven/components/trunk/maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
Thu Oct 20 04:29:20 2005
@@ -221,8 +221,6 @@
         List reports = filterReports( this.reports );
 
         Map categories = categorizeReports( reports );
-
-        Comparator reportComparator = new ReportComparator();
         List projectInfos = (List) categories.get( MavenReport.CATEGORY_PROJECT_INFORMATION
);
         List projectReports = (List) categories.get( MavenReport.CATEGORY_PROJECT_REPORTS
);
 
@@ -236,9 +234,6 @@
             projectReports = Collections.EMPTY_LIST;
         }
 
-        Collections.sort( projectInfos, reportComparator );
-        Collections.sort( projectReports, reportComparator );
-
         try
         {
             List localesList = initLocalesList();
@@ -251,6 +246,12 @@
             Locale defaultLocale = (Locale) localesList.get( 0 );
             Locale.setDefault( defaultLocale );
 
+            // Sort projectInfos and projectReports with the default locale setted
+            // TODO Beautify the output by sorting with each current locale
+            Comparator reportComparator = new ReportComparator();
+            Collections.sort( projectInfos, reportComparator );
+            Collections.sort( projectReports, reportComparator );
+
             for ( Iterator iterator = localesList.iterator(); iterator.hasNext(); )
             {
                 Locale locale = (Locale) iterator.next();
@@ -411,7 +412,7 @@
                     filteredReports.add( report );
                 }
             }
-            // the canGenerateReport() has been added just before the 2.0 release and will
cause all the reporting 
+            // the canGenerateReport() has been added just before the 2.0 release and will
cause all the reporting
             // plugins with an earlier version to fail (most of the codehaus mojo now fails)
             // be nice with them, output a warning and don't let them break anything
             catch ( AbstractMethodError e )



Mime
View raw message