You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2022/08/21 11:11:01 UTC
[maven-jenkins-lib] branch master updated: remove use of withMaven simplify with use withEnv
This is an automated email from the ASF dual-hosted git repository.
olamy 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 d811842 remove use of withMaven simplify with use withEnv
d811842 is described below
commit d81184255b1f9fd314c7e879e1d9a451ca6f2b23
Author: Olivier Lamy <ol...@apache.org>
AuthorDate: Sun Aug 21 21:10:56 2022 +1000
remove use of withMaven simplify with use withEnv
invoker generate junit files as well
---
vars/asfMavenTlpPlgnBuild.groovy | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/vars/asfMavenTlpPlgnBuild.groovy b/vars/asfMavenTlpPlgnBuild.groovy
index 6b2a7b1..90e5c52 100644
--- a/vars/asfMavenTlpPlgnBuild.groovy
+++ b/vars/asfMavenTlpPlgnBuild.groovy
@@ -199,16 +199,11 @@ def doCreateTask( os, jdk, maven, tasks, first, plan, taskContext )
} else try {
def localRepo = "../.maven_repositories/${env.EXECUTOR_NUMBER}"
println "Local Repo (${stageId}): ${localRepo}"
- withMaven(jdk:jdkName, maven:mvnName, mavenLocalRepo:localRepo, options: [
- artifactsPublisher(disabled: disablePublishers),
- junitPublisher(ignoreAttachments: false),
- findbugsPublisher(disabled: disablePublishers),
- openTasksPublisher(disabled: disablePublishers),
- dependenciesFingerprintPublisher(disabled: disablePublishers),
- invokerPublisher(),
- pipelineGraphPublisher(disabled: disablePublishers),
- mavenLinkerPublisher(disabled: false)
- ], publisherStrategy: 'EXPLICIT') {
+ cmd += " -Dmaven.repo.local=../.maven_repositories/${env.EXECUTOR_NUMBER}"
+ cmd += " -Dinvoker.writeJunitReport=true"
+ withEnv(["JAVA_HOME=${ tool "$jdkName" }",
+ "PATH+MAVEN=${ tool "$jdk" }/bin:${tool "$mvnName"}/bin",
+ "MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
dir (stageDir) {
if (isUnix()) {
sh 'df -hT'
@@ -233,6 +228,7 @@ def doCreateTask( os, jdk, maven, tasks, first, plan, taskContext )
echo "[FAIL FAST] ${taskContext.failingFast} had first failure, ignoring ${e.message}"
}
} finally {
+ junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml', allowEmptyResults: true
cleanWs()
}
}