gnodet commented on code in PR #1323:
URL: https://github.com/apache/maven/pull/1323#discussion_r1405399244


##########
maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultTransformerContextBuilder.java:
##########
@@ -106,6 +117,46 @@ private Model findRawModel(Path from, String groupId, 
String artifactId) {
                 return null;
             }
 
+            private void loadFullReactor() {
+                if (!fullReactorLoaded) {
+                    synchronized (this) {
+                        if (!fullReactorLoaded) {
+                            doLoadFullReactor();
+                            fullReactorLoaded = true;
+                        }
+                    }
+                }
+            }
+
+            private void doLoadFullReactor() {
+                Path rootDirectory = request.getRootDirectory();
+                if (rootDirectory == null) {
+                    return;
+                }
+                List<File> toLoad = new ArrayList<>();
+                File root = 
defaultModelBuilder.getModelProcessor().locateExistingPom(rootDirectory.toFile());
+                toLoad.add(root);
+                while (!toLoad.isEmpty()) {
+                    File pom = toLoad.remove(0);
+                    try {
+                        ModelBuildingRequest gaBuildingRequest =
+                                new 
DefaultModelBuildingRequest(request).setModelSource(new FileModelSource(pom));
+                        Model rawModel = 
defaultModelBuilder.readFileModel(gaBuildingRequest, problems);
+                        for (String module : rawModel.getModules()) {
+                            File moduleFile = defaultModelBuilder
+                                    .getModelProcessor()
+                                    .locateExistingPom(new 
File(pom.getParent(), module));
+                            if (moduleFile != null) {
+                                toLoad.add(moduleFile);
+                            }
+                        }
+                    } catch (ModelBuildingException e) {
+                        // gathered with problem collector

Review Comment:
   Not sure where you see a getter here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to