mirror of https://github.com/apache/maven.git
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:
parent
c0a503396e
commit
61b7fe600d
|
@ -221,8 +221,6 @@ public class SiteMojo
|
||||||
List reports = filterReports( this.reports );
|
List reports = filterReports( this.reports );
|
||||||
|
|
||||||
Map categories = categorizeReports( reports );
|
Map categories = categorizeReports( reports );
|
||||||
|
|
||||||
Comparator reportComparator = new ReportComparator();
|
|
||||||
List projectInfos = (List) categories.get( MavenReport.CATEGORY_PROJECT_INFORMATION );
|
List projectInfos = (List) categories.get( MavenReport.CATEGORY_PROJECT_INFORMATION );
|
||||||
List projectReports = (List) categories.get( MavenReport.CATEGORY_PROJECT_REPORTS );
|
List projectReports = (List) categories.get( MavenReport.CATEGORY_PROJECT_REPORTS );
|
||||||
|
|
||||||
|
@ -236,9 +234,6 @@ public class SiteMojo
|
||||||
projectReports = Collections.EMPTY_LIST;
|
projectReports = Collections.EMPTY_LIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
Collections.sort( projectInfos, reportComparator );
|
|
||||||
Collections.sort( projectReports, reportComparator );
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
List localesList = initLocalesList();
|
List localesList = initLocalesList();
|
||||||
|
@ -251,6 +246,12 @@ public class SiteMojo
|
||||||
Locale defaultLocale = (Locale) localesList.get( 0 );
|
Locale defaultLocale = (Locale) localesList.get( 0 );
|
||||||
Locale.setDefault( defaultLocale );
|
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(); )
|
for ( Iterator iterator = localesList.iterator(); iterator.hasNext(); )
|
||||||
{
|
{
|
||||||
Locale locale = (Locale) iterator.next();
|
Locale locale = (Locale) iterator.next();
|
||||||
|
|
Loading…
Reference in New Issue