Skip to content

Commit caec49a

Browse files
authored
AddJaxbRuntime should use overrideManagedDependency=true (#838)
1 parent c831007 commit caec49a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/main/java/org/openrewrite/java/migrate/javax/AddJaxbRuntime.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,9 @@ private Xml.Document jaxbDependencySwap(ExecutionContext ctx, Xml.Document d, St
218218
d = (Xml.Document) new org.openrewrite.maven.UpgradeDependencyVersion(sunJaxbRuntimeGroup, sunJaxbRuntimeArtifact, "2.3.x", null, null, null)
219219
.getVisitor()
220220
.visitNonNull(d, ctx);
221-
d = (Xml.Document) new org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId(
221+
return (Xml.Document) new org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId(
222222
glassfishJaxbRuntimeGroup, glassfishJaxbRuntimeArtifact,
223-
sunJaxbRuntimeGroup, sunJaxbRuntimeArtifact, "2.3.x", null
224-
).getVisitor().visitNonNull(d, ctx);
225-
return (Xml.Document) new org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId(
226-
glassfishJaxbRuntimeGroup, glassfishJaxbRuntimeArtifact,
227-
sunJaxbRuntimeGroup, sunJaxbRuntimeArtifact, "2.3.x"
228-
).getVisitor().visitNonNull(d, ctx);
223+
sunJaxbRuntimeGroup, sunJaxbRuntimeArtifact, "2.3.x", null, false, true)
224+
.getVisitor().visitNonNull(d, ctx);
229225
}
230226
}

0 commit comments

Comments
 (0)