Closed sergey-morenets closed 3 years ago
This plugin does not support spring-boot.
I'll recommend you to use spring-native experimental project.(Please note that the library is still in beta phase.)
Thank you, @mike-neck spring-native project (together with Spring AOT plugin) generates configuration files required for AOT. However Spring Boot Maven plugin doesn't support creating native image (only Docker Native image).
You may be able to generate native image of spring-boot application, by creating another new jar task (As you may know that the default jar
task is disabled by spring boot plugin), and using the product of the new jar task as an input of nativeImage
task(I'm sorry I have not tried this workaround yet).
task anotherJar(type: Jar) {
from sourceSets.main.output
}
nativeImage {
classpath = anotherJar
withConfigFiles {
// add configuration files here
}
// other configurations
}
@mike-neck
Thank you for suggestion. Creating native image is rather common task so I would wait for support in new versions of the official Spring Boot plugin.
There is an issue(#128) for supporting spring-boot feature.
Hi
Does your plugin support Spring Boot jar layout ? In this layout there're special folder for classes: /BOOT-INF/classes and libraries: /BOOT-INF/lib inside jar file.
If I try to configure your plugin:
and run AOT compilation: gradle assemble nativeImage I always get an error: