You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Schuerig <mi...@schuerig.de> on 2005/02/22 23:20:30 UTC

Coalescing sub-goals

In my maven.xml I have defined a goal like this

  <goal name="stage-upload">
    <attainGoal name="clean"/>
    <attainGoal name="dist:deploy-snapshot"/>
    <attainGoal name="jar:deploy-snapshot"/>
    <attainGoal name="site:generate"/>
    <attainGoal name="site:fsdeploy"/>
  </goal>

The result is what I want, but it is achieved in a very inefficient 
fashion in that sub-goals, such as test, are repeated over and over. 
I'm wondering, is there a way to tell Maven to achieve each goal only 
once in a single run?

Michael

-- 
Michael Schuerig                           The more it stays the same,
mailto:michael@schuerig.de                        The less it changes!
http://www.schuerig.de/michael/      --Spinal Tap, The Majesty of Rock

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


Re: Coalescing sub-goals

Posted by Michael Schuerig <mi...@schuerig.de>.
On Tuesday 22 February 2005 23:22, Brett Porter wrote:
> use prereqs instead of attainGoal.
>
> (this won't help when one of the goals uses attainGoal though).
>
> For tests specifically, you can run the tests first, then set
> maven.test.skip before the later goals.

Thanks for the suggestions. Now I've got

  <goal name="stage-upload"
   prereqs="clean,mytest,dist:deploy-snapshot,jar:deploy-snapshot,site:generate,site:fsdeploy">
  </goal>

  <goal name="mytest" prereqs="test:test">
    <j:set var="maven.test.skip" value="true" />
  </goal>

Which gives some improvement.

Michael

-- 
Michael Schuerig              The usual excuse for our most unspeakable
mailto:michael@schuerig.de      public acts is that they are necessary.
http://www.schuerig.de/michael/                      --Judith N. Shklar

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


Re: Coalescing sub-goals

Posted by Brett Porter <br...@gmail.com>.
use prereqs instead of attainGoal.

(this won't help when one of the goals uses attainGoal though).

For tests specifically, you can run the tests first, then set
maven.test.skip before the later goals.

- Brett


On Tue, 22 Feb 2005 23:20:30 +0100, Michael Schuerig
<mi...@schuerig.de> wrote:
> 
> In my maven.xml I have defined a goal like this
> 
>   <goal name="stage-upload">
>     <attainGoal name="clean"/>
>     <attainGoal name="dist:deploy-snapshot"/>
>     <attainGoal name="jar:deploy-snapshot"/>
>     <attainGoal name="site:generate"/>
>     <attainGoal name="site:fsdeploy"/>
>   </goal>
> 
> The result is what I want, but it is achieved in a very inefficient
> fashion in that sub-goals, such as test, are repeated over and over.
> I'm wondering, is there a way to tell Maven to achieve each goal only
> once in a single run?
> 
> Michael
> 
> --
> Michael Schuerig                           The more it stays the same,
> mailto:michael@schuerig.de                        The less it changes!
> http://www.schuerig.de/michael/      --Spinal Tap, The Majesty of Rock
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org 
> For additional commands, e-mail: users-help@maven.apache.org 
> 
>

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