diff options
author | Martin Stockhammer <martin_s@apache.org> | 2019-10-12 22:44:38 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2019-10-12 22:44:38 +0200 |
commit | ba2b4ffaf7fee71a8df9f44fdf9886b85adf84db (patch) | |
tree | 48bc6ed398d81d22d8fb9ff234d24c99703cfcd5 | |
parent | 8d800b6e1a1e9190356cc3c2bafa5af254239878 (diff) | |
download | archiva-ba2b4ffaf7fee71a8df9f44fdf9886b85adf84db.tar.gz archiva-ba2b4ffaf7fee71a8df9f44fdf9886b85adf84db.zip |
Fixing repository path
-rw-r--r-- | Jenkinsfile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index e3a5335ef..d1f23f197 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,7 @@ buildJdk10 = 'JDK 10 (latest)' buildJdk11 = 'JDK 11 (latest)' buildMvn = 'Maven 3.5.4' //localRepository = ".repository" -localRepository = "../.maven_repositories/${env.EXECUTOR_NUMBER}" +//localRepository = "../.maven_repositories/${env.EXECUTOR_NUMBER}" mavenOpts = '-Xms1g -Xmx2g -Djava.awt.headless=true' publishers = [artifactsPublisher(disabled: false), junitPublisher(disabled: false, ignoreAttachments: false), @@ -53,6 +53,9 @@ pipeline { parameters { booleanParam(name: 'PRECLEANUP', defaultValue: false, description: 'Clears the local maven repository before build.') } + environment { + LOCAL_REPOSITORY = "../.maven_repositories/${env.EXECUTOR_NUMBER}" + } stages { @@ -64,7 +67,7 @@ pipeline { } } steps { - sh "rm -rf ${localRepository}" + sh "rm -rf ${env.LOCAL_REPOSITORY}" } } @@ -76,7 +79,7 @@ pipeline { steps { timeout(120) { withMaven(maven: buildMvn, jdk: buildJdk, - mavenLocalRepo: localRepository, + mavenLocalRepo: env.LOCAL_REPOSITORY, publisherStrategy: 'EXPLICIT', mavenOpts: mavenOpts, options: publishers ) |