我有多部分项目,项目的API部分有大约10个依赖项。
尝试使用Spring Boot(bootRun)运行API项目,一切正常,但构建时间太长。我已尝试使用gradle parallel
和daemon
构建它,但它不起作用。
如何调试构建过程以了解需要多长时间?
更新
带有 - debug 的 gradle build
进入此点并堆叠几分钟
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
答案 0 :(得分:0)
您可以尝试使用-d
或--debug
标志运行构建,以使用调试日志记录级别运行构建。可能是额外的输出将有助于找到原因,为什么你的构建运行这么久。