You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ra...@jpmchase.com on 2005/10/27 21:27:45 UTC

postgoal function in M2 Need Help?

Hi

I understand there is no pre/post goal things in M2, instead we have to do 
that in pom.xml plugin itself.

But how do i do more than one

for eg.

My needs is

1. Before compile i have generate a ejb home/remoteinterface .java files.
2. Then do regular javac compile
3. Then do ejbc compile which create some classes needed for weblogic.


so i used <phase>generate-source</phase> to create a .java files,
then i tried adding <phase>process-classes</phase> like these which comes 
after compilation in lifecycle, to do ejbc compile but what hppends is at 
my second phase again its trying to goback and do full lifecycle stating 
from validate... again i do understand this is coz of lifecycle

But my question is how do i do this thing without going thru the full 
lifecycle again, i mean i'm looking for a way to have (m1)postgoal like 
function in M2

Can any one please give me some example how to acheive this






Thanks,
Raghurajan Gurunathan

Re: postgoal function in M2 Need Help?

Posted by Edwin Punzalan <ep...@exist.com>.
Try removing the <phase> element in your pom.xml... The plugin authors 
should have setup their plugins to be bound to a lifecycle phase so you 
need not put the <phase> element in the configuration part of the plugin.

For example, if a plugin is bound to the generate-sources phase, then 
using "mvn compile" while having the plugin in your pom.xml will run the 
plugin before the generate-sources phase ends without having to put 
<phase> in the configuration.

Regarding the plugins docs, this is a goog place to start: 
http://maven.apache.org/maven2/guides/introduction/introduction-to-plugins.html



raghurajan.x.gurunathanv@jpmchase.com wrote:

>Hi
>
>I understand there is no pre/post goal things in M2, instead we have to do 
>that in pom.xml plugin itself.
>
>But how do i do more than one
>
>for eg.
>
>My needs is
>
>1. Before compile i have generate a ejb home/remoteinterface .java files.
>2. Then do regular javac compile
>3. Then do ejbc compile which create some classes needed for weblogic.
>
>
>so i used <phase>generate-source</phase> to create a .java files,
>then i tried adding <phase>process-classes</phase> like these which comes 
>after compilation in lifecycle, to do ejbc compile but what hppends is at 
>my second phase again its trying to goback and do full lifecycle stating 
>from validate... again i do understand this is coz of lifecycle
>
>But my question is how do i do this thing without going thru the full 
>lifecycle again, i mean i'm looking for a way to have (m1)postgoal like 
>function in M2
>
>Can any one please give me some example how to acheive this
>
>
>
>
>
>
>Thanks,
>Raghurajan Gurunathan
>
>  
>

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