aspose file tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Jenkins conditional steps for maven project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Jenkins conditional steps for maven project" Watch "Jenkins conditional steps for maven project" New topic

Jenkins conditional steps for maven project

varun srivastv

Joined: Oct 15, 2009
Posts: 16

I use Jenkins for continuous integration.

How can I run conditional steps with Maven projects ? For free style projects I am able to set up conditional steps but this seems not available with Maven projects.

Additionally I also want to publish findbugs/pmd reports conditionally in maven projects. Again this looks possible using flexible publish plugin only for free style projects.

Any help would be highly appreciated.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16395

Maven is designed with the idea that essentially all builds are identical. The concept of "conditional" building is mostly foreign to it, although I admit I've done the occasional POM that allowed me to build for a specific deployment target.

Regardless, you can customize a Maven build by setting command-line definitions such as profile specifications and Jenkins has a place to provide such options.

In the case of testing, you may also be able to control the process by selecting specific Maven goals. Once again, they will be passed to the Maven "command line" by Jenkins.

Customer surveys are for companies who didn't pay proper attention to begin with.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Jenkins conditional steps for maven project