You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Zhou, Wei" <We...@intuit.com> on 2007/04/03 15:35:38 UTC

Is it possible to execute maven-jar-plugin in a different lifecycle phase than package phase?

Hi,

 

I need to build the jar file before my test code can be run. But Maven 2
only packages the jar file after the test code is run successfully. I
have tried to play with my pom file to move the maven-jar-plugin into an
earlier phase. But I have no luck. Does anyone know how to build a jar
file before the test phase?

 

Thanks!

Wei

 


Re: Is it possible to execute maven-jar-plugin in a different lifecycle phase than package phase?

Posted by Cheh L Hoo <ch...@gmail.com>.
Zhou, Wei wrote:
> Hi,
>
>  
>
> I need to build the jar file before my test code can be run. But Maven 2
> only packages the jar file after the test code is run successfully. I
> have tried to play with my pom file to move the maven-jar-plugin into an
> earlier phase. But I have no luck. Does anyone know how to build a jar
> file before the test phase?
>
>  
>
> Thanks!
>
> Wei
>
>  
>
>
>   
You can temporary turn off the test phase by mvn -Dmaven.test.skip=true 
clean package

Cheh

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


Re: Is it possible to execute maven-jar-plugin in a different lifecycle phase than package phase?

Posted by franz see <fr...@gmail.com>.
Good day to you, Wei,

You may want to bind your post-packaging tests in the integration-test
phase.

Cheers,
Franz


Zhou, Wei wrote:
> 
> Hi,
> 
>  
> 
> I need to build the jar file before my test code can be run. But Maven 2
> only packages the jar file after the test code is run successfully. I
> have tried to play with my pom file to move the maven-jar-plugin into an
> earlier phase. But I have no luck. Does anyone know how to build a jar
> file before the test phase?
> 
>  
> 
> Thanks!
> 
> Wei
> 
>  
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Is-it-possible-to-execute-maven-jar-plugin-in-a-different-lifecycle-phase-than-package-phase--tf3513652s177.html#a9821537
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: Is it possible to execute maven-jar-plugin in a different lifecycle phase than package phase?

Posted by nicolas de loof <ni...@gmail.com>.
Why don't you create the jar in another module, and set it as dependency ?

2007/4/3, Zhou, Wei <We...@intuit.com>:
>
> Hi,
>
>
>
> I need to build the jar file before my test code can be run. But Maven 2
> only packages the jar file after the test code is run successfully. I
> have tried to play with my pom file to move the maven-jar-plugin into an
> earlier phase. But I have no luck. Does anyone know how to build a jar
> file before the test phase?
>
>
>
> Thanks!
>
> Wei
>
>
>
>