1 year ago
#377736
user18619318
How to disable a warning in code generated by a maven plugin?
I am generating sources as part of a Java 17 maven build using version 5.4.0 (latest release as of 2022-04-05) of openapi-generator-maven-plugin
. Works fine.
Unfortunately the generated source uses a deprecated method so the Java compiler fairly emits a warning.
java: configure(com.fasterxml.jackson.databind.MapperFeature,boolean) in com.fasterxml.jackson.databind.ObjectMapper has been deprecated
Normally I would add a @SuppressWarnings
snippet but as this is generated code that is not stored in git, that will not work here.
I have full control of the Maven project. Can I disable this warning (and just that one)?
java
maven
openapi
javac
suppress-warnings
0 Answers
Your Answer