From f323a7251774aa6a0f2a7fc5049bc9f510bb380a Mon Sep 17 00:00:00 2001 From: Guillaume Le Floch Date: Thu, 7 Apr 2022 22:07:54 +0200 Subject: [PATCH] Only add existing classes directory to Gradle application model --- .../quarkus/gradle/tooling/GradleApplicationModelBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/tooling/GradleApplicationModelBuilder.java b/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/tooling/GradleApplicationModelBuilder.java index 89561b107a9cd..66b5372437bc1 100644 --- a/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/tooling/GradleApplicationModelBuilder.java +++ b/devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/tooling/GradleApplicationModelBuilder.java @@ -582,7 +582,9 @@ static ResolvedDependencyBuilder toDependency(ResolvedArtifact a, SourceSet s) { PathList.Builder resolvedPathBuilder = PathList.builder(); for (File classesDir : s.getOutput().getClassesDirs()) { - resolvedPathBuilder.add(classesDir.toPath()); + if (classesDir.exists()) { + resolvedPathBuilder.add(classesDir.toPath()); + } } File resourceDir = s.getOutput().getResourcesDir(); if (resourceDir != null && resourceDir.exists()) {