You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andreas Hartmann <an...@apache.org> on 2009/10/20 14:13:22 UTC

Call goal sequence independent from default lifecycle

Dear Maven community,

Maven version: 2.0.9

I'd like to execute a sequence of goals (plugins) on demand, independent 
from the default project lifecycle, i.e. using a command like

   mvn import-sql

Calling the individual plugins from the command line is tedious and 
takes a lot of execution time. Is it possible to define a custom 
lifecycle phase or something similar? Or do I have to use a shell script 
which calls the individual goals?

Thanks for any feedback,

-- Andreas



-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01

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


Re: Call goal sequence independent from default lifecycle

Posted by Andreas Hartmann <an...@apache.org>.
Hi Anders,

Anders Hammar schrieb:
> No, you can't define a new phase. If executing these goals are in fact part
> of the build, you should map them to appropriate phases. If not, you can
> execute them on the same command row like this (eitehr manuelly or in a
> shell script):
> mvn plugin1:goal1 plugin2:goal2 plugin3:goal3
> 
> You can put configuration for the plugins in the pluginManagement section of
> your pom and that will be used.

thanks for your reply. I've written a small shell script to call the 
goals. The hint about adding multiple goals to the command line helped.

-- Andreas


> 
> /Anders
> 
> On Tue, Oct 20, 2009 at 14:13, Andreas Hartmann <an...@apache.org> wrote:
> 
>> Dear Maven community,
>>
>> Maven version: 2.0.9
>>
>> I'd like to execute a sequence of goals (plugins) on demand, independent
>> from the default project lifecycle, i.e. using a command like
>>
>>  mvn import-sql
>>
>> Calling the individual plugins from the command line is tedious and takes a
>> lot of execution time. Is it possible to define a custom lifecycle phase or
>> something similar? Or do I have to use a shell script which calls the
>> individual goals?
>>
>> Thanks for any feedback,
>>
>> -- Andreas
>>
>>
>>
>> --
>> Andreas Hartmann, CTO
>> BeCompany GmbH
>> http://www.becompany.ch
>> Tel.: +41 (0) 43 818 57 01
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01

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


Re: Call goal sequence independent from default lifecycle

Posted by Anders Hammar <an...@hammar.net>.
No, you can't define a new phase. If executing these goals are in fact part
of the build, you should map them to appropriate phases. If not, you can
execute them on the same command row like this (eitehr manuelly or in a
shell script):
mvn plugin1:goal1 plugin2:goal2 plugin3:goal3

You can put configuration for the plugins in the pluginManagement section of
your pom and that will be used.

/Anders

On Tue, Oct 20, 2009 at 14:13, Andreas Hartmann <an...@apache.org> wrote:

> Dear Maven community,
>
> Maven version: 2.0.9
>
> I'd like to execute a sequence of goals (plugins) on demand, independent
> from the default project lifecycle, i.e. using a command like
>
>  mvn import-sql
>
> Calling the individual plugins from the command line is tedious and takes a
> lot of execution time. Is it possible to define a custom lifecycle phase or
> something similar? Or do I have to use a shell script which calls the
> individual goals?
>
> Thanks for any feedback,
>
> -- Andreas
>
>
>
> --
> Andreas Hartmann, CTO
> BeCompany GmbH
> http://www.becompany.ch
> Tel.: +41 (0) 43 818 57 01
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>