You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Anders Hammar <an...@hammar.net> on 2009/12/01 06:05:18 UTC

Re: Can you assign a different name/id to an antrun goal?

No. The syntax is
 mvn phase
or
 mvn plugin:goal

But you could create a shell script/bat file with a better name which
executes "mvn antrun:run".

/Anders

On Mon, Nov 30, 2009 at 23:10, Jeff French <je...@mdbconsulting.com> wrote:

>
> I'm using the antrun plugin to let developers run an application after it
> has
> been packaged. So far I can only run it like so:
>
>    mvn antrun:run
>
> but would like to use a more appropriate name like:
>
>    mvn run-server
>
> Is there a way to assign a unique name?
>
> Thanks.
>
>     Jeff
> --
> View this message in context:
> http://old.nabble.com/Can-you-assign-a-different-name-id-to-an-antrun-goal--tp26582911p26582911.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Can you assign a different name/id to an antrun goal?

Posted by Jeff French <je...@mdbconsulting.com>.
Thanks for your suggestions everyone. I decided to go with the shell script
approach.

    Jeff


Stephen Connolly-2 wrote:
> 
> unless your profile specifies a defaultGoal of validate and you bind  
> your execution to the validate phase (hack)
> 
> Sent from my [rhymes with tryPod] ;-)
> 
> On 1 Dec 2009, at 06:07, Barrie Treloar <ba...@gmail.com> wrote:
> 
>> On Tue, Dec 1, 2009 at 4:36 PM, Barrie Treloar <ba...@gmail.com>  
>> wrote:
>>> On Tue, Dec 1, 2009 at 3:35 PM, Anders Hammar <an...@hammar.net>  
>>> wrote:
>>>> No. The syntax is
>>>>  mvn phase
>>>> or
>>>>  mvn plugin:goal
>>>>
>>>> But you could create a shell script/bat file with a better name  
>>>> which
>>>> executes "mvn antrun:run".
>>>
>>> Or you could use a profile.
>>>
>>> mvn -Prun-server
>>>
>>> where the profile would invoke your antrun:run goal.
>>
>> Buuuut it will still run the default lifecycle, so it may not work the
>> way you want afterall.
> 
> 

-- 
View this message in context: http://old.nabble.com/Can-you-assign-a-different-name-id-to-an-antrun-goal--tp26582911p26599454.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Can you assign a different name/id to an antrun goal?

Posted by Stephen Connolly <st...@gmail.com>.
unless your profile specifies a defaultGoal of validate and you bind  
your execution to the validate phase (hack)

Sent from my [rhymes with tryPod] ;-)

On 1 Dec 2009, at 06:07, Barrie Treloar <ba...@gmail.com> wrote:

> On Tue, Dec 1, 2009 at 4:36 PM, Barrie Treloar <ba...@gmail.com>  
> wrote:
>> On Tue, Dec 1, 2009 at 3:35 PM, Anders Hammar <an...@hammar.net>  
>> wrote:
>>> No. The syntax is
>>>  mvn phase
>>> or
>>>  mvn plugin:goal
>>>
>>> But you could create a shell script/bat file with a better name  
>>> which
>>> executes "mvn antrun:run".
>>
>> Or you could use a profile.
>>
>> mvn -Prun-server
>>
>> where the profile would invoke your antrun:run goal.
>
> Buuuut it will still run the default lifecycle, so it may not work the
> way you want afterall.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: Can you assign a different name/id to an antrun goal?

Posted by Barrie Treloar <ba...@gmail.com>.
On Tue, Dec 1, 2009 at 4:36 PM, Barrie Treloar <ba...@gmail.com> wrote:
> On Tue, Dec 1, 2009 at 3:35 PM, Anders Hammar <an...@hammar.net> wrote:
>> No. The syntax is
>>  mvn phase
>> or
>>  mvn plugin:goal
>>
>> But you could create a shell script/bat file with a better name which
>> executes "mvn antrun:run".
>
> Or you could use a profile.
>
> mvn -Prun-server
>
> where the profile would invoke your antrun:run goal.

Buuuut it will still run the default lifecycle, so it may not work the
way you want afterall.

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


Re: Can you assign a different name/id to an antrun goal?

Posted by Barrie Treloar <ba...@gmail.com>.
On Tue, Dec 1, 2009 at 3:35 PM, Anders Hammar <an...@hammar.net> wrote:
> No. The syntax is
>  mvn phase
> or
>  mvn plugin:goal
>
> But you could create a shell script/bat file with a better name which
> executes "mvn antrun:run".

Or you could use a profile.

mvn -Prun-server

where the profile would invoke your antrun:run goal.

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