You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Trevor Harmon <th...@perronerobotics.com> on 2008/10/02 20:54:15 UTC

Specifying a dependent goal for exec goals

Consider these commands:

mvn clean
mvn exec:java

The second line fails because the classes aren't there. it needs to be:

mvn clean
mvn install
mvn exec:java

Is there some way of having Maven run the install goal automatically?  
That is, I want to specify that the install goal must always run  
before exec:java does. I tried using the <phase> parameter but had no  
success.

Trevor


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


Re: Specifying a dependent goal for exec goals

Posted by Brett Porter <br...@gmail.com>.
The only way is to go the other way around, ie to bind exec:java to
the install phase. Then run "mvn install"

If you don't always want to run that command, you could put it in a
profile so it would be "mvn -PexecPurpose install"

- Brett

2008/10/3 Trevor Harmon <th...@perronerobotics.com>:
> Consider these commands:
>
> mvn clean
> mvn exec:java
>
> The second line fails because the classes aren't there. it needs to be:
>
> mvn clean
> mvn install
> mvn exec:java
>
> Is there some way of having Maven run the install goal automatically? That
> is, I want to specify that the install goal must always run before exec:java
> does. I tried using the <phase> parameter but had no success.
>
> Trevor
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

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