maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Schöning (JIRA) <>
Subject [jira] [Commented] (MJAVADOC-469) javadoc-plugin does not double backslashes in argument file
Date Wed, 06 Sep 2017 18:28:02 GMT


Thorsten Schöning commented on MJAVADOC-469:

Here's a possible workaround for others having the same problem. It's basically doubling the
available backslashes on it's own before forwarding the path as a command line arg. This needs
to be done before the path is used by the Maven plugin and written to the argument file, afterwards
it's too late. After Javadoc parsed the paths one can't reconstruct the path anymore because
the single backslashes just disappear if they have no special meaning in front of character.
While "\t" becomes a tab, "\U" just becomes "U" for Javadoc.

	<!-- -->
					<additionalparam>-out "${javadoc-compat-out-dir}/resource-info.dat"</additionalparam>

> javadoc-plugin does not double backslashes in argument file
> -----------------------------------------------------------
>                 Key: MJAVADOC-469
>                 URL:
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>          Components: javadoc
>    Affects Versions: 2.10.4
>            Reporter: Ilya Basin
> On Windows `generate-rest-docs` goal of `maven-jira-plugin` calls `maven-javadoc-plugin`
>     {code}additionalparam: -output "C:\path\to\target\classes\resourcedoc.xml"{code}
> If this argument was passed to `javadoc.exe` directly, I'm pretty sure this would work.
However, the javadoc plugin generates an argument file[1] named "options" and executes:
>     {code}javadoc.exe ... @options{code}
> The file contains all arguments with unescaped backslashes, although javadoc command
documentation[2] suggests:
> {quote}If a filename contains embedded spaces, put the whole filename in double quotes,
and double each backslash ("My Files\\"){quote}
> javadoc plugin version "2.4" is hardcoded in jira plugin, but I see no related changes
in "2.10.4" in AbstractJavadocMojo.addCommandLineOptions() .
>   [1]:
>   [2]:

This message was sent by Atlassian JIRA

View raw message