I have three mechanisms in the same pom file which are put under different maven profiles.
-
Building Image with Spring Boot Build Plugin
mvn clean verify spring-boot:build-image
-
Building Image with Fabri8 :
mvn clean verify -DskipTests -Pbuild-with-fabric-8
-
Building Image with JIB :
mvn clean verify -DskipTests -Pbuild-with-jib