diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 142d95a..944f110 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -22,7 +22,11 @@
-
+
+
+
+
+
@@ -195,13 +199,6 @@
1598862102028
-
- 1598962802209
-
-
-
- 1598962802209
-
1599036875005
@@ -538,7 +535,14 @@
1601287462400
-
+
+ 1601287668529
+
+
+
+ 1601287668529
+
+
@@ -681,13 +685,13 @@
-
+
-
+
diff --git a/Dockerfile b/Dockerfile
index 77e2102..f47e507 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,14 +1,18 @@
-FROM openjdk:14 as builder
+FROM maven:3.6.3-jdk-14 as builder
WORKDIR application
-RUN java -Djarmode=layertools -jar ${project.build.finalName}.jar extract
+COPY ./ ./
+RUN mvn clean install
+
+FROM openjdk:14 as layerBuilder
+WORKDIR application
+ARG JAR_FILE=application/target/*.jar
+COPY --from=builder ${JAR_FILE} application.jar
+RUN java -Djarmode=layertools -jar application.jar extract
FROM openjdk:14
-LABEL PROJECT_NAME=${project.artifactId} \
- PROJECT=${project.id}
-
WORKDIR application
-COPY --from=builder application/dependencies/ ./
-COPY --from=builder application/spring-boot-loader/ ./
-COPY --from=builder application/snapshot-dependencies/ ./
-COPY --from=builder application/application/ ./
+COPY --from=layerBuilder application/dependencies/ ./
+COPY --from=layerBuilder application/spring-boot-loader/ ./
+COPY --from=layerBuilder application/snapshot-dependencies/ ./
+COPY --from=layerBuilder application/application/ ./
ENTRYPOINT ["java", "-Djava.security.cgd=file:/dev/./urandom", "org.springframework.boot.loader.JarLauncher"]
diff --git a/Jenkinsfile b/Jenkinsfile
index ff2e49a..790a007 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,11 +1,6 @@
pipeline {
agent any
stages {
- stage('build') {
- steps {
- sh "mvn clean package"
- }
- }
stage('docker-compose') {
steps {
sh "docker-compose build"