我想使用具有预览功能的最新 Java 15。我正在使用 Spring Boot 2.4.0-M2 和 Gradle 6.7-rc2,它们都支持 Java 15 功能。
我想使用 jib 从我的项目中构建一个 docker 映像。这是我的吊臂配置:
jib {
from {
image = 'openjdk:15-jdk'
}
to {
image = '<username>/<project>'
}
container {
jvmFlags = ['--enable-preview']
}
}
不幸的是,当我运行时,./gradlew jib
我收到以下错误:
Execution failed for task ':jib'.
> Records requires ASM8
这是使用--info
标志运行时的输出:
> Task :jib FAILED
Caching disabled for task ':jib' because:
Build cache is disabled
Task ':jib' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Searching for main class... Add a 'mainClass' configuration to 'jib' to improve build speed.
Could not find a valid main class from 'jar' task; looking into all class files to infer main class.
:jib (Thread[Execution worker for ':',5,main]) completed. Took 0.003 secs.
有没有人遇到过类似的问题?