File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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: 17280

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Jenkins conditional steps for maven project
jQuery in Action, 3rd edition