File tree 1 file changed +16
-0
lines changed
src/main/java/org/apache/maven/plugins/javadoc
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1653,6 +1653,17 @@ public abstract class AbstractJavadocMojo extends AbstractMojo {
1653
1653
@ Parameter (defaultValue = "${project.build.outputTimestamp}" )
1654
1654
protected String outputTimestamp ;
1655
1655
1656
+ /**
1657
+ * Forces the Javadoc JVM locale to be {@link Locale#ROOT}. This will force the Javadoc output
1658
+ * on {@code stdout} and {@code stderr} to be in English only and the generated HTML content in
1659
+ * English as well. If you need the generated HTML content in another supported language use
1660
+ * {@link #locale}.
1661
+ *
1662
+ * @since 3.7.1
1663
+ */
1664
+ @ Parameter (property = "forceRootLocale" , defaultValue = "true" )
1665
+ private boolean forceRootLocale ;
1666
+
1656
1667
// ----------------------------------------------------------------------
1657
1668
// protected methods
1658
1669
// ----------------------------------------------------------------------
@@ -1937,6 +1948,11 @@ protected void executeReport(Locale unusedLocale) throws MavenReportException {
1937
1948
addMemoryArg (cmd , "-Xms" , this .minmemory );
1938
1949
addProxyArg (cmd );
1939
1950
1951
+ if (forceRootLocale ) {
1952
+ cmd .createArg ().setValue ("-J-Duser.language=" );
1953
+ cmd .createArg ().setValue ("-J-Duser.country=" );
1954
+ }
1955
+
1940
1956
if (additionalJOption != null && !additionalJOption .isEmpty ()) {
1941
1957
cmd .createArg ().setValue (additionalJOption );
1942
1958
}
You can’t perform that action at this time.
0 commit comments