You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/08/24 05:22:43 UTC
[PR] [backport maven-4.0.x] Support the logical not operator in profile activation conditions [maven]
gnodet opened a new pull request, #12799:
URL: https://github.com/apache/maven/pull/12799
## Backport of #12737
Cherry-pick of #12737 onto `maven-4.0.x`.
**Original PR:** #12737 - Support the logical not operator in profile activation conditions
**Original author:** @SEPURI-SAI-KRISHNA
**Target branch:** `maven-4.0.x`
### Original description
Adds handling for the `!` operator to `ConditionParser.parseUnary()`.
The tokenizer already treats `!` as an operator and emits a bare `!` token, but no parser rule
consumed it. Writing the natural form of a negated condition (`!exists('some/path')`) failed
with `Unknown variable: !`.
`!` is defined as sugar for the `not()` function that already exists, using the same
`toBoolean()` coercion. It is handled in `parseUnary()`, giving it the same precedence as
in Java: tighter than arithmetic, comparison, `&&` and `||`.
`!=` is unaffected -- the tokenizer emits it as a single token before a bare `!` can be produced.
Fixes #12736
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [backport maven-4.0.x] Support the logical not operator in profile activation conditions [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #12799:
URL: https://github.com/apache/maven/pull/12799
--
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org