jetty.project icon indicating copy to clipboard operation
jetty.project copied to clipboard

Javadoc search returns broken links

Open cowwoc opened this issue 5 years ago • 16 comments

Repro steps:

  1. Open https://www.eclipse.org/jetty/javadoc/
  2. Click on "apidocs" for the latest version (9.4.19.v20190610 in my case)
  3. Search for anything (e.g. "servlet")
  4. Click on any search result
  5. You will be redirected to a broken link having a URL like this: https://www.eclipse.org/jetty/javadoc/9.4.19.v20190610/undefined/org/eclipse/jetty/proxy/AbstractProxyServlet.html

If you remove undefined from the URL the link works.

cowwoc avatar Aug 09 '19 03:08 cowwoc

This has been fixed with https://github.com/eclipse/jetty.project/pull/3780

olamy avatar Aug 09 '19 04:08 olamy

@olamy How could this have been fixed by a merge from June if the website is currently broken? Was the fix never applied to the website?

cowwoc avatar Aug 09 '19 04:08 cowwoc

Will be with next release

On Fri, 9 Aug 2019 at 2:52 pm, Gili Tzabari [email protected] wrote:

@olamy https://github.com/olamy How could this have been fixed by a merge from June if the website is currently broken? Was the fix never applied to the website?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eclipse/jetty.project/issues/3949?email_source=notifications&email_token=AAAE2EGHB37KGG2LB7PCT43QDTZ2DA5CNFSM4IKQH3U2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD35SX5I#issuecomment-519777269, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAE2ECTO44RGACPBIFDW2DQDTZ2DANCNFSM4IKQH3UQ .

-- Olivier

olamy avatar Aug 09 '19 04:08 olamy

Closing. @olamy reports it is fixed.

joakime avatar Aug 13 '19 21:08 joakime

@joakime @olamy I don't think this issue is fixed.

Repro steps:

  1. Go to https://www.eclipse.org/jetty/javadoc/jetty-11/
  2. Search for ServletHandler
  3. Click on first link
  4. Browser is redirected to https://www.eclipse.org/jetty/javadoc/jetty-11/undefined/org/eclipse/jetty/servlet/ServletHandler.html which returns HTTP 404 due to undefined in the URL

Any ideas?

cowwoc avatar May 28 '22 19:05 cowwoc

The api search results are definitely broken.

janbartel avatar Aug 01 '22 05:08 janbartel

uhm building locally from jetty-11.0.x doesn't have any issues. weird. I will check with @jmcc0nn3ll how is it deployed.

olamy avatar Aug 01 '22 10:08 olamy

Make sure you're using JDK12 or newer for generating the Javadoc: https://bugs.openjdk.org/browse/JDK-8215291

cowwoc avatar Aug 01 '22 15:08 cowwoc

The Jetty 9.4.x build/test/release/javadoc is built using Java 11. We cannot use a version newer than that for our build on Jetty 9.4.x without significant extra work.

The Jetty 10 and Jetty 11 build/test/release/javadoc uses Java 17

joakime avatar Aug 01 '22 16:08 joakime

@joakime You could use one of the workarounds mentioned at https://stackoverflow.com/q/52326318/14731 or you could run just the javadoc goal using a different JDK version: https://github.com/google/guava/issues/5457#issuecomment-949599757

Either approach should work.

cowwoc avatar Aug 01 '22 16:08 cowwoc

The "significant work" part of that statement has to do with updating the javadoc across the whole project to satisfy the stricter rules in Java 17's javadoc tooling.

The way javadoc builds on Jetty 9.x is via the maven plugin javadoc:aggregate which makes building javadoc with a different JDK very difficult. In Jetty 10+ it's a standalone maven module/project, and can easily be a different JDK.

joakime avatar Aug 01 '22 16:08 joakime

@joakime In that case, I suggest using https://stackoverflow.com/a/52603413/14731 for Jetty 9- and changing the JDK used by Jetty 10+'s javadoc goal.

cowwoc avatar Aug 01 '22 16:08 cowwoc

The reworking of Jetty 9 to use the techniques in Jetty 10 is significant (as stated several times now), and out of scope for a end of community support version of Jetty. The linked stackoverflow suggestion of disabling module directories is odd, as Jetty 9 has no module directories, that was introduced in Jetty 10+. The other stackoverflow suggestion of adding a javascript snippet won't work on places like javadoc.io, and also breaks the <artifact>-javadoc.jar instance behavior as well, that's also a non-starter.

joakime avatar Aug 01 '22 16:08 joakime

@joakime The description of https://bugs.openjdk.org/browse/JDK-8215291 explains that this bug occurs when generating Javadoc for projects that have no module directories (the case you described for Jetty 9).

Try --no-module-directories for Jetty 9. It should work.

cowwoc avatar Aug 01 '22 18:08 cowwoc

Sorry I should clarify. I am under the impression that you're asking for a fix for Jetty 9. If you are instead saying that you don't plan to update Jetty 9 (because it no longer has community support) then we can focus on getting Jetty 10+ working.

cowwoc avatar Aug 01 '22 18:08 cowwoc

This is the process we currently use to update the website for releases, the javadoc portion is a bit busted at the moment and we haven't taken the time to sort it out again, javadoc is hopelessly fragile these days.

https://git.eclipse.org/c/www.eclipse.org/jetty.git/tree/_update_for_releases.sh

jmcc0nn3ll avatar Aug 01 '22 19:08 jmcc0nn3ll

fixed

olamy avatar Apr 17 '23 02:04 olamy