Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javadoc search returns broken links #3949

Closed
cowwoc opened this issue Aug 9, 2019 · 17 comments
Closed

Javadoc search returns broken links #3949

cowwoc opened this issue Aug 9, 2019 · 17 comments
Assignees
Labels

Comments

@cowwoc
Copy link
Contributor

cowwoc commented Aug 9, 2019

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.

@olamy
Copy link
Member

olamy commented Aug 9, 2019

This has been fixed with #3780

@olamy olamy added the Build label Aug 9, 2019
@cowwoc
Copy link
Contributor Author

cowwoc commented Aug 9, 2019

@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?

@olamy
Copy link
Member

olamy commented Aug 9, 2019 via email

@joakime
Copy link
Contributor

joakime commented Aug 13, 2019

Closing. @olamy reports it is fixed.

@joakime joakime closed this as completed Aug 13, 2019
@cowwoc
Copy link
Contributor Author

cowwoc commented May 28, 2022

@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?

@janbartel
Copy link
Contributor

The api search results are definitely broken.

@olamy
Copy link
Member

olamy commented Aug 1, 2022

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

@cowwoc
Copy link
Contributor Author

cowwoc commented Aug 1, 2022

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

@joakime
Copy link
Contributor

joakime commented Aug 1, 2022

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

@cowwoc
Copy link
Contributor Author

cowwoc commented Aug 1, 2022

@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: google/guava#5457 (comment)

Either approach should work.

@joakime
Copy link
Contributor

joakime commented Aug 1, 2022

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.

@cowwoc
Copy link
Contributor Author

cowwoc commented Aug 1, 2022

@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.

@joakime
Copy link
Contributor

joakime commented Aug 1, 2022

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.

@cowwoc
Copy link
Contributor Author

cowwoc commented Aug 1, 2022

@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
Copy link
Contributor Author

cowwoc commented Aug 1, 2022

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.

@jmcc0nn3ll
Copy link
Contributor

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

@olamy
Copy link
Member

olamy commented Apr 17, 2023

fixed

@olamy olamy closed this as completed Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants