Anshuman Srivastava
Anshuman Srivastava

Reputation: 121

mlcp is not loading document when executed through gradle

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.

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

Upvotes: 4

Views: 372

Answers (1)

rjrudin
rjrudin

Reputation: 2236

Per the comment from s3-4v above, the issue starts with Gradle 6.4 - a ticket has been opened for this - https://github.com/marklogic-community/ml-gradle/issues/554 . Can use Gradle <= 6.3 in the meantime.

Upvotes: 2

Related Questions