I just upgraded the Gradle SpringBoot plugin version to 2.5.2 and found out about the difference between the jar
and bootJar
tasks - the former builds an artifact suffixed with -plain.jar
whereas the latter builds an actual executable artifact. I also have a custom plugin that consumes the output of the jar
task as follows:
@Override
void apply(Project project) {
project.copy {
from project.jar
into someDir
}
}
Given that project.jar
is a -plain.jar
that isn't actually executable, is there any way to modify the behavior of the jar
task such that I won't have to modify the plugin? The artifact that is to be copied must be the executable application.