-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[BUG][Java][client] mvn package
fails on Javadoc error
#3272
Comments
I couldn't repeat the issue locally (as I'm using Java 8). I'll leverage the CI to test different versions of JVM later to see if the issue occurs for a specified JVM version. For the time being, please use |
FTR, I could only reproduce the issue using OpenJDK 11 and 12 from adoptopenjdk [1]. With their OpenJDK 8, this works fine for me too. |
Can you provide what the correct HTML should be? It is easy to change. In #3302 I have activated verification of Javadoc task in our CI, but I guess we are only testing with Java 8. |
The configuration below of the javadoc plugin works for me with AdoptOpenJDK 11.0.6: <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<source>8</source>
<doclint>none</doclint>
<tags>
<tag>
<name>http.response.details</name>
<placement>a</placement>
<head>Http Response Details:</head>
</tag>
</tags>
</configuration>
</plugin>
|
Hello I'm facing similar issue with comand line What would be the workaround for command line ? Could not find javadoc option here: https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/java.md My env:
Thank you for info |
can you please try with the latest stable version v5.4.0? an alternative is to use the docker images: https://hub.docker.com/r/openapitools/openapi-generator-cli |
@wing328 thank you for reply, I tried it and still same issue (5.4.0 and openjdk 17). For anyone facing similar issue, not ideal but I've disabled doclint in javadoc {
if(JavaVersion.current().isJava8Compatible()) {
options.addStringOption('Xdoclint:none', '-quiet')
}
} |
We have the same issue using library=jersey2, generatorName= java, JVM graalVM mandrel 22.3
Generated code:
YAML: |
Just a quick additional note: I'm on openapi-generator-maven-plugin 7.0.1 and regarding this bug I prefer https://maven.apache.org/plugins/maven-javadoc-plugin/examples/exclude-package-names.html (when the generated client is just part of a bigger project). |
Bug Report Checklist
Description
Generated Java client (okhttp-gson) fails to build, erroring out on javadoc issues. This is reproducible even on
samples/client/petstore/java/okhttp-gson
for me. The output ofmvn package
is as follows:It seems that there are 2 separate issues - the "table summary" being incorrect for HTML 5 and the other: "The code being documented uses modules but the packages defined in http://docs.oracle.com/javase/8/docs/api/ are in the unnamed module."
openapi-generator version
Seems to be both in 4.0.2 and current master.
OpenAPI declaration file content or url
Use the one included in samples.
Command line used for generation
None, just trying to build
samples/client/petstore/java/okhttp-gson
after cloning the repo.Steps to reproduce
Related issues/PRs
None AFAICS.
Suggest a fix
For the first problem ("table summary"), we could probably easily fix the HTML to produce something that is compatible with HTML 5.
For the other issue, I guess the problem is a version combination of my JDK/maven, but I'm not a Java expert, so I don't know. Quick googling around didn't really help. My environment:
The text was updated successfully, but these errors were encountered: