Skip to content

Commit

Permalink
ci($Devtools): exclude spring-boot-devtools for Jib
Browse files Browse the repository at this point in the history
cuz the existence of spring-boot-devtools causes the
following exception:

java.lang.ClassCastException: class
com.jmsoftware.maf.authcenter.role.entity.RoleExcelBean cannot be cast
to class com.jmsoftware.maf.authcenter.role.entity.RoleExcelBean
(com.jmsoftware.maf.authcenter.role.entity.RoleExcelBean is in unnamed
module of loader 'app';
com.jmsoftware.maf.authcenter.role.entity.RoleExcelBean is in unnamed
module of loader
org.springframework.boot.devtools.restart.classloader.RestartClassLoader
@4ba1c32c)

https://stackoverflow.com/questions/57750294/class-loader-error-unnamed-module-of-loader-org-springframework-boot-devtools

GoogleContainerTools/jib#2336
  • Loading branch information
johnnymillergh committed Sep 15, 2021
1 parent 0820202 commit 38b1862
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 0 deletions.
17 changes: 17 additions & 0 deletions api-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-spring-boot-extension-maven</artifactId>
<version>${jib-spring-boot-extension-maven.version}</version>
</dependency>
</dependencies>
<executions>
<!-- Bind `jib:dockerBuild` to a Maven lifecycle `verify`. Jib will build your image directly to a Docker daemon.
<execution>
Expand Down Expand Up @@ -113,6 +120,16 @@
</ports>
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
</container>
<pluginExtensions>
<pluginExtension>
<implementation>
com.google.cloud.tools.jib.maven.extension.springboot.JibSpringBootExtension
</implementation>
<properties>
<excludeDevtools>true</excludeDevtools>
</properties>
</pluginExtension>
</pluginExtensions>
</configuration>
</plugin>
</plugins>
Expand Down
17 changes: 17 additions & 0 deletions auth-center/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-spring-boot-extension-maven</artifactId>
<version>${jib-spring-boot-extension-maven.version}</version>
</dependency>
</dependencies>
<executions>
<!-- Bind `jib:dockerBuild` to a Maven lifecycle `verify`. Jib will build your image directly to a Docker daemon.
<execution>
Expand Down Expand Up @@ -113,6 +120,16 @@
</ports>
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
</container>
<pluginExtensions>
<pluginExtension>
<implementation>
com.google.cloud.tools.jib.maven.extension.springboot.JibSpringBootExtension
</implementation>
<properties>
<excludeDevtools>true</excludeDevtools>
</properties>
</pluginExtension>
</pluginExtensions>
</configuration>
</plugin>
</plugins>
Expand Down
17 changes: 17 additions & 0 deletions maf-mis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-spring-boot-extension-maven</artifactId>
<version>${jib-spring-boot-extension-maven.version}</version>
</dependency>
</dependencies>
<executions>
<!-- Bind `jib:dockerBuild` to a Maven lifecycle `verify`. Jib will build your image directly to a Docker daemon.
<execution>
Expand Down Expand Up @@ -113,6 +120,16 @@
</ports>
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
</container>
<pluginExtensions>
<pluginExtension>
<implementation>
com.google.cloud.tools.jib.maven.extension.springboot.JibSpringBootExtension
</implementation>
<properties>
<excludeDevtools>true</excludeDevtools>
</properties>
</pluginExtension>
</pluginExtensions>
</configuration>
</plugin>
</plugins>
Expand Down
17 changes: 17 additions & 0 deletions oss-center/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-spring-boot-extension-maven</artifactId>
<version>${jib-spring-boot-extension-maven.version}</version>
</dependency>
</dependencies>
<executions>
<!-- Bind `jib:dockerBuild` to a Maven lifecycle `verify`. Jib will build your image directly to a Docker daemon.
<execution>
Expand Down Expand Up @@ -113,6 +120,16 @@
</ports>
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
</container>
<pluginExtensions>
<pluginExtension>
<implementation>
com.google.cloud.tools.jib.maven.extension.springboot.JibSpringBootExtension
</implementation>
<properties>
<excludeDevtools>true</excludeDevtools>
</properties>
</pluginExtension>
</pluginExtensions>
</configuration>
</plugin>
</plugins>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
-->
<adoptopenjdk11.tag>jre-11.0.10_9</adoptopenjdk11.tag>
<jib-maven-plugin.version>3.1.4</jib-maven-plugin.version>
<jib-spring-boot-extension-maven.version>0.1.0</jib-spring-boot-extension-maven.version>
<maven-pmd-plugin.version>3.14.0</maven-pmd-plugin.version>
<spring-cloud.version>2020.0.3</spring-cloud.version>
<spring-content.version>1.0.0.M5</spring-content.version>
Expand Down
17 changes: 17 additions & 0 deletions spring-boot-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-spring-boot-extension-maven</artifactId>
<version>${jib-spring-boot-extension-maven.version}</version>
</dependency>
</dependencies>
<executions>
<!-- Bind `jib:dockerBuild` to a Maven lifecycle `verify`. Jib will build your image directly to a Docker daemon.
<execution>
Expand Down Expand Up @@ -113,6 +120,16 @@
</ports>
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
</container>
<pluginExtensions>
<pluginExtension>
<implementation>
com.google.cloud.tools.jib.maven.extension.springboot.JibSpringBootExtension
</implementation>
<properties>
<excludeDevtools>true</excludeDevtools>
</properties>
</pluginExtension>
</pluginExtensions>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 38b1862

Please sign in to comment.