diff --git a/Jenkinsfile b/Jenkinsfile
index a286db1c89eaf8ccdacb21b76cca160f925d6ede..fbaeac0bf7e884cd110466aa1c82ccef998add27 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 -Duser=${USER} -Dpassword=${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}'
                     }
                 }
             }
diff --git a/pom.xml b/pom.xml
index d0274c73c6f7c34374bda244928419e917d405c5..89d4a97d80f277dcc4e435f5bfae91a2c8a8c330 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,20 +96,22 @@
 				<groupId>org.springframework.boot</groupId>
 				<artifactId>spring-boot-maven-plugin</artifactId>
 				<configuration>
-					<image>
-						<name>${imageName}:${env.BRANCH_NAME}-${project.version}</name>
-						<publish>true</publish>
-					</image>
-                        <publishRegistry>
-							<username>${user}</username>
-							<password>${password}</password>
-                        </publishRegistry>
-					<excludes>
-						<exclude>
-							<groupId>org.projectlombok</groupId>
-							<artifactId>lombok</artifactId>
-						</exclude>
-					</excludes>
+				<image>
+					<name>${imageName}:${env.BRANCH_NAME}-${project.version}</name>
+					<publish>true</publish>
+				</image>
+				<docker>
+					<publishRegistry>
+						<username>${docker.publishRegistry.username}</username>
+						<password>${docker.publishRegistry.password}</password>
+					</publishRegistry>
+				</docker>
+				<excludes>
+					<exclude>
+						<groupId>org.projectlombok</groupId>
+						<artifactId>lombok</artifactId>
+					</exclude>
+				</excludes>
 				</configuration>
 			</plugin>
 		</plugins>