[
https://issues.apache.org/jira/browse/MJAVADOC-581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Garret Wilson updated MJAVADOC-581:
---
Description:
This is a critical bug that breaks the build. I originally posted this [on
Stack Overflow|https://stackoverflow.com/q/53449049/421049] but got no response.
I'm using OpenJDK 11 on Windows 10. I have a very simple POM, for a single Java
file, that generates Javadocs. Here is an extract:
{code:xml}
UTF-8
11
11
org.apache.maven.plugins
maven-javadoc-plugin
3.0.1
jar
{code}
Strangely just running {{mvn clean package}} causes an error:
{noformat}
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar (default) on project
foobar: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - javadoc: error - cannot read Input length = 1
[ERROR]
[ERROR] Command line was: C:\bin\jdk-11\bin\javadoc.exe @options @packages
{noformat}
In {{target/apidocs}} there are only three files: {{javadoc.bat}}, {{options}},
and {{packages}}. The {{options}} file is the most interesting. It explicitly
says {{UTF-8}} everywhere, as it should. But look at these lines:
{noformat}
-sourcepath
C:/projects/li��o 1/src/main/java
{noformat}
This project is in {{C:\projects\lição 1}}. It appears that somewhere along the
chain Java or Maven or the Javadoc plugin didn't correctly convert the
directory name to UTF-8.
Sure enough; when I renamed the directories in Windows to remove non-ASCII
characters, {{mvn clean package}} worked just fine.
This would seem like a blatant bug; once Maven starts, everything should be
UTF-8 throughout.
One [answer on Stack Overflow|https://stackoverflow.com/a/53528778/421049]
gives you a hint of what's going wrong.
In any case, I consider this to be a huge bug related to fundamental
functioning. It absolutely must be fixed. Users can't suddenly see their build
broken if their directory name has a non-ASCII character in it.
was:
This is a critical bug that breaks the build. I originally posted this [on
Stack Overflow|https://stackoverflow.com/q/53449049/421049] but got no response.
I'm using OpenJDK 11 on Windows 10. I have a very simple POM, for a single Java
file, that generates Javadocs. Here is an extract:
{code:xml}
UTF-8
11
11
org.apache.maven.plugins
maven-javadoc-plugin
3.0.1
jar
{code}
Strangely just running {{mvn clean package}} causes an error:
{noformat}
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar (default) on project
foobar: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - javadoc: error - cannot read Input length = 1
[ERROR]
[ERROR] Command line was: C:\bin\jdk-11\bin\javadoc.exe @options @packages
{noformat}
In {{target/apidocs}} there are only three files: {{javadoc.bat}}, {{options}},
and {{packages}}. The {{options}} file is the most interesting. It explicitly
says {{UTF-8}} everywhere, as it should. But look at these lines:
{noformat}
-sourcepath
C:/projects/li��o 1/src/main/java
{noformat}
This project is in {{C:\projects\lição 1}}. It appears that somewhere along the
chain Java or Maven or the Javadoc plugin didn't correctly convert the
directory name to UTF-8.
Sure enough; when I renamed the directories in Windows to remove non-ASCII
characters, {{mvn clean package}} worked just fine.
This would seem like a blatant bug; once Maven starts, everything should be
UTF-8 throughout.
One [answer on Stack Overflow|https://stackoverflow.com/a/53528778/421049]
gives you a hint of what's going wrong.
In any case, I consider this to be a huge, core bug. It absolutely must be
fixed. Users can't suddenly see their build broken if their directory name has
a non-ASCII character in it.
> critical error with non-ASCII charcters in directory name: cannot read Input
> length = 1
> ---
>
> Key: MJAVADOC-581
> URL: https://issues.apache.org/jira/browse/MJAVADOC-581
> Project: Maven Javadoc Plugin
> Issue Type: Bug
> Components: javadoc
>Affects Versions: 3.0.1
>Reporter: Garret Wilson
>Priority: Critical
>
> This is a critical bug that breaks the build. I originally posted this [on
> Stack Overflow|https://stackoverflow.com/q/53449049/421049] but got no
> response.
> I'm using OpenJDK 11 on Windows 10. I have a very simple POM, for a single
> Java file, that generates Ja