Skip to content

Commit

Permalink
[LG-41]- try with springBootMavenBuildImagePlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lglabs committed Apr 27, 2024
1 parent da8e588 commit 12714a2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lg5-spring-parent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ extensions.configure<PublishingExtension> {
.appendNode("plugins").apply {
avroPlugin()
jibMavenPlugin()
springBootMavenBuildImagePlugin()
}
appendNode("plugins").apply {
mavenCompilerPlugin()
Expand Down Expand Up @@ -230,6 +231,27 @@ fun Node.jibMavenPlugin() {
}
}
}
}
}

fun Node.springBootMavenBuildImagePlugin() {
appendNode("plugin").apply {
appendNode("groupId", libs.springboot.parent.get().group)
appendNode("artifactId", "spring-boot-maven-plugin")

appendNode("configuration").apply {
appendNode("image")
.appendNode("name", "\${project.groupId}/\${project.parent.artifactId}:\${project.version}")
appendNode("createdDate", "now")
appendNode("skip", "false")
}

appendNode("executions")
.appendNode("execution").apply {
appendNode("phase", "install")
appendNode("goals")
.appendNode("goal", "build-image")
}

}
}
Expand Down

0 comments on commit 12714a2

Please sign in to comment.