问题
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
FAILURE: Build failed with an exception. Where: Build file 'FolderPath\build.gradle' line: 2
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').
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 3s
This is my build.gradle
plugins { id 'com.marklogic.ml-data-hub' version '4.3.1' }
ML version i am using 9.0-9.1
and Gradle version is 6.0.1
But i can create project with quick-start-4.3.2.war
Can anybody point out my mistake
回答1:
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.
来源:https://stackoverflow.com/questions/59535257/could-not-initialize-your-dhf-project-using-gradle