sitepark-schaeper commented on PR #206:
URL: 
https://github.com/apache/maven-javadoc-plugin/pull/206#issuecomment-1620308849

   > This needs a test.
   
   How would one go about testing this? Do we execute a test that executes the 
javadoc executable and check wether the output is english? There would also 
have to be a german/japanese/chinese environment to execute this test in as 
doing so in only an english environments seems redundant.
   
   > This might be a temporary workaround, but longer term I wonder if there's 
a non-command line way to invoke Javadoc these days.
   
   In Java 8 it should be as easy as:
   ```java
   javax.tools.ToolProvider.getSystemDocumentationTool().run(in, out, err, args)
   ```
   
   And in Java 9+:
   ```java
   java.util.spi.ToolProvider.getSystemDocumentationTool().run(in, out, err, 
args);
   ```
   
   But if we do that than we cannot influence the output locale anymore as it 
will always use `Locale.default()` (see 
[here](https://github.com/openjdk/jdk/blob/master/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java#L136))
 and therefore cannot parse it reliably.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to