File tree 3 files changed +18
-4
lines changed
maven-plugin-report-plugin/src
main/java/org/apache/maven/plugin/plugin/report
3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ under the License.
91
91
<artifactId >maven-site-plugin</artifactId >
92
92
<version >@sitePluginVersion@</version >
93
93
<configuration >
94
- <locales >en</locales >
94
+ <locales >en,de,fr </locales >
95
95
</configuration >
96
96
</plugin >
97
97
</plugins >
Original file line number Diff line number Diff line change @@ -28,3 +28,11 @@ assert !pluginInfo.text.contains('Disk Space')
28
28
// check JDK and Maven requirements
29
29
assert pluginInfo. text. contains(' 1.8' )
30
30
assert 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 31
31
import java .util .ResourceBundle ;
32
32
33
33
import org .apache .maven .doxia .sink .Sink ;
34
+ import org .apache .maven .doxia .tools .SiteTool ;
34
35
import org .apache .maven .model .Plugin ;
35
36
import org .apache .maven .model .Prerequisites ;
36
37
import org .apache .maven .plugin .descriptor .MojoDescriptor ;
@@ -76,8 +77,8 @@ public class PluginReport extends AbstractMavenReport {
76
77
*
77
78
* @since 3.7.0
78
79
*/
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 ;
81
82
82
83
/**
83
84
* Set this to "true" to skip generating the report.
@@ -222,7 +223,12 @@ public String getOutputName() {
222
223
private void generateMojosDocumentation (PluginDescriptor pluginDescriptor , Locale locale )
223
224
throws MavenReportException {
224
225
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
+ }
226
232
outputDir .mkdirs ();
227
233
228
234
PluginXdocGenerator generator = new PluginXdocGenerator (
You can’t perform that action at this time.
0 commit comments