Here is the snippet I was talking about:
http://www.nabble.com/m2%3A-Delegating-to-other-Mojo-tf1695516.html#a4602520
I haven't used @execute, but if it does the job - thats neat!
Cheers,
Rahul
----- Original Message -----
From: "Jason Dillon" <[EMAIL PROTECTED]>
To: "Maven Developers List" <[email protected]>
Sent: Tuesday, September 05, 2006 4:57 AM
Subject: Re: Anyway to call a goal from a mojo?
Code samples are always nice :-)
I did also run into '@execute goal=install' which appears to invoke
the 'install' goal of my plugin before the goal will execute.
This might work for my needs, though I'm not sure exactly how the
execution configuration relates to mojo's invoked in this manner.
Is this "feature" documented somewhere?
--jason
On Sep 3, 2006, at 8:47 PM, Rahul Thakur wrote:
You can use MavenEmbedder to do this. Pretty sure there was some
example code floating on the user@ or dev@ list.
I wrote a delegate mojo a while ago that does something similar but
don't have the code handy here, but I can dig later today if you are
keen at looking at it.
Cheers,
Rahul
Jason Dillon wrote:
Is there any (easy) way to call a goal from a mojo?
I've got a geronimo:install goal, that does some assembly
unpacking, and a geronimo:start goal which starts up the server.
geronimo:start really needs to call geronimo:install before it runs.
Is there an easy way to do this?
The only way I can think to share this code, is to add more
abstract classes to hold the methods... but that gets messy fast.
Any ideas?
--jason
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]