Benjamin Bentmann wrote:
> Christian Schulte wrote:
> 
>> Not having specified an execution id does not necessarily mean someone
>> did not care about it. It means someone explicitly referred to the
>> default execution.
> 
> I disagree with this interpretation, mainly because I am not aware of 
> any docs that would indicate this to the user.

To me that is more intuitive than having to deal with that id at all, if
all I want to do is to configure what Maven executes by default.

> The "Maven Model" [0] and the corresponding XSD [1] say about the 
> execution id:
> 
>> The identifier of this execution for labelling the goals during the build, 
>> and for matching executions to merge during inheritance.
> 
> This description does not mention that the id "default" is meant to 
> refer to executions provided by lifecycle mappings from a packaging type.
> The "POM Reference" [2] likewise does not state that there are special 
> ids available to refer to default executions. And from the "Introduction 
> to the Build Lifecycle" [3]:
> 
>> Separate executions can also be given an ID so that during inheritance or 
>> the application of profiles you can control whether goal configuration is 
>> merged or turned into an additional execution.
> 
> This expresses the id's purpose to assist in
> a) inheritance and
> b) profile injection
> Again, it's not stated that it can be used to control the executions 
> provided by a packaging type. In particular, the phrase "executions 
> *can* [...] be given an ID" merely expresses the ID is optional, not 
> that omitting it refers to the default executions of a plugin.

Technically there seems to be a difference between executions introduced
by the lifecycle vs. executions explicitly defined in the pom or
initiated by a user on the command line. I see it more from a user
standpoint where one does not even care about why a plugin is executed
in a specific phase at all. So when Maven executes something by default,
for me that is a default execution I know nothing about how to refer to
it. So even <id>default</id> is not that intuitive than just omitting
the id and let Maven do the right thing.

>> That is not working in Maven 2.0.x and that's the bug
>> to fix.  A POM which relies on that bug needs to get fixed.
> 
> Considering the references I gave above, IMHO this is a design weakness, 
> not a bug. This hairsplitting is not because I want to simply reduce our 
> bug stats but because there is a subtle difference with regard to a 
> user's expectations. Spoken laxly, a bug is "should work as per spec but 
> actually doesn't" while here we have "would be nice to work but 
> currently isn't supported".
> 
> Hence, I don't see a foundation to require users that currently omit the 
> execution ids to "fix" their "broken" POMs because we retrospectively 
> changed the semantics. Choosing a fresh identifier as suggested by 
> others before instead of "default" is less likely to break existing builds.

Hmm, the spec was the reason I changed my mind. Take a look at my first
post to this thread. There I suggested

org.apache.maven/2.1

to use as the execution id. Then I took a look at the spec of the POM
which for me is the XML schema and noticed that it explicitly defines
the execution id as "default" if not given. I assumed that an execution
with an identifier of "default" refers to what is executed by default.
If "default" does not identify the default execution, then I
misunderstood its meaning. So when you say one cannot use "default"
because its not specified anywhere, I say one must use "default" because
that is what the specification states, even if that potentially breaks
with 2.0 builds. I changed my mind on org.apache.maven/2.1 after having
read the specification.

So my point is using "default" because that is closer to the spec and
because that makes Maven intuitively do the right thing. The latter
being totally subjective, of course. If that breaks with 2.0, I am fine
with that because it subjectively is a step in the right direction.

Whatsoever, the docs do not mention that the execution id can be used to
refer to what Maven executes by default. No matter what the new value
will become (default-execution-id or whatever) would also need to be
mentioned in the docs. I thought it would be best if someone could just
say: Its not mentioned in the docs but it was mentioned in the XML
schema ever since.

-- 
Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to