4

We're using swagger code generation to create a client side API and the code base was written with java 8 and we're upgrading now to java 11. We're using the 2.4.15 version of swagger-codegen-cli. The code generation works, but at the end it tries to generate javadoc for the code and in that process we get the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar (attach-javadocs) on project cohortmgr-client: MavenReportException: Error while generating Javadoc: 
[ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in http://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] 
[ERROR] Command line was: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/javadoc @options @packages
[ERROR]

I don't need the java doc, and I'd prefer to not generate the java doc if it's going to cause me a problem. Is there anyway to prevent the generation of java docs?

Helen
  • 87,344
  • 17
  • 243
  • 314
Tony Giaccone
  • 511
  • 5
  • 18

1 Answers1

1

You can skip the javadoc error using -Dmaven.javadoc.skip=true, e.g.

mvn clean install -Dmaven.javadoc.skip=true
NickSim
  • 156
  • 6