[英]How to convert bootRepackage task to kotlin DSL in gradle 5.0.0?
New day, new discovery.新的一天,新的发现。 Spring Boot docs show that the
bootRepackage
task has been replaced by bootJar
in 2017 and the bootJar
task comes out of the box with the spring boot gradle plugin. Spring Boot 文档显示
bootRepackage
任务已在 2017 年被bootJar
取代,并且bootJar
任务与 spring boot gradle 插件一起开箱即用。
The bootRepackage task has been replaced with bootJar and bootWar tasks for building executable jars and wars respectively
bootRepackage 任务已替换为 bootJar 和 bootWar 任务,分别用于构建可执行的 jars 和 wars
build.gradle.kts build.gradle.kts
// option 1
tasks {
getByName<BootJar>("bootJar") {
classifier = "boot"
mainClassName = "com.example.Application"
}
}
// option 2
tasks.getByName<BootJar>("bootJar") {
classifier = "boot"
mainClassName = "com.example.Application"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.