diff --git a/src/main/java/spoon/support/compiler/SpoonPom.java b/src/main/java/spoon/support/compiler/SpoonPom.java index 7b35617f34e..1b7693c65a1 100644 --- a/src/main/java/spoon/support/compiler/SpoonPom.java +++ b/src/main/java/spoon/support/compiler/SpoonPom.java @@ -133,7 +133,7 @@ public SpoonPom(String path, SpoonPom parent, MavenLauncher.SOURCE_TYPE sourceTy } } - public void addModule(SpoonPom module) { + private void addModule(SpoonPom module) { modules.add(module); } diff --git a/src/test/java/spoon/support/compiler/SpoonPomTest.java b/src/test/java/spoon/support/compiler/SpoonPomTest.java index 78e54f1bc84..b2b57ddb7b0 100644 --- a/src/test/java/spoon/support/compiler/SpoonPomTest.java +++ b/src/test/java/spoon/support/compiler/SpoonPomTest.java @@ -6,12 +6,9 @@ import spoon.support.StandardEnvironment; import java.io.IOException; -<<<<<<< HEAD import java.util.List; import java.util.regex.Pattern; -======= import java.nio.file.Paths; ->>>>>>> 7c8b18599... Added test for getting maven source directory from ancestors import static org.junit.Assert.*; @@ -69,6 +66,6 @@ public void checkSourceDirectory(String path, String expected) throws IOExceptio SpoonPom childModel = pomModel.getModules().get(0); //contract: source directory is derived from parent pom.xml if not declared in the current // (childModel) SpoonPom - assertEquals(expected, childModel.getSourceDirectories().get(0).getAbsolutePath(), expected); + assertEquals(expected, childModel.getSourceDirectories().get(0).getAbsolutePath()); } } \ No newline at end of file diff --git a/src/test/resources/maven-launcher/hierarchy/child/src/Test.java b/src/test/resources/maven-launcher/hierarchy/child/src/Test.java new file mode 100644 index 00000000000..6595d2962dd --- /dev/null +++ b/src/test/resources/maven-launcher/hierarchy/child/src/Test.java @@ -0,0 +1,5 @@ +package maven-launcher.hierarchy.child.src; + +public class Test { + +} \ No newline at end of file