fixed retrieval of nexus credentials

This commit is contained in:
Ziver Koc 2024-09-17 22:54:34 +02:00
parent 60b8bdd8ac
commit 4cbbabd0e1
2 changed files with 7 additions and 4 deletions

3
Jenkinsfile vendored
View file

@ -17,7 +17,8 @@ pipeline {
steps{
withGradle {
sh "chmod +x ./gradlew"
sh "./gradlew ${gradleParams} -x test clean build"
sh "./gradlew ${gradleParams} clean"
sh "./gradlew ${gradleParams} -x test build"
}
}
}

View file

@ -11,9 +11,11 @@ publishing {
def releasesRepoUrl = 'http://oss.sonatype.org/service/local/staging/deploy/maven2/'
url = project.hasProperty('release') && !version.endsWith('SNAPSHOT') ? releasesRepoUrl : snapshotsRepoUrl
credentials {
username System.getenv('mavenCentralUsername')
password System.getenv('mavenCentralPassword')
if (project.hasProperty('mavenCentralUsername') && project.hasProperty('mavenCentralPassword')) {
credentials {
username project.property("mavenCentralUsername") as String
password project.property("mavenCentralPassword") as String
}
}
}
}