diff --git a/Jenkinsfile b/Jenkinsfile index fbaeac0bf7e884cd110466aa1c82ccef998add27..a286db1c89eaf8ccdacb21b76cca160f925d6ede 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -78,7 +78,7 @@ pipeline { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { - sh 'mvn -s $MAVEN_SETTINGS spring-boot:build-image -DskipTests -Dmaven.wagon.http.retryHandler.count=3 $BUILD_PROFILE -Ddocker.publishRegistry.username=${USER} -Ddocker.publishRegistry.password=${PASSWORD}' + sh 'mvn -s $MAVEN_SETTINGS spring-boot:build-image -DskipTests -Dmaven.wagon.http.retryHandler.count=3 $BUILD_PROFILE -Duser=${USER} -Dpassword=${PASSWORD}' } } } diff --git a/pom.xml b/pom.xml index bf0d99d37c9a8d9b9d22a2ffd7411925e7909b40..d0274c73c6f7c34374bda244928419e917d405c5 100644 --- a/pom.xml +++ b/pom.xml @@ -101,8 +101,8 @@ <publish>true</publish> </image> <publishRegistry> - <username>${docker.publishRegistry.username}</username> - <password>${docker.publishRegistry.password}</password> + <username>${user}</username> + <password>${password}</password> </publishRegistry> <excludes> <exclude>