How to show all errors for gradle build and why -Xmaxerrs does not work?

305 Views Asked by At

I'm running ./gradlew clean build and getting many errors. Only first 100 are printed, however I need the complete list.

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
100 errors
4 warnings
only showing the first 100 errors, of 4360 total; use -Xmaxerrs if you would like to see more

> Task :waldo-spring-boot-starter:compileJava FAILED

FAILURE: Build failed with an exception.

Here's my setup:

./gradlew --version

------------------------------------------------------------
Gradle 7.6
------------------------------------------------------------

Build time:   2022-11-25 13:35:10 UTC
Revision:     daece9dbc5b79370cc8e4fd6fe4b2cd400e150a8

Kotlin:       1.7.10
Groovy:       3.0.13
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.6 (Oracle Corporation 17.0.6+10)
OS:           Linux 5.10.164-1-MANJARO amd64

As message suggested I set -Xmaxerrs options, but it's not recognized. -Xdiags:verbose is not recognized as well, however -Xms and -Xmx are picked up without any complaints.

export _JAVA_OPTIONS="-Xmaxerrs 5000"

./gradlew clean build
Picked up _JAVA_OPTIONS: -Xmaxerrs 5000
Unrecognized option: -Xmaxerrs
Error: Could not create the Java Virtual Machine.

Why does -Xmaxerrs is not recognized and/or is there other way to get the full list of errors?

0

There are 0 best solutions below