This is an automated email from the ASF dual-hosted git repository. schultz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push: new b770297e6c Work around javadoc bug to provide locale in two separate ways b770297e6c is described below commit b770297e6cd96220e253079aee26fa2ff5b85aeb Author: Christopher Schultz <ch...@christopherschultz.net> AuthorDate: Wed Feb 12 08:20:44 2025 -0500 Work around javadoc bug to provide locale in two separate ways --- build.xml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/build.xml b/build.xml index 36e513d546..eaa9edcda1 100644 --- a/build.xml +++ b/build.xml @@ -2243,6 +2243,33 @@ <target name="javadoc" depends="dist-source,download-compile" description="Create the Tomcat javadoc" > + <!-- Due to https://bugs.openjdk.org/browse/JDK-8222793 + we will need to provide the locale to the javadoc + command in two ways: via "locale" attribute + (which becomes "-locale [locale]" on the command-line) + and also via "<arg>-Juser.language</arg>" and one for country. + + In order to simplify things for users, we will pick-apart the + javadoc.locale property into its separate components, here. + --> + <loadresource property="javadoc.language"> + <concat>${javadoc.locale}</concat> + <filterchain> + <replaceregex pattern="_.*" replace="" /> + </filterchain> + </loadresource> + <loadresource property="javadoc.country"> + <concat>${javadoc.locale}</concat> + <filterchain> + <replaceregex pattern="[^_]*" replace="" /> + <replaceregex pattern="^\$.*" replace="" /> + </filterchain> + </loadresource> + + <!-- Establish some defaults in case the above didn't work or resulted in empty properties --> + <property name="javadoc.language" value="en" /> + <property name="javadoc.country" value="" /> + <javadoc packagenames="jakarta.annotation.*" sourcepath="${tomcat.dist}/src/java" destdir="${tomcat.dist}/webapps/docs/annotationapi" @@ -2263,6 +2290,8 @@ maxmemory="512m" failonerror="${javadoc.failonerror}" failonwarning="${javadoc.failonwarning}"> + <arg value="-J-Duser.language=${javadoc.language}" /> + <arg value="-J-Duser.country=${javadoc.country}" /> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -2289,6 +2318,8 @@ maxmemory="512m" failonerror="${javadoc.failonerror}" failonwarning="${javadoc.failonwarning}"> + <arg value="-J-Duser.language=${javadoc.language}" /> + <arg value="-J-Duser.country=${javadoc.country}" /> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -2314,6 +2345,8 @@ maxmemory="512m" failonerror="${javadoc.failonerror}" failonwarning="${javadoc.failonwarning}"> + <arg value="-J-Duser.language=${javadoc.language}" /> + <arg value="-J-Duser.country=${javadoc.country}" /> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -2339,6 +2372,8 @@ maxmemory="512m" failonerror="${javadoc.failonerror}" failonwarning="${javadoc.failonwarning}"> + <arg value="-J-Duser.language=${javadoc.language}" /> + <arg value="-J-Duser.country=${javadoc.country}" /> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -2364,6 +2399,8 @@ maxmemory="512m" failonerror="${javadoc.failonerror}" failonwarning="${javadoc.failonwarning}"> + <arg value="-J-Duser.language=${javadoc.language}" /> + <arg value="-J-Duser.country=${javadoc.country}" /> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -2388,6 +2425,8 @@ maxmemory="512m" failonerror="${javadoc.failonerror}" failonwarning="${javadoc.failonwarning}"> + <arg value="-J-Duser.language=${javadoc.language}" /> + <arg value="-J-Duser.country=${javadoc.country}" /> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> @@ -2412,6 +2451,8 @@ maxmemory="512m" failonerror="${javadoc.failonerror}" failonwarning="${javadoc.failonwarning}"> + <arg value="-J-Duser.language=${javadoc.language}" /> + <arg value="-J-Duser.country=${javadoc.country}" /> <classpath> <path refid="compile.classpath"/> <path location="${ant.core.lib}"/> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org