From 29cda5817f9c5dbbe302a05e13fad890e2730a7b Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Sat, 7 Dec 2024 09:21:06 -0500 Subject: [PATCH] fix --- .../org/apache/maven/plugins/invoker/InterpolationTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/maven/plugins/invoker/InterpolationTest.java b/src/test/java/org/apache/maven/plugins/invoker/InterpolationTest.java index 9047da4a..e8132d63 100644 --- a/src/test/java/org/apache/maven/plugins/invoker/InterpolationTest.java +++ b/src/test/java/org/apache/maven/plugins/invoker/InterpolationTest.java @@ -39,8 +39,8 @@ */ class InterpolationTest extends AbstractTestUtil { - private MavenProjectStub buildMavenProjectStub() { - ExtendedMavenProjectStub project = new ExtendedMavenProjectStub(); + private MavenProject buildMavenProjectStub() { + MavenProject project = new MavenProject(); project.setVersion("1.0-SNAPSHOT"); project.setArtifactId("foo"); project.setGroupId("bar"); @@ -67,6 +67,7 @@ void testCompositeMap() { assertThat(compositeMap).containsEntry("fooOnProject", "barOnProject"); } + @Test public void testPomInterpolation() throws Exception { InvokerMojo invokerMojo = new InvokerMojo(); setVariableValueToObject(invokerMojo, "project", buildMavenProjectStub()); @@ -80,6 +81,7 @@ public void testPomInterpolation() throws Exception { File interpolatedPomFile = new File(getBasedir(), "target/interpolated-pom.xml"); invokerMojo.buildInterpolatedFile(new File(dirPath, "pom.xml"), interpolatedPomFile); + // TODO should parse the XML and use that to look for the interpolateValue element try (Reader reader = new XmlStreamReader(interpolatedPomFile)) { String content = IOUtil.toString(reader); assertThat(content.indexOf("bar"))