Skip to content

Commit

Permalink
Fail Maven build on warnings (#2335)
Browse files Browse the repository at this point in the history
* Fail Maven build on warnings

* Fix configuration parameter name

For the Javadoc plugin it is "warnings" (plural) instead of "warning"
  • Loading branch information
Marcono1234 authored Mar 6, 2023
1 parent ef35a34 commit 0adcdc8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 0 additions & 6 deletions gson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
14 changes: 14 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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 -->
Expand Down Expand Up @@ -173,6 +186,7 @@
<detectOfflineLinks>false</detectOfflineLinks>
<!-- Only show warnings and errors -->
<quiet>true</quiet>
<failOnWarnings>true</failOnWarnings>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 0adcdc8

Please sign in to comment.