[maven-jenkins-lib] branch master updated: build the command line in more extensible way

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[maven-jenkins-lib] branch master updated: build the command line in more extensible way

stephenc
This is an automated email from the ASF dual-hosted git repository.

stephenc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jenkins-lib.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f4eb1b  build the command line in more extensible way
8f4eb1b is described below

commit 8f4eb1b9fee2217c81d47e6439754fb36e84dfaa
Author: Stephen Connolly <[hidden email]>
AuthorDate: Thu Nov 30 12:26:59 2017 +0000

    build the command line in more extensible way
---
 vars/asfMavenTlpStdBuild.groovy | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/vars/asfMavenTlpStdBuild.groovy b/vars/asfMavenTlpStdBuild.groovy
index 27b5bd0..09f42e7 100644
--- a/vars/asfMavenTlpStdBuild.groovy
+++ b/vars/asfMavenTlpStdBuild.groovy
@@ -56,6 +56,17 @@ def call(Map params = [:]) {
               }
             }
             stage("Build ${stageId}") {
+              def cmd = [
+                'mvn',
+                '-P+run-its',
+                '-Dmaven.test.failure.ignore=true',
+                '-Dfindbugs.failOnError=false',
+              ]
+              if (!first) {
+                cmd += '-Dfindbugs.skip=true'
+              }
+              cmd += 'clean'
+              cmd += 'verify'
               withMaven(jdk:jdkName, maven:mvnName, mavenLocalRepo:'.repository', options: [
                 artifactsPublisher(disabled: !first),
                 junitPublisher(ignoreAttachments: false),
@@ -67,9 +78,9 @@ def call(Map params = [:]) {
               ]) {
                 dir ('m') {
                   if (isUnix()) {
-                    sh "mvn clean verify -Dmaven.test.failure.ignore=true -Dfindbugs.failOnError=false -Dfindbugs.skip=${!first} -P+run-its"
+                    sh cmd.join(' ')
                   } else {
-                    bat "mvn clean verify -Dmaven.test.failure.ignore=true -Dfindbugs.failOnError=false -Dfindbugs.skip=${!first} -P+run-its"
+                    bat cmd.join(' ')
                   }
                 }
               }

--
To stop receiving notification emails like this one, please contact
['"[hidden email]" <[hidden email]>'].