Jason van Zyl wrote:
> I don't think anyone is generally going to type:
> 
> default-execution-id
> 
> It says what it is and if someone happens to look at the effective POM  
> they will understand. It's also unlikely someone would actually use  
> that in their own POMs.
> 

Although not an apache developer, I must say, I disagree with that. As
Brian already pointed out, that bug cannot be fixed in Maven 2.0.x
correctly since it would break builds using _broken_ POMs. When fixing
this for >= 2.1 things should be done right and not worked around. Here
is an example of what I think is right.

<plugin>
  <executions>
    <execution>
      <goals>
        <goal>goal-a</goal>
        <goal>goal-b</goal>
      </goals>
      <configuration>
        <property>value-b</property>

        Configuration of the default execution for goals
        goal-a and goal-b goes here, overwriting any
        configuration of the default execution for all
        goals given below. Note the missing execution id!
        That is the same as writing <id>default</id> as that
        is what is defined in the schema as the default value
        of an execution id. You really want people to write
        <id>default-execution-id</id> here ? Why is the
        execution id optional then ?

      </configuration>
    </execution>
    <execution>
      <goals>
        <goal>goal-c</goal>
      </goals>
      <configuration>
        <property>value-c</property>

        Same as above for the default execution of goal-c.

      </configuration>
    </execution>
  </executions>
  <configuration>
    <property>value-a</property>

    Configuration of the default execution for all goals of
    the plugin goes here. That default execution needs to
    have the same execution id internally as what is used
    when a specific execution has no id defined in the
    POM. That is "default" for the current XML schema.

  </configuration>
</plugin>

I think the correct solution is to use "default" since that is
consistent with the XML schema. Someone using a POM which relies on the
bug (default execution of all goals is not the same as the default
execution referred to by an execution without an id or with an id equal
to "default") has to fix the POM when upgrading to 2.1. That is the
purpose of having that 2.1!

-1

-- 
Christian


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

Reply via email to