You are completely off standard maven behaviour. easiest solution is to create two files: myAlias.sh and myAlias.bat
myAlias.sh #!/bin/sh mvn clean:clean dependency:copy-dependencies ... myAlias.bat @mvn clean:clean dependency:copy-dependencies ... Either that or use ANT. Maven has a standardised lifecycle for a reason.... if you don't like the standardised lifecycle, either use ANT or change your preferences ;-) -Stephen On 17 May 2010 08:42, Frederic Camblor <fcamb...@gmail.com> wrote: > Hi all, > > I'm wondering if something in maven (a plugin for example) could help me to > chain different plugin goals, not bounded to the default maven lifecycle. > > My particular example is the fact that I'd want sort of maven alias > allowing > to say "when I launch 'mvn <myAlias>' I'd want to chain clean:clean, > dependency:copy-dependencies and other home made plugin not bound to the > default lifecycle (no need to validate, compile, package etc...)". > I just browsed the existing maven plugins in apache & codehaus and it > doesn't seem such a plugin exists. > > Am I completely off the standard maven behaviour ? > > I tried, too, to create a custom lifecycle in my "home made plugin", which > would call clean:clean and dependency:copy-dependencies before executing my > plugin main goal .. but I didn't succeeded due to the lack of documentation > about new lifecycle creation (not bound to existing "default", "clean" and > "site" lifecycles) :-( > *(In every maven plugins I looked at, only the maven release plugin seems > to > create its own new lifecycle ... but I admit this plugin seems really > complicated to understand !)* > Would you have some pointers/advice about this problematic ? > > Thanks in advance. > Frédéric >