From 8e2985b96a9b532e28474e7291bd544016041bf9 Mon Sep 17 00:00:00 2001 From: "CORP\\sujithna" Date: Thu, 3 Dec 2020 12:05:59 +0530 Subject: [PATCH 01/17] google jib added to create image using maven --- .../resources/archetype-resources/api/pom.xml | 12 +++++++ .../resources/archetype-resources/pom.xml | 35 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/templates/server/src/main/resources/archetype-resources/api/pom.xml b/templates/server/src/main/resources/archetype-resources/api/pom.xml index 87422fa3..76de6e53 100644 --- a/templates/server/src/main/resources/archetype-resources/api/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/api/pom.xml @@ -42,4 +42,16 @@ test + + + + com.google.cloud.tools + jib-maven-plugin + + + true + + + + diff --git a/templates/server/src/main/resources/archetype-resources/pom.xml b/templates/server/src/main/resources/archetype-resources/pom.xml index 928bb425..1b48243f 100644 --- a/templates/server/src/main/resources/archetype-resources/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/pom.xml @@ -328,6 +328,41 @@ + + docker + + + + com.google.cloud.tools + jib-maven-plugin + 2.6.0 + + + adoptopenjdk/openjdk11:jre-11.0.4_11-alpine + + + ${project.name}/java:${project.version} + + + com.devonfw.application.mtsj.SpringBootApp + + 8081 + + OCI + + + + + package + + dockerBuild + + + + + + + moduletest From f4e58ea2bae5f8b4a26f0bd3158d3e8cbf40bec5 Mon Sep 17 00:00:00 2001 From: "CORP\\sujithna" Date: Thu, 3 Dec 2020 12:10:48 +0530 Subject: [PATCH 02/17] google jib added to create image using maven --- .../resources/archetype-resources/server/pom.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/templates/server/src/main/resources/archetype-resources/server/pom.xml b/templates/server/src/main/resources/archetype-resources/server/pom.xml index cc0edbac..c12c122b 100644 --- a/templates/server/src/main/resources/archetype-resources/server/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/server/pom.xml @@ -18,13 +18,13 @@ ${rootArtifactId}-core ${project.version} -#if ($batch == 'batch') + #if ($batch == 'batch') ${project.groupId} ${rootArtifactId}-batch ${project.version} -#end + #end com.devonfw.java.modules @@ -145,7 +145,14 @@ - + + com.google.cloud.tools + jib-maven-plugin + + + true + + From d5b4e723d946d2b1766eba92f38d9a896e5aff01 Mon Sep 17 00:00:00 2001 From: "CORP\\sujithna" Date: Fri, 12 Feb 2021 15:21:21 +0530 Subject: [PATCH 03/17] variables added for the base image and version. prepared user guide. --- documentation/guide-jib.asciidoc | 52 ++++++++++++++++++ .../archetype-resources/core/pom.xml | 33 +++++------ .../resources/archetype-resources/pom.xml | 55 +++++++------------ 3 files changed, 89 insertions(+), 51 deletions(-) create mode 100644 documentation/guide-jib.asciidoc diff --git a/documentation/guide-jib.asciidoc b/documentation/guide-jib.asciidoc new file mode 100644 index 00000000..0ef16952 --- /dev/null +++ b/documentation/guide-jib.asciidoc @@ -0,0 +1,52 @@ +:toc: +toc::[] + += JIB +jib is a tool from Google to create Docker images in simple and faster way. No dockerfile or no docker compose file is required. Using Jib, image can be created and uploaded to the registery even without Docker daemon. + +The JIB maven plugin configured to build the image using mvn command. + +== Build and run the image locally +The Docker daemon should be available locally. + +To build the docker image. +[source] +---- +mvn compile jib:dockerBuild + +docker images + +REPOSITORY TAG IMAGE ID CREATED SIZE +myapp-server/java 0.0.1-SNAPSHOT c521c9800c48 51 years ago 206MB +myapp-api/java 0.0.1-SNAPSHOT 7004670aa31e 51 years ago 161MB +myapp-core/java 0.0.1-SNAPSHOT 82d949c3daa3 51 years ago 205MB +---- + +To run the image. + +[source] +---- +docker run --publish 8081:8081 +---- + +== Upload the image to the registery + +There is no docker daemon installed for this. + +[source] +---- +mvn compile jib:build +-Djib.to.image=//: +-Djib.to.auth.username= +-Djib.to.auth.password= + + +Eg: +mvn compile jib:build +-Djib.to.image=docker.io/devonfw/myapp-core:0.0.1-SNAPSHOT +-Djib.to.auth.username=devonfw +-Djib.to.auth.password=password + +---- + + diff --git a/templates/server/src/main/resources/archetype-resources/core/pom.xml b/templates/server/src/main/resources/archetype-resources/core/pom.xml index c32ec750..7160868c 100644 --- a/templates/server/src/main/resources/archetype-resources/core/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/core/pom.xml @@ -1,4 +1,5 @@ - + + 4.0.0 @@ -66,7 +67,7 @@ + --> org.springframework.boot spring-boot-starter-jdbc @@ -122,50 +123,50 @@ -#if ($dbType == 'h2') + #if ($dbType == 'h2') com.h2database h2 -#elseif ($dbType == 'hsqldb') + #elseif ($dbType == 'hsqldb') org.hsqldb hsqldb 2.4.0 -#elseif ($dbType == 'postgresql') + #elseif ($dbType == 'postgresql') org.postgresql postgresql - -#elseif ($dbType == 'mysql') + + #elseif ($dbType == 'mysql') mysql mysql-connector-java 8.0.8-dmr -#elseif ($dbType == 'mariadb') + #elseif ($dbType == 'mariadb') org.mariadb.jdbc mariadb-java-client 1.5.4 -#elseif ($dbType == 'hana') + #elseif ($dbType == 'hana') com.sap.cloud.db.jdbc ngdbc 2.3.48 -#elseif ($dbType == 'oracle') + #elseif ($dbType == 'oracle') com.oracle.jdbc ojdbc8 12.2.0.1 -#elseif ($dbType == 'mssql') + #elseif ($dbType == 'mssql') com.microsoft.sqlserver mssql-jdbc 6.4.0.jre8 -#else + #else $dbType $dbType TODO -#end + #end -#if ($dbType != 'h2') + #if ($dbType != 'h2') com.h2database h2 test -#end + #end @@ -230,7 +231,7 @@ embedded - true + true diff --git a/templates/server/src/main/resources/archetype-resources/pom.xml b/templates/server/src/main/resources/archetype-resources/pom.xml index 1b48243f..b82638bf 100644 --- a/templates/server/src/main/resources/archetype-resources/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/pom.xml @@ -323,46 +323,31 @@ spring-boot-maven-plugin ${spring.boot.version} + + com.google.cloud.tools + jib-maven-plugin + $[jib.version] + + + $[jib.docker.baseImage] + + + ${project.name}/java:${project.version} + + + ${package}.SpringBootApp + + 8081 + + OCI + + + - - docker - - - - com.google.cloud.tools - jib-maven-plugin - 2.6.0 - - - adoptopenjdk/openjdk11:jre-11.0.4_11-alpine - - - ${project.name}/java:${project.version} - - - com.devonfw.application.mtsj.SpringBootApp - - 8081 - - OCI - - - - - package - - dockerBuild - - - - - - - moduletest From 31e226a3cb40bbaad21de6fc78836c5d8d9bd692 Mon Sep 17 00:00:00 2001 From: sujith-mn <61968717+sujith-mn@users.noreply.github.com> Date: Mon, 15 Mar 2021 11:31:26 +0530 Subject: [PATCH 04/17] version upgraded --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index edc85f18..ac9b6d1d 100644 --- a/pom.xml +++ b/pom.xml @@ -37,6 +37,8 @@ 3.4.1 8.7.0 1.7.30 + 2.8.0 + adoptopenjdk/openjdk11:jre-11.0.4_11-alpine From f3d28b1768945e2250c9651c4d239ed142b3fed6 Mon Sep 17 00:00:00 2001 From: sujith-mn <61968717+sujith-mn@users.noreply.github.com> Date: Mon, 1 Mar 2021 18:31:17 +0530 Subject: [PATCH 05/17] fixing the format --- .../archetype-resources/core/pom.xml | 24 +++++++++---------- .../archetype-resources/server/pom.xml | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/templates/server/src/main/resources/archetype-resources/core/pom.xml b/templates/server/src/main/resources/archetype-resources/core/pom.xml index 7160868c..e783caae 100644 --- a/templates/server/src/main/resources/archetype-resources/core/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/core/pom.xml @@ -123,50 +123,50 @@ - #if ($dbType == 'h2') +#if ($dbType == 'h2') com.h2database h2 - #elseif ($dbType == 'hsqldb') +#elseif ($dbType == 'hsqldb') org.hsqldb hsqldb 2.4.0 - #elseif ($dbType == 'postgresql') +#elseif ($dbType == 'postgresql') org.postgresql postgresql - #elseif ($dbType == 'mysql') +#elseif($dbType == 'mysql') mysql mysql-connector-java 8.0.8-dmr - #elseif ($dbType == 'mariadb') +#elseif($dbType == 'mariadb') org.mariadb.jdbc mariadb-java-client 1.5.4 - #elseif ($dbType == 'hana') +#elseif($dbType == 'hana') com.sap.cloud.db.jdbc ngdbc 2.3.48 - #elseif ($dbType == 'oracle') +#elseif($dbType == 'oracle') com.oracle.jdbc ojdbc8 12.2.0.1 - #elseif ($dbType == 'mssql') +#elseif($dbType == 'mssql') com.microsoft.sqlserver mssql-jdbc 6.4.0.jre8 - #else +#else $dbType $dbType TODO - #end +#end - #if ($dbType != 'h2') +#if ($dbType != 'h2') com.h2database h2 test - #end +#end diff --git a/templates/server/src/main/resources/archetype-resources/server/pom.xml b/templates/server/src/main/resources/archetype-resources/server/pom.xml index c12c122b..eabf3634 100644 --- a/templates/server/src/main/resources/archetype-resources/server/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/server/pom.xml @@ -18,13 +18,13 @@ ${rootArtifactId}-core ${project.version} - #if ($batch == 'batch') +#if ($batch == 'batch') ${project.groupId} ${rootArtifactId}-batch ${project.version} - #end +#end com.devonfw.java.modules From 4ca1a2a9dfdfb0558273a465795ea834443a3f7a Mon Sep 17 00:00:00 2001 From: sujith-mn <61968717+sujith-mn@users.noreply.github.com> Date: Mon, 1 Mar 2021 18:37:36 +0530 Subject: [PATCH 06/17] formatted --- .../resources/archetype-resources/core/pom.xml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/templates/server/src/main/resources/archetype-resources/core/pom.xml b/templates/server/src/main/resources/archetype-resources/core/pom.xml index e783caae..c5b9c728 100644 --- a/templates/server/src/main/resources/archetype-resources/core/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/core/pom.xml @@ -1,5 +1,4 @@ - - + 4.0.0 @@ -134,23 +133,23 @@ org.postgresql postgresql -#elseif($dbType == 'mysql') +#elseif ($dbType == 'mysql') mysql mysql-connector-java 8.0.8-dmr -#elseif($dbType == 'mariadb') +#elseif ($dbType == 'mariadb') org.mariadb.jdbc mariadb-java-client 1.5.4 -#elseif($dbType == 'hana') +#elseif ($dbType == 'hana') com.sap.cloud.db.jdbc ngdbc 2.3.48 -#elseif($dbType == 'oracle') +#elseif ($dbType == 'oracle') com.oracle.jdbc ojdbc8 12.2.0.1 -#elseif($dbType == 'mssql') +#elseif ($dbType == 'mssql') com.microsoft.sqlserver mssql-jdbc 6.4.0.jre8 @@ -231,7 +230,7 @@ embedded - true + true From 9ea62b18ec52d5cf13a058488175848bd65d4d18 Mon Sep 17 00:00:00 2001 From: sujith-mn <61968717+sujith-mn@users.noreply.github.com> Date: Mon, 15 Mar 2021 11:35:03 +0530 Subject: [PATCH 07/17] version upgraded --- pom.xml | 5 +++++ .../resources/archetype-resources/api/pom.xml | 12 ----------- .../archetype-resources/core/pom.xml | 21 +++++++++++++++++++ .../resources/archetype-resources/pom.xml | 20 ++++++++++++++---- .../archetype-resources/server/pom.xml | 8 ------- 5 files changed, 42 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index ac9b6d1d..151f596a 100644 --- a/pom.xml +++ b/pom.xml @@ -32,6 +32,11 @@ 2020.0.0 2.11.2 +<<<<<<< HEAD +======= + 2.8.0 + adoptopenjdk/openjdk11:jre-11.0.4_11-alpine +>>>>>>> b4460f3 (mvn profile added for jib) 30.0-jre 5.7.0 3.4.1 diff --git a/templates/server/src/main/resources/archetype-resources/api/pom.xml b/templates/server/src/main/resources/archetype-resources/api/pom.xml index 76de6e53..87422fa3 100644 --- a/templates/server/src/main/resources/archetype-resources/api/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/api/pom.xml @@ -42,16 +42,4 @@ test - - - - com.google.cloud.tools - jib-maven-plugin - - - true - - - - diff --git a/templates/server/src/main/resources/archetype-resources/core/pom.xml b/templates/server/src/main/resources/archetype-resources/core/pom.xml index c5b9c728..56609dc1 100644 --- a/templates/server/src/main/resources/archetype-resources/core/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/core/pom.xml @@ -239,6 +239,27 @@ + + + container + + + + com.google.cloud.tools + jib-maven-plugin + ${jib.version} + + + compile + + ${jib.goal} + + + + + + + diff --git a/templates/server/src/main/resources/archetype-resources/pom.xml b/templates/server/src/main/resources/archetype-resources/pom.xml index b82638bf..0a9b8527 100644 --- a/templates/server/src/main/resources/archetype-resources/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/pom.xml @@ -20,6 +20,12 @@ $[guava.version] system ${revision}${changelist} + + $[jib.version] + $[jib.container.image] + 8081 + dockerBuild + @@ -323,13 +329,13 @@ spring-boot-maven-plugin ${spring.boot.version} - + com.google.cloud.tools jib-maven-plugin - $[jib.version] + ${jib.version} - $[jib.docker.baseImage] + ${jib.container.image} ${project.name}/java:${project.version} @@ -337,7 +343,7 @@ ${package}.SpringBootApp - 8081 + ${jib.app.port} OCI @@ -348,6 +354,12 @@ + + release + + build + + moduletest diff --git a/templates/server/src/main/resources/archetype-resources/server/pom.xml b/templates/server/src/main/resources/archetype-resources/server/pom.xml index eabf3634..550acbe9 100644 --- a/templates/server/src/main/resources/archetype-resources/server/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/server/pom.xml @@ -145,14 +145,6 @@ - - com.google.cloud.tools - jib-maven-plugin - - - true - - From d03ff8919410b94375d2acdd9fd84fa77a7aacaa Mon Sep 17 00:00:00 2001 From: sujith-mn <61968717+sujith-mn@users.noreply.github.com> Date: Fri, 5 Mar 2021 06:02:33 +0530 Subject: [PATCH 08/17] formatted, added to batch --- .../archetype-resources/__batch__/pom.xml | 23 ++++++++++++ .../resources/archetype-resources/api/pom.xml | 2 +- .../archetype-resources/core/pom.xml | 37 ++++++++++--------- .../resources/archetype-resources/pom.xml | 8 ++-- .../archetype-resources/server/pom.xml | 2 +- 5 files changed, 48 insertions(+), 24 deletions(-) diff --git a/templates/server/src/main/resources/archetype-resources/__batch__/pom.xml b/templates/server/src/main/resources/archetype-resources/__batch__/pom.xml index c9df8148..4cd5d13b 100644 --- a/templates/server/src/main/resources/archetype-resources/__batch__/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/__batch__/pom.xml @@ -52,4 +52,27 @@ + + + container + + + + com.google.cloud.tools + jib-maven-plugin + ${jib.version} + + + compile + + ${jib.goal} + + + + + + + + + diff --git a/templates/server/src/main/resources/archetype-resources/api/pom.xml b/templates/server/src/main/resources/archetype-resources/api/pom.xml index 87422fa3..bfa682e1 100644 --- a/templates/server/src/main/resources/archetype-resources/api/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/api/pom.xml @@ -5,7 +5,7 @@ ${groupId} ${rootArtifactId} - ${app.version} + ${app.version} ${rootArtifactId}-api jar diff --git a/templates/server/src/main/resources/archetype-resources/core/pom.xml b/templates/server/src/main/resources/archetype-resources/core/pom.xml index 56609dc1..5bf8d054 100644 --- a/templates/server/src/main/resources/archetype-resources/core/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/core/pom.xml @@ -1,11 +1,12 @@ - + + 4.0.0 ${groupId} ${rootArtifactId} - ${app.version} + ${app.version} ${rootArtifactId}-core jar @@ -165,7 +166,7 @@ h2 test -#end + #end @@ -230,7 +231,7 @@ embedded - true + true @@ -239,27 +240,27 @@ - + container - com.google.cloud.tools - jib-maven-plugin - ${jib.version} - - - compile - - ${jib.goal} - - - + com.google.cloud.tools + jib-maven-plugin + ${jib.version} + + + compile + + ${jib.goal} + + + - + - + diff --git a/templates/server/src/main/resources/archetype-resources/pom.xml b/templates/server/src/main/resources/archetype-resources/pom.xml index 0a9b8527..08f123f8 100644 --- a/templates/server/src/main/resources/archetype-resources/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/pom.xml @@ -20,12 +20,12 @@ $[guava.version] system ${revision}${changelist} - + $[jib.version] $[jib.container.image] 8081 dockerBuild - + @@ -329,7 +329,7 @@ spring-boot-maven-plugin ${spring.boot.version} - + com.google.cloud.tools jib-maven-plugin ${jib.version} @@ -354,7 +354,7 @@ - + release build diff --git a/templates/server/src/main/resources/archetype-resources/server/pom.xml b/templates/server/src/main/resources/archetype-resources/server/pom.xml index 550acbe9..43fb21df 100644 --- a/templates/server/src/main/resources/archetype-resources/server/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/server/pom.xml @@ -5,7 +5,7 @@ ${groupId} ${rootArtifactId} - ${app.version} + ${app.version} ${rootArtifactId}-server war From 0f7f5a43c77f12c20e1f5902a425ac126d9504ec Mon Sep 17 00:00:00 2001 From: sujith-mn <61968717+sujith-mn@users.noreply.github.com> Date: Thu, 4 Mar 2021 17:16:14 +0530 Subject: [PATCH 09/17] Updated guide --- documentation/guide-jib.asciidoc | 36 +++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/documentation/guide-jib.asciidoc b/documentation/guide-jib.asciidoc index 0ef16952..78d90efb 100644 --- a/documentation/guide-jib.asciidoc +++ b/documentation/guide-jib.asciidoc @@ -12,7 +12,7 @@ The Docker daemon should be available locally. To build the docker image. [source] ---- -mvn compile jib:dockerBuild +mvn compile -Pcontainer docker images @@ -33,19 +33,35 @@ docker run --publish 8081:8081 There is no docker daemon installed for this. +The registery details has to be configured in .m2/settings.xml. + [source] ---- -mvn compile jib:build --Djib.to.image=//: --Djib.to.auth.username= --Djib.to.auth.password= + + + //: + + + + + +eg:- -Eg: -mvn compile jib:build --Djib.to.image=docker.io/devonfw/myapp-core:0.0.1-SNAPSHOT --Djib.to.auth.username=devonfw --Djib.to.auth.password=password + + + docker.io/devonfw/myapp-core:0.0.1-SNAPSHOT + devonfw + password + + + +---- + +Run the below command to create and push the image to the image repository. +[source] +---- +mvn compile -P release ---- From fad6f19fb2bc891b9638764d4ffa67b5a50c8fa3 Mon Sep 17 00:00:00 2001 From: sujith-mn <61968717+sujith-mn@users.noreply.github.com> Date: Thu, 4 Mar 2021 17:18:31 +0530 Subject: [PATCH 10/17] Update guide-jib.asciidoc --- documentation/guide-jib.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/guide-jib.asciidoc b/documentation/guide-jib.asciidoc index 78d90efb..c295fe49 100644 --- a/documentation/guide-jib.asciidoc +++ b/documentation/guide-jib.asciidoc @@ -31,9 +31,9 @@ docker run --publish 8081:8081 == Upload the image to the registery -There is no docker daemon installed for this. +No docker daemon required to be installed on your machine for this. -The registery details has to be configured in .m2/settings.xml. +The first step is to configure the registery details in .m2/settings.xml. [source] ---- From 11fff2c9c74e47a155ebd6d266f07a8a8018cf23 Mon Sep 17 00:00:00 2001 From: sujith-mn <61968717+sujith-mn@users.noreply.github.com> Date: Fri, 5 Mar 2021 11:51:48 +0530 Subject: [PATCH 11/17] Update guide-jib.asciidoc --- documentation/guide-jib.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/guide-jib.asciidoc b/documentation/guide-jib.asciidoc index c295fe49..4ce47cd6 100644 --- a/documentation/guide-jib.asciidoc +++ b/documentation/guide-jib.asciidoc @@ -40,7 +40,7 @@ The first step is to configure the registery details in .m2/settings.xml. - //: + @@ -50,7 +50,7 @@ eg:- - docker.io/devonfw/myapp-core:0.0.1-SNAPSHOT + registry.hub.docker.com devonfw password @@ -61,7 +61,7 @@ eg:- Run the below command to create and push the image to the image repository. [source] ---- -mvn compile -P release +mvn compile -P release,container ---- From 52e7f619370da2c397882feefa7cd1d50fac7f97 Mon Sep 17 00:00:00 2001 From: sujith-mn <61968717+sujith-mn@users.noreply.github.com> Date: Fri, 5 Mar 2021 12:00:29 +0530 Subject: [PATCH 12/17] Update guide-jib.asciidoc --- documentation/guide-jib.asciidoc | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/documentation/guide-jib.asciidoc b/documentation/guide-jib.asciidoc index 4ce47cd6..39bdac67 100644 --- a/documentation/guide-jib.asciidoc +++ b/documentation/guide-jib.asciidoc @@ -45,18 +45,9 @@ The first step is to configure the registery details in .m2/settings.xml. - -eg:- - - - - registry.hub.docker.com - devonfw - password - - - ---- +Keep the password encrypted. Refer the documentation for the password encryption + https://maven.apache.org/guides/mini/guide-encryption.html Run the below command to create and push the image to the image repository. [source] From a3e5c6c103e21544c4f3228cfc9cbe8765dfba02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Fri, 5 Mar 2021 10:05:30 +0100 Subject: [PATCH 13/17] Update guide-jib.asciidoc --- documentation/guide-jib.asciidoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/guide-jib.asciidoc b/documentation/guide-jib.asciidoc index 39bdac67..15bf2eab 100644 --- a/documentation/guide-jib.asciidoc +++ b/documentation/guide-jib.asciidoc @@ -40,13 +40,13 @@ The first step is to configure the registery details in .m2/settings.xml. - - - + «registery» + «username» + «password» ---- -Keep the password encrypted. Refer the documentation for the password encryption +Keep the password encrypted (`mvn -ep`). Refer the documentation for the password encryption https://maven.apache.org/guides/mini/guide-encryption.html Run the below command to create and push the image to the image repository. From bed4bf2070f2431215b15e6b8ada0911bca2dc25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Fri, 5 Mar 2021 10:13:58 +0100 Subject: [PATCH 14/17] fixed indendation --- documentation/guide-jib.asciidoc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/documentation/guide-jib.asciidoc b/documentation/guide-jib.asciidoc index 15bf2eab..66b22b75 100644 --- a/documentation/guide-jib.asciidoc +++ b/documentation/guide-jib.asciidoc @@ -37,13 +37,12 @@ The first step is to configure the registery details in .m2/settings.xml. [source] ---- - - - «registery» - «username» - «password» - + + «registery» + «username» + «password» + ---- Keep the password encrypted (`mvn -ep`). Refer the documentation for the password encryption From 6c7dcd30ec29e7313941fb2ed739a6249152a790 Mon Sep 17 00:00:00 2001 From: sujith-mn <61968717+sujith-mn@users.noreply.github.com> Date: Mon, 15 Mar 2021 11:39:57 +0530 Subject: [PATCH 15/17] version upgraded --- pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pom.xml b/pom.xml index 151f596a..d98b935c 100644 --- a/pom.xml +++ b/pom.xml @@ -32,18 +32,13 @@ 2020.0.0 2.11.2 -<<<<<<< HEAD -======= 2.8.0 adoptopenjdk/openjdk11:jre-11.0.4_11-alpine ->>>>>>> b4460f3 (mvn profile added for jib) 30.0-jre 5.7.0 3.4.1 8.7.0 1.7.30 - 2.8.0 - adoptopenjdk/openjdk11:jre-11.0.4_11-alpine From 7c81de5e7738ea39266400c28b2b49e3de6a7fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Fri, 5 Mar 2021 10:17:09 +0100 Subject: [PATCH 16/17] Update pom.xml --- .../src/main/resources/archetype-resources/pom.xml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/templates/server/src/main/resources/archetype-resources/pom.xml b/templates/server/src/main/resources/archetype-resources/pom.xml index 08f123f8..78525628 100644 --- a/templates/server/src/main/resources/archetype-resources/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/pom.xml @@ -20,23 +20,21 @@ $[guava.version] system ${revision}${changelist} - $[jib.version] $[jib.container.image] 8081 dockerBuild - api core - #if ($earProjectName != '.') +#if ($earProjectName != '.') ${earProjectName} - #end - #if ($batch == 'batch') +#end +#if ($batch == 'batch') batch - #end +#end server From d1eaad4be57b29b0f52d821e61ea7c59c6943243 Mon Sep 17 00:00:00 2001 From: sujith-mn Date: Tue, 6 Apr 2021 09:46:51 +0530 Subject: [PATCH 17/17] updated pom --- .../archetype-resources/__batch__/pom.xml | 24 -------- .../resources/archetype-resources/api/pom.xml | 11 ++++ .../archetype-resources/core/pom.xml | 24 +------- .../resources/archetype-resources/pom.xml | 59 ++++++++++++------- .../archetype-resources/server/pom.xml | 8 ++- 5 files changed, 57 insertions(+), 69 deletions(-) diff --git a/templates/server/src/main/resources/archetype-resources/__batch__/pom.xml b/templates/server/src/main/resources/archetype-resources/__batch__/pom.xml index 4cd5d13b..20ff72e8 100644 --- a/templates/server/src/main/resources/archetype-resources/__batch__/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/__batch__/pom.xml @@ -51,28 +51,4 @@ - - - - container - - - - com.google.cloud.tools - jib-maven-plugin - ${jib.version} - - - compile - - ${jib.goal} - - - - - - - - - diff --git a/templates/server/src/main/resources/archetype-resources/api/pom.xml b/templates/server/src/main/resources/archetype-resources/api/pom.xml index bfa682e1..b8346bc0 100644 --- a/templates/server/src/main/resources/archetype-resources/api/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/api/pom.xml @@ -42,4 +42,15 @@ test + + + + com.google.cloud.tools + jib-maven-plugin + + true + + + + diff --git a/templates/server/src/main/resources/archetype-resources/core/pom.xml b/templates/server/src/main/resources/archetype-resources/core/pom.xml index 5bf8d054..06d14d93 100644 --- a/templates/server/src/main/resources/archetype-resources/core/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/core/pom.xml @@ -1,5 +1,4 @@ - - + 4.0.0 @@ -240,27 +239,6 @@ - - - container - - - - com.google.cloud.tools - jib-maven-plugin - ${jib.version} - - - compile - - ${jib.goal} - - - - - - - diff --git a/templates/server/src/main/resources/archetype-resources/pom.xml b/templates/server/src/main/resources/archetype-resources/pom.xml index 78525628..823c3cd0 100644 --- a/templates/server/src/main/resources/archetype-resources/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/pom.xml @@ -23,7 +23,7 @@ $[jib.version] $[jib.container.image] 8081 - dockerBuild + buildTar @@ -327,26 +327,6 @@ spring-boot-maven-plugin ${spring.boot.version} - - com.google.cloud.tools - jib-maven-plugin - ${jib.version} - - - ${jib.container.image} - - - ${project.name}/java:${project.version} - - - ${package}.SpringBootApp - - ${jib.app.port} - - OCI - - - @@ -358,6 +338,43 @@ build + + container + + true + + + + + com.google.cloud.tools + jib-maven-plugin + ${jib.version} + + + ${jib.container.image} + + + ${project.name}/java:${project.version} + + + ${package}.SpringBootApp + + ${jib.app.port} + + + + + + package + + ${jib.goal} + + + + + + + moduletest diff --git a/templates/server/src/main/resources/archetype-resources/server/pom.xml b/templates/server/src/main/resources/archetype-resources/server/pom.xml index 43fb21df..7fc7a374 100644 --- a/templates/server/src/main/resources/archetype-resources/server/pom.xml +++ b/templates/server/src/main/resources/archetype-resources/server/pom.xml @@ -145,7 +145,13 @@ + + com.google.cloud.tools + jib-maven-plugin + + true + + -