2014年2月17日星期一

mvn clean package -Dmaven.test.skip=true





Skip your tests with maven release plugin


The maven release plugin becomes often very handy. However, in its default configuration all relevent maven lifecycle phases are performed including the verify phase. Here, all your tests – if any available – are compiled and run as well. In my particular case, I just wanted to perform the release without the test steps.
This is what you need to do:
  1. Preparing   – mvn -DpreparationGoals=clean -DscmCommentPrefix="XXX" release:prepare
  2. Performing – mvn -Darguments="-Dmaven.test.skip=true" release:perform
The prepare goal will only perform the clean lifecycle. You may of course define other lifecycle phases as well unless they include testing activities. The perform goal is a different story. Here we make use of the arguments parameter providing some input for the underlying phases deploy and site-deploy run by the perform goal.
Cheers

没有评论:

发表评论