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
For Gradle 6
bootJar { archiveBaseName = 'freeway-server' archiveVersion = '1.0.0' archiveFileName = 'freeway-server.jar' }
For get:-
System.out.print(bootJar.getArchiveBaseName().get()) System.out.print(bootJar.getArchiveVersion().get()) System.out.print(bootJar.getArchiveFileName().get())