diff --git a/Jenkinsfile b/Jenkinsfile
index 15e61a20f..165441e0f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -3,6 +3,9 @@ pipeline {
options {
timeout(time: 30, unit: 'MINUTES')
}
+ tools {
+ maven 'Maven 3'
+ }
environment {
REPO_NAME = sh(returnStdout: true, script: 'basename `git remote get-url origin` .git').trim()
@@ -42,15 +45,8 @@ pipeline {
}
}
script {
- server = Artifactory.server 'HeiGIT Repo'
- rtMaven = Artifactory.newMavenBuild()
-
- rtMaven.resolver server: server, releaseRepo: 'main', snapshotRepo: 'main'
- rtMaven.deployer server: server, releaseRepo: 'libs-release-local', snapshotRepo: 'libs-snapshot-local'
- rtMaven.deployer.deployArtifacts = false
-
withCredentials([string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')]) {
- buildInfo = rtMaven.run pom: 'pom.xml', goals: '$MAVEN_GENERAL_OPTIONS clean compile javadoc:jar source:jar verify -P jacoco,sign,git -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS -Dgpg.passphrase=$PASSPHRASE'
+ sh 'mvn $MAVEN_GENERAL_OPTIONS clean compile javadoc:jar source:jar verify -P jacoco,sign,git -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS -Dgpg.passphrase=$PASSPHRASE'
}
}
}
@@ -95,7 +91,7 @@ pipeline {
// warnings plugin
// START CUSTOM oshdb
// CUSTOM: use test-compile
- rtMaven.run pom: 'pom.xml', goals: '$MAVEN_GENERAL_OPTIONS -V -e test-compile checkstyle:checkstyle pmd:pmd pmd:cpd spotbugs:spotbugs -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS'
+ sh 'mvn $MAVEN_GENERAL_OPTIONS -V -e test-compile checkstyle:checkstyle pmd:pmd pmd:cpd spotbugs:spotbugs -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS'
// END CUSTOM oshdb
recordIssues enabledForFailure: true, tools: [mavenConsole(), java(), javaDoc()]
@@ -122,12 +118,13 @@ pipeline {
script {
// START CUSTOM oshdb
// CUSTOM: added withDep profile
- withCredentials([string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')]) {
- buildInfo = rtMaven.run pom: 'pom.xml', goals: '$MAVEN_GENERAL_OPTIONS clean compile javadoc:jar source:jar install -P sign,git,withDep -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
+ withCredentials([
+ file(credentialsId: 'nexus-settings', variable: 'settingsFile'),
+ string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')
+ ]) {
+ sh 'mvn $MAVEN_GENERAL_OPTIONS clean compile -s $settingsFile javadoc:jar source:jar deploy -P sign,git,withDep -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
}
// END CUSTOM oshdb
- rtMaven.deployer.deployArtifacts buildInfo
- server.publishBuildInfo buildInfo
SNAPSHOT_DEPLOY = true
}
}
@@ -148,12 +145,13 @@ pipeline {
script {
// START CUSTOM oshdb
// CUSTOM: added withDep profile
- withCredentials([string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')]) {
- buildInfo = rtMaven.run pom: 'pom.xml', goals: '$MAVEN_GENERAL_OPTIONS clean compile javadoc:jar source:jar install -P sign,git,withDep -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
+ withCredentials([
+ file(credentialsId: 'nexus-settings', variable: 'settingsFile'),
+ string(credentialsId: 'gpg-signing-key-passphrase', variable: 'PASSPHRASE')
+ ]) {
+ sh 'mvn $MAVEN_GENERAL_OPTIONS clean compile -s $settingsFile javadoc:jar source:jar deploy -P sign,git,withDep -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS -Dgpg.passphrase=$PASSPHRASE -DskipTests=true'
}
// END CUSTOM oshdb
- rtMaven.deployer.deployArtifacts buildInfo
- server.publishBuildInfo buildInfo
RELEASE_DEPLOY = true
}
withCredentials([
@@ -221,12 +219,12 @@ pipeline {
steps {
script {
// load dependencies to artifactory
- rtMaven.run pom: 'pom.xml', goals: '$MAVEN_GENERAL_OPTIONS org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS'
+ sh 'mvn $MAVEN_GENERAL_OPTIONS org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS'
javadc_dir = "/srv/javadoc/java/" + REPO_NAME + "/" + VERSION + "/"
echo javadc_dir
- rtMaven.run pom: 'pom.xml', goals: '$MAVEN_GENERAL_OPTIONS clean javadoc:javadoc -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS'
+ sh 'mvn $MAVEN_GENERAL_OPTIONS clean javadoc:javadoc -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS'
sh "echo ${javadc_dir}"
// make sure jenkins uses bash not dash!
sh "mkdir -p ${javadc_dir} && rm -Rf ${javadc_dir}* && find . -path '*/target/site/apidocs' -exec cp -R --parents {} ${javadc_dir} \\; && find ${javadc_dir} -path '*/target/site/apidocs' | while read line; do echo \$line; neu=\${line/target\\/site\\/apidocs/} ; mv \$line/* \$neu ; done && find ${javadc_dir} -type d -empty -delete"
@@ -235,7 +233,7 @@ pipeline {
// START CUSTOM oshdb
script {
javadc_dir = javadc_dir + "aggregated/"
- rtMaven.run pom: 'pom.xml', goals: '$MAVEN_GENERAL_OPTIONS --update-snapshots clean javadoc:aggregate -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS'
+ sh 'mvn $MAVEN_GENERAL_OPTIONS --update-snapshots clean javadoc:aggregate -Dmaven.repo.local=.m2 $MAVEN_TEST_OPTIONS'
sh "mkdir -p ${javadc_dir} && rm -Rf ${javadc_dir}* && find . -path './target/site/apidocs' -exec cp -R --parents {} ${javadc_dir} \\; && find ${javadc_dir} -path '*/target/site/apidocs' | while read line; do echo \$line; neu=\${line/target\\/site\\/apidocs/} ; mv \$line/* \$neu ; done && find ${javadc_dir} -type d -empty -delete"
}
// END CUSTOM oshdb
diff --git a/pom.xml b/pom.xml
index 7af17147c..dc6d82099 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.heigit.ohsome
ohsome-parent
- 2.13.1
+ 2.14.0
oshdb-parent
@@ -79,10 +79,9 @@
-
- HeiGIT main
- Central Repository for OSHDB dependency related artefacts
- https://repo.heigit.org/artifactory/main
+ heigit-nexus-public
+ HeiGIT maven repositories
+ https://nexus.heigit.org/repository/maven-public/