gpt4 book ai didi

spring-boot - gradle build 和 gradle bootJar 之间的区别?

转载 作者:行者123 更新时间:2023-12-03 03:44:15 24 4
gpt4 key购买 nike

“gradle build”和“gradle bootJar”有什么区别?如果我仍然可以使用 build 创建工件,为什么要使用 bootJar?

最佳答案

buildBase Plugin 贡献的生命周期任务.这是

Intended to build everything, including running all tests, producing the production artifacts and generating documentation. You will probably rarely attach concrete tasks directly to build as assemble and check are typically more appropriate.

bootJar另一方面是 Spring Boot Gradle 插件添加的一个特定任务,当 java插件存在,附加到 assemble生命周期任务。

The assemble task is automatically configured to depend upon the bootJar task so running assemble (or build) will also run the bootJar task.

(Packaging Executable Jars)


您要使用 bootJar如果您只对构建可执行 jar 感兴趣,而对执行测试、代码覆盖率、静态代码分析或附加到 check 的任何内容不感兴趣。生命周期任务。

关于spring-boot - gradle build 和 gradle bootJar 之间的区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64747475/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com