You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/11/20 19:25:21 UTC
[maven-site-plugin] branch MSITE-914 created (now a6f63f11)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch MSITE-914
in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git
at a6f63f11 [MSITE-914] SiteMojo never populates supportedLocales Velocity context property
This branch includes the following new commits:
new a6f63f11 [MSITE-914] SiteMojo never populates supportedLocales Velocity context property
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[maven-site-plugin] 01/01: [MSITE-914] SiteMojo never populates supportedLocales Velocity context property
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch MSITE-914
in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git
commit a6f63f115609668cbae275d3f34ba679578205c9
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat Nov 19 23:23:06 2022 +0100
[MSITE-914] SiteMojo never populates supportedLocales Velocity context property
This closes #111
---
src/main/java/org/apache/maven/plugins/site/render/SiteMojo.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/site/render/SiteMojo.java b/src/main/java/org/apache/maven/plugins/site/render/SiteMojo.java
index f4066d8b..ce2fce59 100644
--- a/src/main/java/org/apache/maven/plugins/site/render/SiteMojo.java
+++ b/src/main/java/org/apache/maven/plugins/site/render/SiteMojo.java
@@ -140,7 +140,7 @@ public class SiteMojo
getLog().info( buffer().strong( "Rendering localized site for " + locale.getDisplayName() + " ("
+ locale + ")" ).toString() );
}
- renderLocale( locale, reports );
+ renderLocale( locale, reports, localesList );
}
}
catch ( RendererException e )
@@ -158,10 +158,11 @@ public class SiteMojo
}
}
- private void renderLocale( Locale locale, List<MavenReportExecution> reports )
+ private void renderLocale( Locale locale, List<MavenReportExecution> reports, List<Locale> supportedLocales )
throws IOException, RendererException, MojoFailureException, MojoExecutionException
{
SiteRenderingContext context = createSiteRenderingContext( locale );
+ context.addSiteLocales( supportedLocales );
// MSITE-723 add generated site directory, in case some content has been put in pre-site phase
context.addSiteDirectory( generatedSiteDirectory );
@@ -216,7 +217,7 @@ public class SiteMojo
/**
* Render Doxia documents from the list given, but not reports.
- *
+ *
* @param documents a collection of documents containing both Doxia source files and reports
* @return the sublist of documents that are not Doxia source files
*/