This project provides an example, for a failing quarkus builds, when using a custom resource directory with maven variables.
The project contains a custom resource directory with a file, which should be available after the build in target/my-custom-files
Until the quarkus plugin version 3.21.3 the resource filtering of custom resource directories worked as expected. Starting with 3.21.4, it ends with an error.
How to reproduce:
mvn clean packagewhen starting the first Quarkus Test it fails with the following exception:
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.deployment.steps.CompiledJavaVersionBuildStep#compiledJavaVersion threw an exception: java.io.UncheckedIOException: Failed to walk directory /${project.build.directory}/my-custom-files
at io.quarkus.paths.PathTreeVisit.walk(PathTreeVisit.java:31)
at io.quarkus.paths.OpenContainerPathTree.walk(OpenContainerPathTree.java:105)
at io.quarkus.paths.MultiRootPathTree.walk(MultiRootPathTree.java:65)
at io.quarkus.deployment.steps.CompiledJavaVersionBuildStep.getMajorJavaVersion(CompiledJavaVersionBuildStep.java:48)
at io.quarkus.deployment.steps.CompiledJavaVersionBuildStep.compiledJavaVersion(CompiledJavaVersionBuildStep.java:28)
at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
at io.quarkus.builder.BuildContext.run(BuildContext.java:255)Skipping the test, everything is built as expected. The custom files are available
mvn -DskipTests clean packageAlso downgrading to the version 3.21.3 of the quarkus-maven-plugin works as expected. In the pom use the version 3.21.3 instead of the quarkus.platform.version. Afterwards the test do not fail.
mvn clean package