If you do implement it as a plug-in then I'd suggest you create a plug-in that does not require a pom so you can do
mvn archetype:create customplugin:goal -DartifactId= ... You'll need '@requiresProject false' declared in your mojo impl javadoc. I think the 'create' mojo is deprecated also. Maybe you should use 'generate 'instead. -----Original Message----- From: Sagara Gunathunga [mailto:[email protected]] Sent: 25 February 2009 09:48 To: Maven Users List Subject: Re: How to execute Java task within a Archetype Hi Adam, Thanks again , I want to run a HTTP server within the generate goal and then genarate some HTTPClient codes , these client codes depend on the running HTTP server ,and not possible to package within the archetype as templates. I don't think hack the source code is a good choice here , because other people cant use my archetype with official Maven2 distro , so it seems like post process the custom task in to the new project's scope is the only solution here . I will try to achieve this as a plug-in . Thanks , On Wed, Feb 25, 2009 at 2:23 PM, Adam Leggett <[email protected]> wrote: > >> how can enforce Maven to execute custom task with " "mvn >> archetype:generate "..? >> > > generate is a goal of the archetype plug-in; AFAIK, you will need to > either hack the source code of the archetype plug-in itself to execute > some additional steps as part of the goal execution or post process the > generated project as indicated in my previous response. > > What exactly is your requirement here? What does your additional step > need to do? > > -- > Adam Leggett > BuildFactory Principal Architect > UPCO > Office: 0113 20 10 600 > Direct Line: 0113 20 10 631 > Mobile: 07801 269056 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Sagara Gunathunga Blog - ssagara.blogspot.com Web - http://sagaras.awardspace.com/ --------------------------------------------------------------------- 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]
