[英]Dependencies specified with `implementation` configuration in Gradle build not put into Spring Boot fat jar
我正在使用以下版本處理一些遺留代碼:
當我執行assemble
任務時,我期望使用implementation
依賴項配置指定的任何依賴項都將放在 Spring Boot fat jar 中。 然而他們不是。
我現在已經使用了不推薦使用的compile
依賴配置,但我對為什么implementation
不起作用感到困惑。
簡化的build.gradle
如下:
plugins {
id 'java'
id "org.springframework.boot" version "1.5.16.RELEASE"
}
group 'org.example'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.apache.commons:commons-lang3:3.10'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
在上面的示例中,當我執行assemble
Gradle 任務時,我希望將commons-lang3-3.10.jar
放入胖 jar 中。 它不是!
最可能的解釋是,這個版本的 Spring 引導插件不支持 Gradle java
插件的重新設計配置。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.