maven-javadoc-plugin icon indicating copy to clipboard operation
maven-javadoc-plugin copied to clipboard

[MJAVADOC-755] plexus --> maven-shared-utils

Open elharo opened this issue 2 years ago • 6 comments

elharo avatar Jul 07 '23 11:07 elharo

Error:  Failures: 
Error:    JavadocReportTest.testProxy:943 
Expecting actual:
  " C:\hostedtoolcache\windows\Java_Liberica_jdk\8.0.372-7\x64\jre\..\bin\javadoc.exe -J-Dhttp.proxyHost=127.0.0.1 -J-Dhttp.proxyPort=80 -J-Dhttps.proxyHost=127.0.0.1 -J-Dhttps.proxyPort=80 "-J-Dhttp.nonProxyHosts=\"www.google.com^|*.somewhere.com\"" @options @packages"
to contain:
  " -J-Dhttp.nonProxyHosts="www.google.com^|*.somewhere.com" " 
[INFO] 

elharo avatar Jul 07 '23 11:07 elharo

Need to verify but looks like a double quote backslash escaping issue on Windows

Expecting actual:
  " C:\hostedtoolcache\windows\Java_Zulu_jdk\8.0.382-5\x64\jre\..\bin\javadoc.exe -J-Dhttp.proxyHost=127.0.0.1 -J-Dhttp.proxyPort=80 -J-Dhttps.proxyHost=127.0.0.1 -J-Dhttps.proxyPort=80 "-J-Dhttp.nonProxyHosts=\"www.google.com^|*.somewhere.com\"" @options @packages"
to contain:
  " -J-Dhttp.nonProxyHosts="www.google.com^|*.somewhere.com"" 

elharo avatar Sep 24 '23 17:09 elharo

I assume there's a reason for this escaping on windows. Might be a problem in maven-shared-utils

elharo avatar Sep 24 '23 18:09 elharo

I assume there's a reason for this escaping on windows. Might be a problem in maven-shared-utils

It is a mess in both. The stupid cli class uses cmd.exe which is totally unnecessary and Windows additionally needs escaping because of pipe. At some point I have given up until the CLI class uses ProcessBuilder directly.

michael-o avatar Sep 24 '23 18:09 michael-o

Ultimately we shouldn't invoke it through the CLI at all, but the way to not do that is completely different between Java 8 and Java 9+.

https://issues.apache.org/jira/browse/MJAVADOC-756

elharo avatar Sep 24 '23 19:09 elharo

I might be wrong about the differences between Java 8 and Java 9+. There are differences but it looks like the ToolProvider API might call the right methods on whichever platform it's running on.

https://issues.apache.org/jira/browse/MJAVADOC-732

elharo avatar Nov 28 '23 12:11 elharo