gnodet-bot commented on code in PR #13254:
URL: https://github.com/apache/maven/pull/13254#discussion_r4091686671
##########
compat/maven-compat/src/main/mdo/profiles.mdo:
##########
@@ -138,7 +138,8 @@ under the License.
<name>activeByDefault</name>
<version>1.0.0</version>
<type>boolean</type>
- <description>Flag specifying whether this profile is active as a
default.</description>
+ <description>If set to true, this profile will be active by default
unless another profile is
+ explicitly activated via the command line {@code -P} / {@code
--activate-profiles} option.</description>
Review Comment:
⚠️ **Inaccurate description for the compat layer.** This description says
the external `activeByDefault` profile is suppressed when another profile is
"explicitly activated via the command line `-P` / `--activate-profiles`". But
`compat/maven-model-builder`'s `DefaultProfileSelector` (the Maven 3 compat
implementation) does **not** implement this behavior — its `else` branch still
adds all non-POM `activeByDefault` profiles unconditionally to
`activeProfiles`, with no deferred list and no `anyProfileExplicitlyActivated`
check.
The fix in this PR is in
`impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultProfileSelector.java`
(Maven 4 path). The compat selector retains the old behavior. This description
therefore documents behavior the compat layer does not have.
Correct the description to match the actual compat behavior:
```suggestion
<description>Flag specifying whether this profile is active as a
default.
Note: unlike the Maven 4 implementation, this compat selector
does not suppress
external activeByDefault profiles when -P is used.</description>
```
Or, if brevity is preferred, revert to the original one-liner and leave the
behavioral note out entirely — the compat module is `@Deprecated(since =
"4.0.0")` and documenting its un-fixed quirks is more honest than implying the
fix applies 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]