Gradle 如何打包 Spring Boot 如何不添加版本代码

在 Gradle 中如何在打包的 Jar 中不包含版本代码?


在 bootJar 中,使用下面的代码进行打包不包含版本代码。

archiveFileName = "${archiveBaseName.get()}.${archiveExtension.get()}"

上面的代码将不会打包版本号码

完整的代码如下:

bootJar {
    archiveFileName = "${archiveBaseName.get()}.${archiveExtension.get()}"
}
原文地址:https://www.cnblogs.com/huyuchengus/p/11697800.html