You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "John Casey (JIRA)" <ji...@codehaus.org> on 2005/06/14 18:20:26 UTC

[jira] Created: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
----------------------------------------------------------------------------------------------

         Key: MNG-472
         URL: http://jira.codehaus.org/browse/MNG-472
     Project: Maven 2
        Type: Bug
  Components: maven-core  
    Reporter: John Casey
     Fix For: 2.0-beta-1


assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.

It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.

This is not the case now.

Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

Posted by "Jesse McConnell (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-472?page=comments#action_50808 ] 

Jesse McConnell commented on MNG-472:
-------------------------------------

one note on this issue..

if you specify the <phase> in the execution it will not process multiple <execution> elements using the default lifecycle (ie, mvn install)...the plugin declares the phase and the plugins can't mention the phase, even if it is the same one since that causes only the first one to be executed..

> multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-472
>          URL: http://jira.codehaus.org/browse/MNG-472
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Reporter: John Casey
>     Priority: Critical

>
>
> assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.
> It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.
> This is not the case now.
> Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-472?page=comments#action_41309 ] 

John Casey commented on MNG-472:
--------------------------------

My main concern here is consistency with existing plugin functionality.

For example, if I used 'm2 surefire:test' directly, and I'd added a <plugin/> for surefire with some configuration like such:

...
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>

      <configuration>
        <test>**/SomethingTest*</test>
      </configuration>
    </plugin>
  </plugins>
</build>
...

then I would expect the 'test' goal invocation to pickup the value for ${test} without needing to add a <goals/> stanza to the plugin definition.

In the same way, if I had this:

...
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>

      <executions>
        <execution>
          <id>test1</id>
          <configuration>
            <test>**/SomethingTest*</test>
          </configuration>
        </execution>

        <execution>
          <id>test2</id>
          <configuration>
            <test>**/SomethingElseTest*</test>
          </configuration>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>
...

and I executed 'm2 surefire:test', I would expect it to pickup both executions and run 'test' twice, regardless of the fact that I didn't configure the <goals/> stanza in each execution.

Maybe this is incorrect behavior, but I listed this as critical as it struck me as potentially inconsistent - and something likely to popup in a bug report if we didn't talk about it and/or document it. So I filed this to make sure we talked about it.


> multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-472
>          URL: http://jira.codehaus.org/browse/MNG-472
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Reporter: John Casey
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
>
> assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.
> It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.
> This is not the case now.
> Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-472?page=comments#action_41305 ] 

Brett Porter commented on MNG-472:
----------------------------------

John, I don't understand - can you give an example?

I thought we talked about this as a nice to have, not something critical - I'd really like to see an example of what you are thinking of.

> multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-472
>          URL: http://jira.codehaus.org/browse/MNG-472
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Reporter: John Casey
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
>
> assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.
> It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.
> This is not the case now.
> Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-472?page=all ]
     
Brett Porter closed MNG-472:
----------------------------

      Assign To:     (was: John Casey)
     Resolution: Won't Fix
    Fix Version:     (was: 2.0-beta-1)

the lifecycle doc has clarified this. Possibly the only outstanding item is whether to rename executions...

> multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-472
>          URL: http://jira.codehaus.org/browse/MNG-472
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Reporter: John Casey
>     Priority: Critical

>
>
> assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.
> It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.
> This is not the case now.
> Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-472?page=comments#action_41339 ] 

Brett Porter commented on MNG-472:
----------------------------------

IMO, executions only apply to mojos with a phase binding. It's all about the lifecycle. This has nothing to do with the command line.

basically, the command line is a one goal lifecycle, so the executions have nowhere to bind, and so they are separate. The general plugin configuration is picked up, however - just not any of the exec. config.

Maybe, looking back, the executions name is misleading, because two executions don't actually mean that. It is two different configurations of a goal, bound to the one lifecycle.

Hopefully I can polish off the lifecycle doc early tomorrow, and that will clear it up.

> multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-472
>          URL: http://jira.codehaus.org/browse/MNG-472
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Reporter: John Casey
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
>
> assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.
> It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.
> This is not the case now.
> Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

Posted by "Jesse McConnell (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-472?page=comments#action_51424 ] 

Jesse McConnell commented on MNG-472:
-------------------------------------

brett - I haven't put it together enough to think of it as a bug or not...  or to warrent its own ticket really.

in essense, if a mojo has a @phase specificed in the class lvl javadoc, and that mojo is used in multiple executions and you specify the <phase> in the execution, multiple executions will not occur, even if the <phase> is set to the same as the @phase in the mojo itself...remove the <phase> from the execution and it multiple of them will execution.

I'll play with this a bit and see about opening an issue or just leaving this little trace here...worst case if ought to be mentioned somewhere as a potential gotcha

> multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-472
>          URL: http://jira.codehaus.org/browse/MNG-472
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Reporter: John Casey
>     Priority: Critical

>
>
> assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.
> It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.
> This is not the case now.
> Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-472?page=comments#action_41313 ] 

Brett Porter commented on MNG-472:
----------------------------------

for the first one: most definitely.

for the second: definitely not :)

I'd see an execution on the command line as a theoretical execution element of its own, so the configuration in the plugin should apply, but not that of any individual execution. It certainly should not run twice.

Do you agree?

> multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-472
>          URL: http://jira.codehaus.org/browse/MNG-472
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Reporter: John Casey
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
>
> assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.
> It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.
> This is not the case now.
> Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-472?page=comments#action_41321 ] 

John Casey commented on MNG-472:
--------------------------------

even if the that specific goal has been provided in one or more execution sections? What if that goal has no phase binding? It will never be executed multiple times, in that scenario.

Are we saying that only mojos with @phase are eligible for mulitple execution?

I'd expect that if I told it to run multiple times (explicitly, through specification in <goals/>) then it should do that when I invoke it drectly from the command line.

I do agree that unless it is specifically in a <goals/> for an execution, it should NOT be implied...after all, who's to say which executions we meant it to run with? We could easily provide an execution (using full goal specification) where that goal was excluded. However, if the goal is listed in multiple execution sections, I think we have to run it multiple times even when it's directly invoked...

> multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-472
>          URL: http://jira.codehaus.org/browse/MNG-472
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Reporter: John Casey
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
>
> assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.
> It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.
> This is not the case now.
> Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-472?page=all ]

John Casey updated MNG-472:
---------------------------

    Priority: Critical  (was: Major)

upgrading to Critical priority, since this will affect the way this functionality is used.

> multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-472
>          URL: http://jira.codehaus.org/browse/MNG-472
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Reporter: John Casey
>     Assignee: John Casey
>     Priority: Critical
>      Fix For: 2.0-beta-1

>
>
> assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.
> It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.
> This is not the case now.
> Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-472?page=comments#action_50828 ] 

Brett Porter commented on MNG-472:
----------------------------------

Jesse - is that a bug or something that needs to be documented?

It'll get lost in this closed issue, so please either file a new issue or create a doc (with an example, as I have no idea what you are talking about here pre-coffee :)

> multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-472
>          URL: http://jira.codehaus.org/browse/MNG-472
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Reporter: John Casey
>     Priority: Critical

>
>
> assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.
> It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.
> This is not the case now.
> Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-472) multiple 's with no goals not considered when running a goal directly from the CLI

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-472?page=comments#action_51478 ] 

Brett Porter commented on MNG-472:
----------------------------------

yes, sounds like a gotcha to document

> multiple <execution/>'s with no goals not considered when running a goal directly from the CLI
> ----------------------------------------------------------------------------------------------
>
>          Key: MNG-472
>          URL: http://jira.codehaus.org/browse/MNG-472
>      Project: Maven 2
>         Type: Bug
>   Components: maven-core
>     Reporter: John Casey
>     Priority: Critical

>
>
> assume you specify a plugin in the pom with multiple <execution/> sections, each containing configurations.
> It should be possible to directly invoke a goal within this plugin, and have that goal run once per execution, despite the fact that the goal is not explicitly specified in the <execution/>.
> This is not the case now.
> Workaround: specify the goal for each execution in which you want it to run.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org