Skip to content

Update maven-javadoc-plugin for Java 11 support#5361

Merged
wing328 merged 6 commits intoOpenAPITools:masterfrom
kibertoad:fix/java-11
Feb 19, 2020
Merged

Update maven-javadoc-plugin for Java 11 support#5361
wing328 merged 6 commits intoOpenAPITools:masterfrom
kibertoad:fix/java-11

Conversation

@kibertoad
Copy link
Contributor

Resolves An error has occurred in Javadoc report generation: [ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module error that happens when using Java 11

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee: @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @bkabrda (2020/01)

… Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module` error that happens when using Java 11
@wing328
Copy link
Member

wing328 commented Feb 18, 2020

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

@wing328
Copy link
Member

wing328 commented Feb 18, 2020

Please have a look at the CircleCI errors when you've time: https://circleci.com/gh/OpenAPITools/openapi-generator/12780

… Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module` error that happens when using Java 11
@kibertoad
Copy link
Contributor Author

@wing328 Thank you so much! Fixed both.

# Conflicts:
#	modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache
#	modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache
#	samples/client/petstore/java/jersey2-java6/pom.xml
#	samples/client/petstore/java/jersey2-java8/pom.xml
#	samples/client/petstore/java/jersey2/pom.xml
@wing328
Copy link
Member

wing328 commented Feb 19, 2020

--- a/samples/client/petstore/java/rest-assured/pom.xml
+++ b/samples/client/petstore/java/rest-assured/pom.xml
@@ -144,7 +144,7 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <version>3.1.1</version>
-                <configuration>
+                <configuration>s
                     <doclint>none</doclint>
                 </configuration>
                 <executions>
Perform git status
On branch pull/5361
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   samples/client/petstore/java/rest-assured/pom.xml

no changes added to commit (use "git add" and/or "git commit -a")
Please run 'bin/utils/ensure-up-to-date' locally and commit changes (UNCOMMITTED CHANGES ERROR)

Please update the Java rest-assured pom.xml when you've time.

@kibertoad
Copy link
Contributor Author

My apologies; there was an unnecessary letter committed by accident; removed now.

@wing328
Copy link
Member

wing328 commented Feb 19, 2020

I tested with different JDKs via https://travis-ci.org/OpenAPITools/openapi-generator/builds/652541701

JDK10 failed as expected without the workaround.

JDK13 is not yet supported.

Overall the result is good.

@wing328 wing328 added this to the 4.3.0 milestone Feb 19, 2020
@wing328 wing328 merged commit 734a35a into OpenAPITools:master Feb 19, 2020
@kibertoad kibertoad deleted the fix/java-11 branch February 19, 2020 22:21
@kibertoad
Copy link
Contributor Author

Much appreciated!

MikailBag pushed a commit to MikailBag/openapi-generator that referenced this pull request Mar 23, 2020
* Resolves `An error has occurred in Javadoc report generation: [ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module` error that happens when using Java 11

* Resolves `An error has occurred in Javadoc report generation: [ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module` error that happens when using Java 11

* Fix duplicate configuration entries

* Fix okhttp poms

* Remove letter that shouldn't be there
@wing328
Copy link
Member

wing328 commented Mar 27, 2020

@kibertoad thanks for the PR, which has been included in the 4.3.0 release: https://twitter.com/oas_generator/status/1243455743937789952

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants