Would it be OK if it runs after the archetype has been created? Afaik 
you can't have it run automatically, but you could add the parameter 
'goals' to the call 'archetype:generate' to run your mojo...

http://maven.apache.org/archetype/maven-archetype-plugin/generate-mojo.html#goals


On 19.04.2011 18:20, Gayard, Leonel wrote:
> Hi,
>
> The title of the message says it all. I'm currently trying to create an
> archetype.
>
> I understand that archetypes allow to generate new files from templates,
> using FreeMarker. But I'd like to be able to have some code, either in a
> Mojo or some quick script, that runs when the archetype is used to start
> a new project. Is this possible ? How to proceed ?
>
> I've also asked Stack Overflow, but no luck yet:
> http://stackoverflow.com/questions/5707677/making-a-maven-archetype-how-to-run-a-mojo-on-a-projects-generation
>
> Leonel
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asm...@adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------

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

Reply via email to