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


##########
impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java:
##########
@@ -1654,21 +1654,16 @@ private List<Profile> getActiveProfiles(
                     // A model resolved to satisfy dependency resolution -- a 
dependency POM
                     // itself, or one of its parents, reached transitively -- 
evaluates profiles
                     // against a sandboxed activation context.  The sandbox:
-                    //  - merges model properties into system property lookups 
(so POM-declared
-                    //    <properties> drive activation via the existing 
property lookup chain),
+                    //  - does not expose model properties through 
system-property lookups, so
+                    //    dependency POMs cannot activate their own 
property-based profiles,
                     //  - suppresses user properties (consumer -D flags must 
not activate
                     //    dependency profiles — they were not set for that 
artifact),
                     //  - disables file existence checks (publisher paths 
don't exist here).
-                    // Model properties are merged into system properties 
rather than adding
-                    // a separate lookup step in PropertyProfileActivator, 
because changing the
-                    // activator would affect ALL profile evaluations 
(including the build's own
-                    // project) and cause unintended profile activation when a 
POM declares a
-                    // property that matches a profile's activation condition.
                     // File-activated profiles are pre-filtered (not just 
sandboxed) because
                     // returning false from exists() would incorrectly 
activate <missing> profiles.
                     // Repository stripping is intentionally omitted: only 
legitimately-active
-                    // profiles (JDK/OS/activeByDefault and 
POM-property-gated) reach injection,
-                    // and stripping their repositories would break the 
established
+                    // profiles (JDK/OS/activeByDefault and negated-property 
default-on profiles)
+                    // reach injection, and stripping their repositories would 
break the established

Review Comment:
   Dangling comment continuation — `// reach injection,` wraps to its own line, 
making the sentence awkward to parse. Prior suggestion still not applied.
   
   ```suggestion
                       // profiles (JDK/OS/activeByDefault and negated-property 
default-on profiles) reach injection,
                       // and stripping their repositories would break the 
established
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to