无法使用Gradle初始化DHF项目 [英] Could not initialize your DHF project using Gradle

查看:75
本文介绍了无法使用Gradle初始化DHF项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经按照使用DHF Gradle插件,然后当我运行Gradle命令 gradlew.bat hubInit 初始化datahub项目时,出现错误

I have installed the gradle wrapper as mentioned Create a DHF Project Using the DHF Gradle Plugin and then after that when i run the Gradle command gradlew.bat hubInit to initialize datahub Project I am getting error

失败:生成失败,发生异常.在哪里:构建文件"FolderPath \ build.gradle"行:2

FAILURE: Build failed with an exception. Where: Build file 'FolderPath\build.gradle' line: 2

出了什么问题:应用插件请求[id:'com.marklogic.ml-data-hub',版本:'4.3.1']发生异常无法应用插件[id'com.marklogic.ml-data-hub']无法创建任务:mlUpdateIndexes".不支持替换其他插件可能已经使用的现有任务.为此任务使用一个不同的名称('mlUpdateIndexes').

What went wrong: An exception occurred applying plugin request [id: 'com.marklogic.ml-data-hub', version: '4.3.1'] Failed to apply plugin [id 'com.marklogic.ml-data-hub'] Could not create task ':mlUpdateIndexes'. Replacing an existing task that may have already been used by other plugins is not supported. Use a different name for this task ('mlUpdateIndexes').

尝试:使用--stacktrace选项运行以获取堆栈跟踪.使用--info或--debug选项运行,以获取更多日志输出.与--scan一起运行以获得完整的见解.

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.

https://help.gradle.org

3秒内失败

这是我的 build.gradle

插件{id'com.marklogic.ml-data-hub'版本'4.3.1'}

plugins { id 'com.marklogic.ml-data-hub' version '4.3.1' }

我正在使用 9.0-9.1

ML版本,而Gradle版本是 6.0.1

但是我可以使用 quick-start-4.3.2.war

任何人都可以指出我的错误

Can anybody point out my mistake

推荐答案

5.1.0之前的DHF版本正在使用Gradle技术替换任务.Gradle 5不推荐使用此功能,Gradle 6删除了此功能.您可以将DHF 5.1.0与Gradle 6一起使用,但是DHF的任何较早版本都不能与Gradle 6一起使用.使用Gradle 4.x或5.x,应该可以.

Versions of DHF prior to 5.1.0 are using a Gradle technique to replace tasks. Gradle 5 deprecated this feature, and Gradle 6 removes it. You can use DHF 5.1.0 with Gradle 6, but any earlier version of DHF will not work with Gradle 6. Use Gradle 4.x or 5.x and you should be fine.

这篇关于无法使用Gradle初始化DHF项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆