Spring Boot 2 - Change Jar Name

后端 未结 8 1764
耶瑟儿~
耶瑟儿~ 2021-02-06 23:29

I am using Spring Boot 2 in my Gradle project to do a build to jar in Jenkins, and I would like to change the name of that jar file.

By default, Spring Boot 2 used the G

8条回答
  •  渐次进展
    2021-02-07 00:06

    Thanks to @AndyWilkinson for the answer!

    bootJar {
      baseName "jarName"
      launchScript()
    }
    

    .

    springBoot {
      buildInfo {
        properties {
          group = "groupName"
          name = "projectName"
          version = "1.0"
        }
      }
    }
    

提交回复
热议问题