Repository: quarkusio/quarkus
Issue: Multi-project @QuarkusTest in IDE to use compiled source

**Describe the bug**
Running @QuarkusTests in Eclipse IDE for a multi-project Maven setup, the tests are picking up the jar dependencies not the compiled source.

**Environment (please complete the following information):**
 - Quarkus version or git rev: 1.3.0.Alpha1

**Additional context**
https://groups.google.com/d/msg/quarkus-dev/ovaJ1GUang8/9jUbs9m7AQAJ


Changed files:
independent-projects/bootstrap/core/src/test/java/io/quarkus/bootstrap/workspace/test/LocalWorkspaceDiscoveryTest.java
independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/LocalProject.java

diff --git a/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/LocalProject.java b/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/LocalProject.java
index 6724abacb84..063737b695d 100644
--- a/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/LocalProject.java
+++ b/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/resolver/maven/workspace/LocalProject.java
@@ -80,25 +80,20 @@ private static LocalProject load(LocalWorkspace workspace, LocalProject parent,
 
     private static Model loadRootModel(Path currentProjectDir) throws BootstrapException {
         Path pomXml = currentProjectDir.resolve(POM_XML);
-        Model model = readModel(pomXml);
-        Parent parent = model.getParent();
-        while (parent != null) {
-            if (parent.getRelativePath() != null && !parent.getRelativePath().isEmpty()) {
+        Model model = null;
+        while (Files.exists(pomXml)) {
+            model = readModel(pomXml);
+            final Parent parent = model.getParent();
+            if (parent != null
+                    && parent.getRelativePath() != null
+                    && !parent.getRelativePath().isEmpty()) {
                 pomXml = pomXml.getParent().resolve(parent.getRelativePath()).normalize();
-                if (!Files.exists(pomXml)) {
-                    return model;
-                }
                 if (Files.isDirectory(pomXml)) {
                     pomXml = pomXml.resolve(POM_XML);
                 }
             } else {
                 pomXml = pomXml.getParent().getParent().resolve(POM_XML);
-                if (!Files.exists(pomXml)) {
-                    return model;
-                }
             }
-            model = readModel(pomXml);
-            parent = model.getParent();
         }
         return model;
     }
diff --git a/independent-projects/bootstrap/core/src/test/java/io/quarkus/bootstrap/workspace/test/LocalWorkspaceDiscoveryTest.java b/independent-projects/bootstrap/core/src/test/java/io/quarkus/bootstrap/workspace/test/LocalWorkspaceDiscoveryTest.java
index 227181ed6ab..e0965f63ece 100644
--- a/independent-projects/bootstrap/core/src/test/java/io/quarkus/bootstrap/workspace/test/LocalWorkspaceDiscoveryTest.java
+++ b/independent-projects/bootstrap/core/src/test/java/io/quarkus/bootstrap/workspace/test/LocalWorkspaceDiscoveryTest.java
@@ -107,10 +107,10 @@ public void loadIndependentProjectInTheWorkspaceTree() throws Exception {
         assertEquals("independent", project.getArtifactId());
         assertEquals(MvnProjectBuilder.DEFAULT_VERSION, project.getVersion());
         final Map<AppArtifactKey, LocalProject> projects = project.getWorkspace().getProjects();
-        assertEquals(1, projects.size());
+        assertEquals(6, projects.size());
         assertTrue(projects.containsKey(new AppArtifactKey(MvnProjectBuilder.DEFAULT_GROUP_ID, "independent")));
 
-        assertLocalDeps(project);
+        assertLocalDeps(project, "root-module-not-direct-child", "root-no-parent-module", "root-module-with-parent");
     }
 
     @Test
@@ -135,9 +135,9 @@ public void loadWorkspaceForModuleWithoutParent() throws Exception {
         assertEquals(MvnProjectBuilder.DEFAULT_VERSION, project.getVersion());
         assertNotNull(project.getWorkspace());
         final Map<AppArtifactKey, LocalProject> projects = project.getWorkspace().getProjects();
-        assertEquals(1, projects.size());
+        assertEquals(5, projects.size());
         assertTrue(projects.containsKey(new AppArtifactKey(MvnProjectBuilder.DEFAULT_GROUP_ID, "root-no-parent-module")));
-        assertLocalDeps(project);
+        assertLocalDeps(project, "root-module-not-direct-child");
     }
 
     @Test