From 0ee58de154995e35a31038d2aeb4de5da3bc8e18 Mon Sep 17 00:00:00 2001 From: Mike Weber Date: Thu, 6 Jan 2022 16:39:17 -0500 Subject: [PATCH] Fixed config locations to be URIs --- .../steps/ConfigGenerationBuildStep.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/steps/ConfigGenerationBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/steps/ConfigGenerationBuildStep.java index a0f04af8ec19d8..ff2ce93929ae94 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/steps/ConfigGenerationBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/steps/ConfigGenerationBuildStep.java @@ -8,9 +8,10 @@ import static java.util.stream.Collectors.toSet; import java.io.ByteArrayOutputStream; +import java.io.File; import java.io.IOException; import java.lang.reflect.Modifier; -import java.nio.file.Files; +import java.net.URI; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collections; @@ -253,12 +254,13 @@ public void watchConfigFiles(BuildProducer wa configWatchedFiles.add( Paths.get(userDir, "config", String.format("application-%s.properties", profile)).toAbsolutePath().toString()); - Optional> optionalLocations = config.getOptionalValues(SMALLRYE_CONFIG_LOCATIONS, String.class); + Optional> optionalLocations = config.getOptionalValues(SMALLRYE_CONFIG_LOCATIONS, URI.class); optionalLocations.ifPresent(locations -> { - for (String location : locations) { - if (!Files.isDirectory(Paths.get(location))) { - configWatchedFiles.add(location); - configWatchedFiles.add(appendProfileToFilename(location, profile)); + for (URI location : locations) { + File file = new File(location); + if (!file.isDirectory()) { + configWatchedFiles.add(file.getAbsolutePath()); + configWatchedFiles.add(appendProfileToFilename(file.getAbsolutePath(), profile)); } } });