[英]Gradle Build - Execution failed for task ':sonarqube' can't be indexed twice
[英]Heroku build failed during gradle task 'nodeSetup' with error 'Couldn't follow symbolic link'
第一次在heroku上创建应用程序时,一切正常,但是在nodeSetup
gradle任务的构建过程中,所有后续部署均失败,并出现此错误
Failed to capture fingerprint of output files for task ':nodeSetup' property 'nodeDir' during up-to-date check.
> Could not list contents of '/tmp/build_f8eae163382a61b2896d7be434b4dc58/.gradle/nodejs/node-v8.12.0-linux-x64/bin/npm'. Couldn't follow symbolic link.
每当我要部署它时,我都必须创建一个新的heroku项目。 因此,这仅是第一次。 即使我使用./gradlew clean
清除了缓存,在构建过程中./gradlew clean
失败,因为它不会清除.gradle
文件夹
如果我通过SSH进入项目并手动运行./gradlew build
,那么它将正常工作。 该错误仅在(构建包的)heroku构建过程中发生
我正在使用https://github.com/srs/gradle-node-plugin以便将webpack用于项目https://github.com/zhcet-amu/zhcet-web中的前端。
我猜很多人都遇到过类似的问题。 这可能是由于缓存目录并尝试在第二次部署中访问不存在的目录吗?
这是完整的构建日志
-----> Gradle app detected
-----> Spring Boot detected
-----> Installing JDK 1.8... done
-----> Building Gradle app...
-----> executing ./gradlew build -x test
> Task :bootBuildInfo
> Task :compileKotlin
> Task :nodeSetup FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Failed to capture fingerprint of output files for task ':nodeSetup' property 'nodeDir' during up-to-date check.
> Could not list contents of '/tmp/build_f8eae163382a61b2896d7be434b4dc58/.gradle/nodejs/node-v8.12.0-linux-x64/bin/npm'. Couldn't follow symbolic link.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 27s
3 actionable tasks: 3 executed
! ERROR: Failed to run Gradle!
We're sorry this build is failing. If you can't find the issue in application
code, please submit a ticket so we can help: https://help.heroku.com
You can also try reverting to the previous version of the buildpack by running:
$ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-gradle#previous-version
Thanks,
Heroku
! Push rejected, failed to compile Gradle app.
! Push failed
就我个人而言,我不在乎是否缓存了任何内容,并且重建所需的时间比目前要长,部署甚至无法工作。 如果希望按照此处需要完成的工作方向进行指导,我希望发送PR,但是目前,我可以采取任何解决方法吗?
我正在寻找可以使我在构建开始之前清除缓存,或将build命令自定义为其他gradle任务的东西,或其他可能有帮助的东西
问题的一部分是gradle-node-plugin
创建带有绝对路径的符号链接。 它可能应该在创建相对路径。
无论如何,我已经在Gradle buildpack上打开了PR,以将该目录从缓存中排除 。 一旦发布,这个问题就应该解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.