diff --git a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java index 23291d5b24701..11290f4d0b0ab 100644 --- a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java +++ b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java @@ -75,7 +75,11 @@ public void execute() { LOGGER.info("Quarkus application build was successful"); } catch (BootstrapException e) { - throw new GradleException("Failed to build Quarkus application", e); + // TODO remove this unconditional logging + LOGGER.error("Failed to generate sources in the QuarkusPrepare task for {}", gav, e); + // Gradle "abbreviates" the stacktrace to something human-readable, but here the underlying cause might + // get lost in the error output. + throw new GradleException("Failed to build Quarkus application for " + gav + " due to " + e, e); } } } diff --git a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/CodeGenWorker.java b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/CodeGenWorker.java index fa19eb3f54084..af3e5186f368a 100644 --- a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/CodeGenWorker.java +++ b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/CodeGenWorker.java @@ -81,7 +81,14 @@ public void execute() { // boolean test params.getTest().get()); } catch (BootstrapException | IllegalAccessException | InvocationTargetException | ClassNotFoundException e) { - throw new GradleException("Failed to generate sources in the QuarkusPrepare task", e); + // TODO remove this unconditional logging + //if (!(e instanceof BootstrapException)) { + LOGGER.error("Failed to generate sources in the QuarkusPrepare task for {}", gav, e); + //} + + // Gradle "abbreviates" the stacktrace to something human-readable, but here the underlying cause might + // get lost in the error output. + throw new GradleException("Failed to generate sources in the QuarkusPrepare task for " + gav + " due to " + e, e); } } }