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

Don't use groovy to generate javadoc #26

Merged
merged 3 commits into from
Nov 14, 2023
Merged

Don't use groovy to generate javadoc #26

merged 3 commits into from
Nov 14, 2023

Conversation

jonenst
Copy link
Contributor

@jonenst jonenst commented Aug 31, 2023

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?
no

What kind of change does this PR introduce?
Feature

What is the current behavior?
uses groovy to generate a fake javadoc

What is the new behavior (if this is a feature change)?
uses javadoc to generate a javadoc talking about the native lib contents of this jar

Does this PR introduce a breaking change or deprecate an API?
NO

Other information:

This adds a package-info.class file to the generated jar but it shouldn't be a problem
This is because maven uses the jar as the input to the javadoc tool and we don't
want to diverge too much from the maven way (you get problems really fast)
(In theory, I guess we could generated the javadoc from target/classes instead of target/project.jar)

The generated javadoc has one package with one class because:
- It doesn't seem to be possible to generate an empty javadoc (no packages).
- It doesn't seem to be possible to generate an empty package (no classes).

references:
* https://stackoverflow.com/questions/53706943/how-to-upload-an-artifact-to-maven-central-with-an-empty-javadoc-jar-or-empty-s
 => what we did in 1.0.0 and 1.0.1: totally empty javadoc.jar (valid for maven central upload but ugly)
* https://stackoverflow.com/questions/59071851/how-to-force-a-javadoc-jar-even-though-there-is-no-public-javadoc
 => still produces a totally empty javadoc.jar (and big scary red errors)
* https://stackoverflow.com/questions/1138390/javadoc-for-package-info-java-only
 => This plus excluding the class from the jar seems like the best solution for now ?

promising but not yet ready:
* https://issues.apache.org/jira/browse/MJAVADOC-329
  https://github.com/apache/maven-javadoc-plugin/pull/65
* https://bugs.openjdk.org/browse/JDK-8193107
  https://hg.openjdk.org/jdk/jdk/rev/111104f1e033
  empty modules are allowed, but does becoming a module work with how the native library are loaded ??

This adds a package-info.class file to the generated jar but it shouldn't be a problem
This is because maven uses the jar as the input to the javadoc tool and we don't
want to diverge too much from the maven way (you get problems really fast)
(In theory, I guess we could generated the javadoc from target/classes instead of target/project.jar)

The generated javadoc has one package with one class because:
- It doesn't seem to be possible to generate an empty javadoc (no packages).
- It doesn't seem to be possible to generate an empty package (no classes).

references:
* https://stackoverflow.com/questions/53706943/how-to-upload-an-artifact-to-maven-central-with-an-empty-javadoc-jar-or-empty-s
 => what we did in 1.0.0 and 1.0.1: totally empty javadoc.jar (valid for maven central upload but ugly)
* https://stackoverflow.com/questions/59071851/how-to-force-a-javadoc-jar-even-though-there-is-no-public-javadoc
 => still produces a totally empty javadoc.jar (and big scary red errors)
* https://stackoverflow.com/questions/1138390/javadoc-for-package-info-java-only
 => This plus excluding the class from the jar seems like the best solution for now ?

promising but not yet ready:
* https://issues.apache.org/jira/browse/MJAVADOC-329
  apache/maven-javadoc-plugin#65
* https://bugs.openjdk.org/browse/JDK-8193107
  https://hg.openjdk.org/jdk/jdk/rev/111104f1e033
  empty modules are allowed, but does becoming a module work with how the native library are loaded ??

Signed-off-by: HARPER Jon <[email protected]>
@geofjamg geofjamg merged commit c6ccbbd into main Nov 14, 2023
5 checks passed
@geofjamg geofjamg deleted the nogroovy branch November 14, 2023 15:50
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