Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Configuring the Maven Release Plugin to Skip Tests

DZone's Guide to

Configuring the Maven Release Plugin to Skip Tests

Skipping the execution of tests during the Release plugin execution might improve your release time because the Maven Release Plugin already executes the same tests twice.

· DevOps Zone
Free Resource

Download “The DevOps Journey - From Waterfall to Continuous Delivery” to learn about the importance of integrating automated testing into the DevOps workflow, brought to you in partnership with Sauce Labs.

If you are using Maven in addition to the Maven Release Plugin, it is in your best interest to skip the execution of tests during the Release plugin execution. There are many very different reasons why you may need to do this, but it may depend on the nature of the project or how the CI pipeline is implemented.

Note that this might be able to bring a great improvement in your release time since performing the release with the Maven Release Plugin implies executing the same tests twice: once in the Prepare step and then once more in the Perform step.

If you would like to avoid executing tests in the Prepare phase, then you need to run it like so:

mvn -DpreparationGoals=clean release:prepare

If you would like to avoid executing tests during the Perform phase, then you need to run it like so:

mvn -Darguments="-Dmaven.test.skip=true" release:perform

It is important to note that I am not saying that you don't need to execute tests during the Release process. Instead, what I am saying is that this might be a good idea if your Release process doesn't fit the standard Release process of the plugin and, for example, you are already running tests before you have executed the plugin.

Discover how to optimize your DevOps workflows with our cloud-based automated testing infrastructure, brought to you in partnership with Sauce Labs

Topics:
maven assembly plugin example ,jquery date and time picker plugins ,why assembly plugin ,2016 and 2017 with release dates ,maven release plugin ,maven

Published at DZone with permission of Alex Soto, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}