File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
maven-plugin-report-plugin/src
main/java/org/apache/maven/plugin/plugin/report Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ under the License.
9191 <artifactId >maven-site-plugin</artifactId >
9292 <version >@sitePluginVersion@</version >
9393 <configuration >
94- <locales >en</locales >
94+ <locales >en,de,fr </locales >
9595 </configuration >
9696 </plugin >
9797 </plugins >
Original file line number Diff line number Diff line change @@ -28,3 +28,11 @@ assert !pluginInfo.text.contains('Disk Space')
2828// check JDK and Maven requirements
2929assert pluginInfo. text. contains(' 1.8' )
3030assert pluginInfo. text. contains(' 3.2.5' )
31+
32+ assert new File ( basedir, ' target/site/de/noop-mojo.html' ). isFile()
33+ assert new File ( basedir, ' target/site/de/report-mojo.html' ). isFile()
34+ assert new File ( basedir, ' target/site/de/plugin-info.html' ). isFile()
35+
36+ assert new File ( basedir, ' target/site/fr/noop-mojo.html' ). isFile()
37+ assert new File ( basedir, ' target/site/fr/report-mojo.html' ). isFile()
38+ assert new File ( basedir, ' target/site/fr/plugin-info.html' ). isFile()
Original file line number Diff line number Diff line change 3131import java .util .ResourceBundle ;
3232
3333import org .apache .maven .doxia .sink .Sink ;
34+ import org .apache .maven .doxia .tools .SiteTool ;
3435import org .apache .maven .model .Plugin ;
3536import org .apache .maven .model .Prerequisites ;
3637import org .apache .maven .plugin .descriptor .MojoDescriptor ;
@@ -76,8 +77,8 @@ public class PluginReport extends AbstractMavenReport {
7677 *
7778 * @since 3.7.0
7879 */
79- @ Parameter (defaultValue = "${project.build.directory}/generated-site/xdoc " )
80- private File outputDirectory ;
80+ @ Parameter (defaultValue = "${project.build.directory}/generated-site" )
81+ private File generatedSiteDirectory ;
8182
8283 /**
8384 * Set this to "true" to skip generating the report.
@@ -222,7 +223,12 @@ public String getOutputName() {
222223 private void generateMojosDocumentation (PluginDescriptor pluginDescriptor , Locale locale )
223224 throws MavenReportException {
224225 try {
225- File outputDir = outputDirectory ;
226+ File outputDir ;
227+ if (!locale .equals (SiteTool .DEFAULT_LOCALE )) {
228+ outputDir = new File (new File (generatedSiteDirectory , locale .toString ()), "xdoc" );
229+ } else {
230+ outputDir = new File (generatedSiteDirectory , "xdoc" );
231+ }
226232 outputDir .mkdirs ();
227233
228234 PluginXdocGenerator generator = new PluginXdocGenerator (
You can’t perform that action at this time.
0 commit comments