[ 
https://issues.apache.org/jira/browse/HADOOP-18751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gautham Banasandra updated HADOOP-18751:
----------------------------------------
    Description: 
The javadoc build phase fails with the following error -

{code}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:javadoc-no-fork 
(default-cli) on project hadoop-common: An error has occurred in Javadoc report 
generation: Unable to write 'options' temporary file for command execution: 
H:\hadoop-common-project\hadoop-common\target\site\H:\hadoop-common-project\hadoop-common\target\api\options
 (The filename, directory name, or volume label syntax is incorrect) -> [Help 1]
{code}

As called out by the error message the path 
*H:\hadoop-common-project\hadoop-common\target\site\H:\hadoop-common-project\hadoop-common\target\api\options*
 is invalid.

The culprit being - 
https://github.com/apache/hadoop/blob/e9740cb17aef157a615dc36ae08cd224ce1672f0/hadoop-project-dist/pom.xml#L109

{code}
<reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
<destDir>${project.build.directory}/api</destDir>
{code}

As per the [docs from 
maven-javadoc-plugin|https://maven.apache.org/plugins/maven-javadoc-plugin/examples/output-configuration.html],
 *destDir* attribute's value gets appended to that of *reportOutputDirectory*. 
This implies that *destDir* must be a relative path, although not called out in 
the documentation. Since this isn't the case here,
# In Linux, this yields an unintended path (albeit a valid one) and doesn't 
fail.
# In Windows, it yields an incorrect path and thus fails since there's a colon 
( : ) for the drive letter in the middle of the incorrectly concatenated path -
H:\hadoop-common-project\hadoop-common\target\site\H {color:red}*:*{color} 
\hadoop-common-project\hadoop-common\target\api\options

Thus, fixing this would fix the build failure on Windows and put the docs in 
the appropriate directory in Linux.

  was:
The javadoc build phase fails with the following error -

{code}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:javadoc-no-fork 
(default-cli) on project hadoop-common: An error has occurred in Javadoc report 
generation: Unable to write 'options' temporary file for command execution: 
H:\hadoop-common-project\hadoop-common\target\site\H:\hadoop-common-project\hadoop-common\target\api\options
 (The filename, directory name, or volume label syntax is incorrect) -> [Help 1]
{code}

As called out by the error message the path 
*H:\hadoop-common-project\hadoop-common\target\site\H:\hadoop-common-project\hadoop-common\target\api\options*
 is invalid.

The culprit being - 
https://github.com/apache/hadoop/blob/e9740cb17aef157a615dc36ae08cd224ce1672f0/hadoop-project-dist/pom.xml#L109

{code}
<reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
<destDir>${project.build.directory}/api</destDir>
{code}

As per the [docs from 
maven-javadoc-plugin|https://maven.apache.org/plugins/maven-javadoc-plugin/examples/output-configuration.html],
 *destDir* attribute's value gets appended to that of *reportOutputDirectory*. 
This implies that *destDir* must be a relative path, although not called out in 
the documentation. Since this isn't the case here,
# In Linux, this yields an unintended path (albeit a valid one) and doesn't 
fail.
# In Windows, it yields an incorrect path and thus fails since there's a colon 
( : ) for the drive letter in the middle -
H:\hadoop-common-project\hadoop-common\target\site\H {color:red}*:*{color} 
\hadoop-common-project\hadoop-common\target\api\options

Thus, fixing this would fix the build failure on Windows and put the docs in 
the appropriate directory in Linux.


> Fix incorrect output path in javadoc build phase
> ------------------------------------------------
>
>                 Key: HADOOP-18751
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18751
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 3.4.0
>         Environment: All
>            Reporter: Gautham Banasandra
>            Assignee: Gautham Banasandra
>            Priority: Critical
>
> The javadoc build phase fails with the following error -
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:javadoc-no-fork 
> (default-cli) on project hadoop-common: An error has occurred in Javadoc 
> report generation: Unable to write 'options' temporary file for command 
> execution: 
> H:\hadoop-common-project\hadoop-common\target\site\H:\hadoop-common-project\hadoop-common\target\api\options
>  (The filename, directory name, or volume label syntax is incorrect) -> [Help 
> 1]
> {code}
> As called out by the error message the path 
> *H:\hadoop-common-project\hadoop-common\target\site\H:\hadoop-common-project\hadoop-common\target\api\options*
>  is invalid.
> The culprit being - 
> https://github.com/apache/hadoop/blob/e9740cb17aef157a615dc36ae08cd224ce1672f0/hadoop-project-dist/pom.xml#L109
> {code}
> <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
> <destDir>${project.build.directory}/api</destDir>
> {code}
> As per the [docs from 
> maven-javadoc-plugin|https://maven.apache.org/plugins/maven-javadoc-plugin/examples/output-configuration.html],
>  *destDir* attribute's value gets appended to that of 
> *reportOutputDirectory*. This implies that *destDir* must be a relative path, 
> although not called out in the documentation. Since this isn't the case here,
> # In Linux, this yields an unintended path (albeit a valid one) and doesn't 
> fail.
> # In Windows, it yields an incorrect path and thus fails since there's a 
> colon ( : ) for the drive letter in the middle of the incorrectly 
> concatenated path -
> H:\hadoop-common-project\hadoop-common\target\site\H {color:red}*:*{color} 
> \hadoop-common-project\hadoop-common\target\api\options
> Thus, fixing this would fix the build failure on Windows and put the docs in 
> the appropriate directory in Linux.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to