【问题标题】:Gradle task bootrepackage hangingGradle 任务 bootrepackage 挂起
【发布时间】:2018-12-10 09:57:03
【问题描述】:

我的 gradle 构建挂在 bootRepackage 任务中。 我的应用程序使用 Gradle 2.14 + Spring Boot + Java

Gradle 插件是

classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.3.RELEASE")

以下是我在 gradle 日志中看到的内容。执行卡在 bootRepackage 任务上,没有错误:

Note: Recompile with -Xlint:unchecked for details.
:processResources
:classes
:jar
:findMainClass
:startScripts
:distTar
:distZip
> Building 81% > :bootRepackage

已执行 Gradle 命令:

gradle clean assemble

我添加了调试选项,但它没有给我任何额外的信息。 请让我知道任何指针。

【问题讨论】:

    标签: java spring-boot gradle


    【解决方案1】:

    我通过从我的 build.gradle 文件中删除下面的 sn-p 解决了这个问题。我不知道为什么它会导致问题,但它解决了问题。 请注意,此问题仅出现在本地(Windows 机器)上。

    如果任何 gradle 专家可以帮助解释为什么低于 sn-p 会导致问题,那就太好了。使用 gradle 2.14+spring-boot-gradle-plugin:1.4.3.RELEASE

    from {
    
        configurations.runtime.collect {
            it.isDirectory() ? it : zipTree(it)
        }
    
        configurations.compile.collect {
            it.isDirectory() ? it : zipTree(it)
        }
    }
    

    【讨论】:

      猜你喜欢
      • 2018-10-12
      • 2016-08-11
      • 2013-08-24
      • 2019-06-26
      • 1970-01-01
      • 2022-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多