I tried to switch to a Spring Boot thin jar so that the dependencies are not included in the jar. I am using the thin-launcher
gradle plugin:
plugins {
id 'org.springframework.boot.experimental.thin-launcher' version '1.0.25.RELEASE'
}
However, I am getting the following error message when running the thinJar
task:
The value of a manifest attribute must not be null (Key=Start-Class).
I tried to specify the Start-Class
attribute in several ways:
thinJar {
manifest {
attributes 'Start-Class': "at.mypackage.Application"
}
}
bootJar {
manifest {
attributes 'Start-Class': "at.mypackage.Application"
}
}
Using the gradle application
plugin and specifying the mainClassName
property does not work either. Without the thin jar plugin, everything works as expected.
Thanks for your help!