Hi I am trying to load xml document into marklogic using mlcpTask class from gradle. I am currently using - Marklogic version 10.0-1 - Gradle 6.5 - Java 14.0.1
Build.gradle file as below:
plugins {
id "com.marklogic.ml-gradle" version "4.0.3"
id "net.saliman.properties" version "1.5.1"
}
repositories {
jcenter()
maven { url "http://developer.marklogic.com/maven2/" }
}
configurations {
mlcp
}
dependencies {
mlcp "com.marklogic:mlcp:9.0.7"
mlcp files("mlcp")
}
task loadDoc (type: com.marklogic.gradle.task.MlcpTask) {
classpath = configurations.mlcp
mode = "local"
command = "IMPORT"
database = mlAppConfig.contentDatabaseName
input_file_path = "src/main/ml-data/SampleXML.xml"
input_file_type = "documents"
document_type = "xml"
output_collections = "raw"
//output_uri_prefix = "/document"
output_uri_replace = "/C:/Users/Anshuman/Desktop/mlproject,''"
//output_uri_suffix = ".xml"
}
Error which I am getting: PS C:\Users\Anshuman\Desktop\mlproject2> gradle loadDoc
Task :loadDoc FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':loadDoc'.
The value for task ':loadDoc' property 'mainClass' is final and cannot be changed any further.
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 810ms 1 actionable task: 1 executed