3
我有多部分項目和項目的API部分有大約10個依賴關係。Spring引導和Gradle:構建時間太長 - 如何調試?
試圖用Spring Boot(bootRun)運行API項目,一切正常,但建立時間太長。我試圖用gradle parallel
和daemon
來構建它,但它不起作用。
如何調試構建過程以瞭解需要很長時間?
更新:
gradle build
與--debug去了這一點,在這裏疊加幾分鐘
13:53:54.215 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.result.StreamingResolutionResultBuilder$RootFactory] Loaded resolution results (0.003 secs) from Binary store in /private/var/folders/jg/94cgy2fs2mqckt3mx4fj52qm0000gn/T/gradle8000416708924643404.bin (exist: true)
> Building 0% > Resolving dependencies ':web-sb-api:runtime'
堆棧2-3分鐘,之後繼續很長跟蹤...
13:55:50.902 [DEBUG] [io.spring.gradle.dependencymanagement.exclusions.ExclusionConfiguringAction] Initial dependency graph:
13:55:50.902 [DEBUG] [io.spring.gradle.dependencymanagement.exclusions.ExclusionConfiguringAction] tv.accedo.appgrid:web-sb-api
13:55:50.903 [DEBUG] [io.spring.gradle.dependencymanagement.exclusions.ExclusionConfiguringAction] com.newrelic.agent.java:newrelic-api
13:55:50.903 [DEBUG] [io.spring.gradle.dependencymanagement.exclusions.ExclusionConfiguringAction] com.fasterxml.jackson.core:jackson-core
13:55:50.904 [DEBUG] [io.spring.gradle.dependencymanagement.exclusions.ExclusionConfiguringAction] com.fasterxml.jackson.core:jackson-annotations
13:55:50.904 [DEBUG] [io.spring.gradle.dependencymanagement.exclusions.ExclusionConfiguringAction] com.fasterxml.jackson.core:jackson-databind
13:55:50.904 [DEBUG] [io.spring.gradle.dependencymanagement.exclusions.ExclusionConfiguringAction] com.fasterxml.jackson.core:jackson-annotations
13:55:50.904 [DEBUG] [io.spring.gradle.dependencymanagement.exclusions.ExclusionConfiguringAction] com.fasterxml.jackson.core:jackson-core
13:55:50.904 [DEBUG] [io.spring.gradle.dependencymanagement.exclusions.ExclusionConfiguringAction] org.slf4j:slf4j-api
13:55:50.904 [DEBUG] [io.spring.gradle.dependencymanagement.exclusions.ExclusionConfiguringAction] org.springframework:spring-core
13:55:50.904 [DEBUG] [io.spring.gradle.dependencymanagement.exclusions.ExclusionConfiguringAction] org.springframework:spring-beans
我通過調試跟蹤示例更新了描述 – Lugaru
@Lugaru在解析依賴項時凍結,這可能是由於訪問在線資源造成的。有很多關於互聯網的文章。你應該試着用'--offline'標誌來運行它。 – Stanislav
這很有用。感謝名單。但仍然需要解決相關性問題。 – Lugaru