You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gisbert Amm <gi...@webde-ag.de> on 2005/07/06 13:09:52 UTC
preGoal called before several goals - possible and how?
Hi Maveners,
I need to call a preGoal in my maven.xml before two other goals. Is this
possible? I tried whitespace and comma separated lists, like this
<preGoal name="war:init site:deploy">
...
<preGoal name="war:init, site:deploy">
...
but both didn't work.
As a workaround, I've put the piece of code I need twice in an XML
entity but I'd rather like to avoid that.
Any hint would be highly appreciated.
Regards,
Gisbert Amm
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: preGoal called before several goals - possible and how?
Posted by Gisbert Amm <gi...@webde-ag.de>.
Kenney Westerhof wrote:
> On Wed, 6 Jul 2005, Gisbert Amm wrote:
>
> This isn't possible. Your dependency tree is somehow wrong.
> You can either:
>
> - find a common goal that both war:init and site:deploy depend on and
> preGoal that;
> - split your preGoal content into 2 parts, one for site:deploy and one for
> war:init (they seem to be the same? what's in it?)
> - create your own goals:
>
> <goal name="init">
> <!-- put your preGoal contents here -->
> </goal>
>
> <goal name="war" prereqs="init">
> <attainGoal name="war:war"/>
> </goal>
>
> <goal name="sitedeploy" prereqs="init">
> ...
> </goal>
>
> - place the preGoal code in a goal and attain that (preferred solution I
> think)
>
> <goal name="init">
> <!--pregoal stuff-->
> </goal>
>
> <preGoal name="war:init">
> <attainGoal name="init"/>
> </preGoal>
>
> <preGoal name="site:deploy">
> <attainGoal name="init"/>
> </preGoal>
That's it, of course. Stupid me. Thank you very much.
Gisbert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: preGoal called before several goals - possible and how?
Posted by Kenney Westerhof <fo...@neonics.com>.
On Wed, 6 Jul 2005, Gisbert Amm wrote:
This isn't possible. Your dependency tree is somehow wrong.
You can either:
- find a common goal that both war:init and site:deploy depend on and
preGoal that;
- split your preGoal content into 2 parts, one for site:deploy and one for
war:init (they seem to be the same? what's in it?)
- create your own goals:
<goal name="init">
<!-- put your preGoal contents here -->
</goal>
<goal name="war" prereqs="init">
<attainGoal name="war:war"/>
</goal>
<goal name="sitedeploy" prereqs="init">
...
</goal>
- place the preGoal code in a goal and attain that (preferred solution I
think)
<goal name="init">
<!--pregoal stuff-->
</goal>
<preGoal name="war:init">
<attainGoal name="init"/>
</preGoal>
<preGoal name="site:deploy">
<attainGoal name="init"/>
</preGoal>
-- Kenney
> Hi Maveners,
>
> I need to call a preGoal in my maven.xml before two other goals. Is this
> possible? I tried whitespace and comma separated lists, like this
>
> <preGoal name="war:init site:deploy">
> ...
>
> <preGoal name="war:init, site:deploy">
> ...
>
> but both didn't work.
>
> As a workaround, I've put the piece of code I need twice in an XML
> entity but I'd rather like to avoid that.
>
> Any hint would be highly appreciated.
>
> Regards,
> Gisbert Amm
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org