Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.08 KB

java.adoc

File metadata and controls

29 lines (19 loc) · 1.08 KB
layout title
solution
Jenkins and Java

Jenkins supports building Java projects since its inception, and for a reason! It’s both the language Jenkins is written in, plus the language in use by many if not all the projects Kohsuke Kawaguchi wanted to watch out when he created the tool many years ago.

If you want to build a Java project, there are a bunch of different options. The most typical ones nowadays are generally Apache Maven, or Gradle.

Apache Maven

In any FreeStyle job, as currently Maven is supported in standard, you can use the dedicated step. One advantage is, as for all Jenkins tools, that you can select a specific Maven version and have Jenkins automatically install it on the build node it’s going to run on.

Jenkins Maven step

Gradle

As the associated plugin is not installed by default, first install the plugin:gradle[Gradle plugin]. Once done, you should be able to add a Gradle step.

Jenkins Gradle step