From 41ae1b3a8024ef8c4357e21e05915b288b05da56 Mon Sep 17 00:00:00 2001 From: George Gastaldi Date: Tue, 28 May 2024 11:17:37 -0300 Subject: [PATCH] Set the target file in the Model This is necessary so `maven-model-helper` can know which pom.xml the change refers to. - Fixes #40853 --- .../bootstrap/resolver/maven/workspace/ModelUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/ModelUtils.java b/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/ModelUtils.java index 97f6c8f1456d4..556407a142017 100644 --- a/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/ModelUtils.java +++ b/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/ModelUtils.java @@ -232,7 +232,9 @@ private static Properties loadPomProps(Path appJar, Path artifactIdPath) throws } public static Model readModel(final Path pomXml) throws IOException { - return readModel(Files.newInputStream(pomXml)); + Model model = readModel(Files.newInputStream(pomXml)); + model.setPomFile(pomXml.toFile()); + return model; } public static Model readModel(InputStream stream) throws IOException {