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

Support Java 11 (rebased) #108

Merged
merged 2 commits into from
Mar 19, 2024
Merged

Conversation

abelsromero
Copy link
Member

@abelsromero abelsromero commented Mar 17, 2024

Merits for @chrisvest and the work in #96. The short version; I rebased the branch on the most recent branch, made sure tests work and did some exploratory testing .

On top of rebase, there are these changes:

  • Formatting
  • Removed --include/--exclude + @asciidoclet filter Added Asciidoc processing class filtering to allow for graceful migrations #91. The way it works now is that the contents always pass to the default Javadoc converter so this is not necessary to do progressive transitions.
  • Rename AsciidoctorRenderer to AsciidoctorConverter for follow recent Asciidoctor naming.
  • Removed support and stylesheets for Java < 11
  • Several fixes and reformats
  • Fixed locating templates in a Java module runtime (it was causing tests to fail)
  • Replace AsciidocletIntegrationTest (which I could not make to work in IntelliJ) with an end-to-end test using maven-invoker-plugin. As a downside, this cannot be debugged from IDE, but it's the most realistic real integration test I can think of (previous experiences have mixed results).

These is NOT include and is not in scope of the PR:

  • Bump AsciidoctorJ: the current integration will require changes but I'd rather do it in a separated PR. I have many notes and need to create several stories and a 2.0.0 milestone to organize the release.
  • Support for other than Java 11. I am concerned because I found the same limitations mentioned in the original PR Support for Java 11 #96 (comment), some APIs have changed but I hope we can work with a multi-release JAR.
  • Full Javadoc support. I saw some things are not working, for example, like generating a help file.
  • Several project clean-ups: delete Travis files, enable GH action CI, update POMs for new maven central release process, etc.
  • Fix license files and plugin.

@abelsromero abelsromero mentioned this pull request Mar 18, 2024
Also update Java dependency to Java 11, and update all Maven plugins to the latest version.
Also add a requirement that the Maven version must be at least 3.0.5 in order to support the latest plugins.

Modularise and get things compiling on Java 11.

The StandardAdapter was trashed in the process, though.

License headers are not javadocs.

First draft of getting the asciidoclet to run on the new Javadoc APIs under Java 11.

Many things are broken. This is currently more of an exploratory prototype, than it is working but incomplete code.
There are a lot of ugly hacks here, to work around the new restrictions of the javadoc APIs.

Tell Travis CI to use Java 11.

Bring back error reporting in AttributesLoader, and make sure to always close the attributes files we open.

Make the stylesheet tests pass.

Also update Stylesheets to use new Java APIs, and make sure that input and output streams are closed.

Insert asciidoctor rendering into more places.

Doclet option names begin with double-dashes.

Also make sure that the output directory of the integration test is empty before rendering new doclet output.

The old AsciidocletTest is not worth salvaging.

Reduce reliance on Guava for IO stuff.

Remove the remaining usages of Guava.

Improve the javadoc parsing. Particularly around javadoc tags. Also avoid re-rendering asciidoctor javadoc comments that have already been rendered.

Fix tests and remove debugging left overs.

Keep everything grouped under the `org.asciidctor.asciidoclet` group and package.

Fix the Maven javadoc plugin configuration, and a couple of other things, to almost make it possible for asciidoclet to render its own javadoc.

Resource copying, including copying over our own style sheets, now works again.

Make a `mvn javadoc:javadoc` build pass, by ignoring HTML5 doclint errors.

Overview, and other files, are now processed correctly as well.

Included in this is also a bunch of cleanup.
Particularly, many inner classes have been extracted.
Reported javadoc errors are now also _slightly_ closer to their cause in the code.

Add callouts to explain the new options in the Maven plugin example.
@abelsromero abelsromero force-pushed the java11-rebased branch 6 times, most recently from 895700d to 3262ae2 Compare March 19, 2024 20:55
Fix http refences for https

Add missing attributes test and fix attributes_long treatment

Add missing -include and -exclude options to Antora docs + review

some cleanup

Fix Javadoc generation + sdkmanrc

Refactor JavadocParser to use factory method for readability

* rename some render references

Update javadoc-usage references

Fix templates not being found in unit tests

Replace AsciidocletIntegrationTest (did not work in IntelliJ) by end-to-end test with maven-invoker-plugin

update .gitignore

Remove un-used overview from DocletOptions.java

Delete DocIterator

cleanup

docs
@abelsromero abelsromero merged commit 11da7a1 into asciidoctor:main Mar 19, 2024
1 check failed
@abelsromero abelsromero mentioned this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants