Hi Baptiste,
> Hi,
IIUC, you're talking about the injection difference that may be introduced
between an absent and empty tag.
Yes you hit the nail on the head...
If so, then by the way, the current situation is even worse than that :
putting "*<someTag />"* or "*<someTag> </someTag>"* results by default in
the same thing: considered unspecified, and so null (or default-value) is
injected.
(Unless you use the special xml:space="preserve" attribute, only for
m3.1+, see [1] for example).
I would like to keep it more simple but you are absolutely right with
your additions...
I tried to reduce it to simple two cases Just if the tag is there or
not...(i know i'm missing some cases). Yours is the more general approach...
I think that it's something that should be considered at least for m4.
(or before, but not sure it's feasible to do it in a reasonably compatible
way [in modello I guess?]. Maybe with additional compatibility switches for
@Parameter, like defautValueBehaviour or something like that).
That looks like a solution for the future but currently i have to deal
with things like in the issue ...
Currently, IMO the least surprise principle isn't respected.
Yes that's exactly my opinion too ....
As a user, for the build-helper:regex-property goal, for example. I can
specify a regex and a replacement.
When I say
- "" [empty string/absent tag]"
- "<replacement></replacement>"
- "<replacement> </replacement>"
I mean different things. And currently Maven will merge all those 3 cases
in one, as if the tag was left unspecified. For Maven usage, I would argue
only the first case should trigger the defaultValue injection.
So, to sum up, I agree with you. I think it's currently missing. Plugin
developers could still be explicitly allowed to ask Maven injection to
merge some of the cases above, but not as a default behaviour (or maybe
only before m4 with a warning).
Can this be currently influenced by a plugin ? I wasn't aware of that is
that possible at the moment ?
Kind regards
Karl Heinz Marbaise
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org