Fail Maven build on warnings (#2335)

* Fail Maven build on warnings

* Fix configuration parameter name

For the Javadoc plugin it is "warnings" (plural) instead of "warning"
This commit is contained in:
Marcono1234 2023-03-06 16:33:50 +01:00 committed by GitHub
parent ef35a34a60
commit 0adcdc80d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

View File

@ -55,12 +55,6 @@
<version>31.1-jre</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.18.0</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>

14
pom.xml
View File

@ -85,6 +85,18 @@
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Error Prone Annotations is only directly used by gson module, but since this is an optional
dependency and other modules depend on gson module they also need the dependency to avoid
compiler warnings, see comments on https://bugs.openjdk.org/browse/JDK-6331821 -->
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.18.0</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
@ -120,6 +132,7 @@
<configuration>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<failOnWarning>true</failOnWarning>
<fork>true</fork>
<compilerArgs>
<!-- Args related to Error Prone, see: https://errorprone.info/docs/installation#maven -->
@ -173,6 +186,7 @@
<detectOfflineLinks>false</detectOfflineLinks>
<!-- Only show warnings and errors -->
<quiet>true</quiet>
<failOnWarnings>true</failOnWarnings>
</configuration>
</plugin>
<plugin>