Gradle 7.0 build 错误':bootJar' (type 'BootJar').

921 阅读1分钟

错误信息: image.png

A problem was found with the configuration of task ':bootJar' (type 'BootJar').

  • In plugin 'org.springframework.boot' type 'org.springframework.boot.gradle.tasks.bundling.BootJar' property 'bootInf' is missing an input or output annotation.

    Reason: A property without annotation isn't considered during up-to-date checking.

    Possible solutions:

    1. Add an input or output annotation.
    2. Mark it as @Internal.

    Please refer to docs.gradle.org/7.4/usergui… for more details about this problem.

解决方式:检查 spring-boot-gradle-plugin 插件版本,开始使用的是2.1.1 对于gradle 7.0+都会报错,使用 2.2.2.RELEASE 以上就可以了