[
https://issues.apache.org/jira/browse/MNG-7945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17789799#comment-17789799
]
ASF GitHub Bot commented on MNG-7945:
-------------------------------------
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.
> Fix profile settings being injected into consumer POMs
> ------------------------------------------------------
>
> Key: MNG-7945
> URL: https://issues.apache.org/jira/browse/MNG-7945
> Project: Maven
> Issue Type: Bug
> Affects Versions: 4.0.0-alpha-8
> Reporter: Tamas Cservenak
> Assignee: Guillaume Nodet
> Priority: Major
> Fix For: 4.0.0-alpha-9
>
>
> The consumer POMs may end up containing information from user settings.
> The reason is that they are currently built from the effective POMs. They
> need to be rebuilt based on raw models.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)