slachiewicz opened a new pull request, #13480:
URL: https://github.com/apache/maven/pull/13480

   Fixes #13479. Maven 4 reads `-P ?id` as an optional profile (MNG-7051); 
Maven 3.10 read `?id` as a profile literally named `?id` and left `id` off, so 
a build passing `-P ?run-its` to both Maven 3 and 4 silently skipped the 
profile on Maven 3. The `?` is now removed after the `+`, `-` and `!` prefixes, 
in the same order as Maven 4, so `?id`, `+?id`, `-?id` and `!?id` work. A 
missing optional profile still logs the existing "could not be activated" 
warning, now with the plain id, since Maven 3 does not fail on missing 
profiles. The parsing moves into a package-private `performProfileActivation`, 
as in Maven 4, so it can be unit tested.
   
   Verified: a 3.10.1-SNAPSHOT build activates the profile with `-P ?run-its` 
where 3.10.0 does not, deactivates it with `!?run-its`, and succeeds with `-P 
?missing`; `MavenCliTest` passes (17 tests).
   
   ---
   
   - [x] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).


-- 
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