From 824e3c34725111325482133a44e89317ebdabcbe Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Thu, 10 Oct 2024 11:00:47 +0200 Subject: [PATCH] Fix compilation --- .../quarkus/MigrateQuarkusMavenPluginNativeImageGoal.java | 2 +- .../quarkus/MigrateQuarkusMavenPluginNativeImageGoalTest.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openrewrite/quarkus/MigrateQuarkusMavenPluginNativeImageGoal.java b/src/main/java/org/openrewrite/quarkus/MigrateQuarkusMavenPluginNativeImageGoal.java index c600b02..7faa5ba 100644 --- a/src/main/java/org/openrewrite/quarkus/MigrateQuarkusMavenPluginNativeImageGoal.java +++ b/src/main/java/org/openrewrite/quarkus/MigrateQuarkusMavenPluginNativeImageGoal.java @@ -50,7 +50,7 @@ public Xml.Document visitDocument(Xml.Document document, ExecutionContext ctx) { if (goal.getContent() != null && goal.getContent().size() == 1 && goal.getContent().get(0) instanceof Xml.CharData) { Xml.CharData existingValue = (Xml.CharData) goal.getContent().get(0); if ("native-image".equalsIgnoreCase(existingValue.getText())) { - doAfterVisit(new RemoveContentVisitor<>(goal, true)); + doAfterVisit(new RemoveContentVisitor<>(goal, true, true)); doAfterVisit(new AddQuarkusPackageTypePropertyToNativeProfile()); } } diff --git a/src/test/java/org/openrewrite/quarkus/MigrateQuarkusMavenPluginNativeImageGoalTest.java b/src/test/java/org/openrewrite/quarkus/MigrateQuarkusMavenPluginNativeImageGoalTest.java index 62dd232..b6c4952 100644 --- a/src/test/java/org/openrewrite/quarkus/MigrateQuarkusMavenPluginNativeImageGoalTest.java +++ b/src/test/java/org/openrewrite/quarkus/MigrateQuarkusMavenPluginNativeImageGoalTest.java @@ -32,6 +32,7 @@ public void defaults(RecipeSpec spec) { @Test void removeQuarkusMavenPluginNativeImageGoalTest() { rewriteRun( + //language=xml pomXml( """ @@ -96,6 +97,7 @@ void removeQuarkusMavenPluginNativeImageGoalTest() { @Test void addPropertyToNativeProfile() { rewriteRun( + //language=xml pomXml( """