MNG-1216: Move code part to sort projectInfos and projectReports with the default locale setted

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@326890 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vincent Siveton 2005-10-20 11:29:20 +00:00
parent c0a503396e
commit 61b7fe600d
1 changed files with 7 additions and 6 deletions

View File

@ -221,8 +221,6 @@ public class SiteMojo
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 @@ public class SiteMojo
projectReports = Collections.EMPTY_LIST;
}
Collections.sort( projectInfos, reportComparator );
Collections.sort( projectReports, reportComparator );
try
{
List localesList = initLocalesList();
@ -251,6 +246,12 @@ public class SiteMojo
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 @@ public class SiteMojo
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 )