gnodet commented on PR #22097:
URL: https://github.com/apache/camel/pull/22097#issuecomment-4092830283
_Claude Code on behalf of Guillaume Nodet_
Good question! The `@{...}` syntax is a Maven Surefire/Failsafe-specific
**late-replacement** mechanism, while `${...}` is standard Maven property
interpolation:
- **`${argLine}`** is resolved at POM parsing time by Maven. If `argLine` is
not defined, the build fails (or uses an empty string if defined with a
default). If a plugin like JaCoCo sets `argLine` via `maven-surefire-plugin`'s
`<properties>` mechanism, it won't pick up those dynamic changes because the
value was already interpolated.
- **`@{argLine}`** is resolved **at execution time** by the
Surefire/Failsafe plugin itself. This allows other plugins (JaCoCo, Quarkus,
etc.) to dynamically set or append to `argLine` via the
`maven.surefire.argLine` mechanism, and the value will be picked up when the
forked JVM is actually launched.
In practice: `@{argLine}` is the recommended form for Surefire/Failsafe
because it plays nicely with JaCoCo's agent injection and similar tools that
modify `argLine` at runtime. See the [Surefire
documentation](https://maven.apache.org/surefire/maven-surefire-plugin/faq.html#late-property-evaluation)
for more details.
--
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]