From 73e21b17b756e9424d751ae9683d57ac94eea20d Mon Sep 17 00:00:00 2001 From: Ng Heng Khai Date: Sat, 4 May 2024 10:11:46 +0800 Subject: [PATCH] Update Dockerfile Changed to use Verify instead of Install Maven lifecycle phase instead. --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1bcdbb3..6e78f3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,11 @@ RUN ./mvnw dependency:go-offline COPY src ./src # Compile the Java application, then generate the deployment jar file. -RUN ./mvnw clean install -DskipTests +# The Maven basic phases in order: Validate, Compile, Test, Package, Verify, Install, Deploy. +# The verify command executes each default lifecycle phase in order (validate, compile, package, etc.), before executing verify. +# In most cases the effect is the same as package. However, in case there are integration tests, these will be executed as well. +# During the verify phase some additional checks can be done, e.g. if your code is written according to the predefined checkstyle rules. +RUN ./mvnw clean verify -DskipTests # The base image to package. This is a multi-stage build using a new context. FROM eclipse-temurin:21-jdk-jammy