We regularly merge code that introduces javac, javadoc, etc. warnings. To avoid that, the build should fail if they are present.
Note that we currently have a scaladoc warning that we don't know how to get rid of:
> Task :driver-scala:scaladoc warning: While parsing annotations in /Users/valentin.kovalenko/Documents/programming/projects/mongo-java-driver/driver-core/build/libs/mongodb-driver-core-5.2.0-SNAPSHOT.jar(com/mongodb/lang/Nullable.class), could not find MAYBE in enum <none>. This is likely due to an implementation restriction: an annotation argument cannot refer to a member of the annotated class (scala/bug#7014). 1 warning > Task :driver-scala:aggregatedScalaDoc warning: While parsing annotations in /Users/valentin.kovalenko/Documents/programming/projects/mongo-java-driver/driver-core/build/libs/mongodb-driver-core-5.2.0-SNAPSHOT.jar(com/mongodb/lang/Nullable.class), could not find MAYBE in enum <none>. This is likely due to an implementation restriction: an annotation argument cannot refer to a member of the annotated class (scala/bug#7014). 1 warning