is the message from your friendly neighbourhood Apache Maven PMC member and
Jenkins committer!

Two options:
1. (oldschool) Freestyle Job with a Maven build step
2. (coolkids) Multibranch Pipeline Job with a Jenkinsfile in the
repository... At present the Jenkinsfile will have to invoke Maven via a
shell/batch step... which gets a tad ugly

node() {
  withMaven(...) {
  if (isUnix()) {
    sh 'mvn clean verify'
  } else {
    bat 'mvn clean verify'
  junit '**/target/surefire-reports/*.xml, **/target/failsafe-reports/*.xml'
  // plus whatever else you are having yourself

There is a dedicated `mvn` step in the works... not here yet... and there
is a newer better syntax for Jenkinsfile in progress:

So hopefully, you'll soon be able to do

pipeline {
  agent label:'linux'
  stages {
    stage('Build') {
      // the syntax to specify the Maven tool version is still in progress
      steps {
        mvn 'clean verify'
        // remains to be seen if the `mvn` step will auto-junit
  notifications {
    always {
      mail ...

On 13 October 2016 at 14:59, Benson Margulies <> wrote:

> We've about had it with bamboo, and are dusting off our old Jenkins
> instance.
> I recall some messages here about things _not_ to do with Jenkins and
> Maven. Do we avoid the 'maven build type' altogether and just run
> Maven from the shell, or is my memory faulty? Anything else.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Reply via email to