gpt4 book ai didi

gradle - Gradle插件测试项目构建失败

转载 作者:行者123 更新时间:2023-12-03 05:09:48 24 4
gpt4 key购买 nike

我在这里从他们的github下载了gradle插件测试项目:
https://github.com/gradle/gradle/tree/master/subprojects/docs/src/samples/customPlugin

我还将gradle更新为最新(4.7)。

当我对gradle build项目进行consumer时,出现以下构建错误:

FAILURE: Build failed with an exception.


  • 出了什么问题:
    配置根项目“消费者”时发生问题。

    Could not resolve all artifacts for configuration ':classpath'. Could not find org.gradle:customPlugin:1.0-SNAPSHOT. Searched in the following locations: file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/maven- metadata.xml file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom Plugin-1.0-SNAPSHOT.pom file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom Plugin-1.0-SNAPSHOT.jar Required by: project :


  • 这是什么问题?我想我对gradle插件还不够了解。是否需要以某种方式构建插件?我没有 1.0-SNAPSHOT pat或任何类似的东西,似乎在找它。

    最佳答案

    Does the plugin need to be built somehow ?



    是的,首先,否则 consumer项目将找不到它。

    plugin项目中,只需运行 gradle uploadArchive
    然后在 gradle build项目中重试 consumer

    关于gradle - Gradle插件测试项目构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49972679/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com