marklogic / ml-gradle

Gradle plugin for automating everything involving MarkLogic
Other
72 stars 78 forks source link

CorbTask not working with Corb 2.5.1, 2.5.2, 2.5.3, nor 2.5.4 #661

Closed grtjn closed 1 year ago

grtjn commented 1 year ago

Reopening #597. I am still seeing this issue.

I upgraded to DHF 5.8.1, which I think uses ml-gradle 4.3.6, Gradle (wrapper) 7.1.1. I have the following lines in my build.gradle:

configurations {
  // This configuration captures the dependencies for running CoRB (Content Reprocessing in Bulk).
  // This is only needed if you want to run corb via Gradle tasks.
  // If you do, using com.marklogic.gradle.task.CorbTask is a useful starting point, as shown below.
  corb {
    attributes {
      attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, Usage.JAVA_RUNTIME))
    }
  }
}

dependencies {
  // required to run CoRB2
  corb "com.marklogic:marklogic-corb:${mlCorbVersion}"
}

Running a CorbTask reveals the following classpath and class invocation:

 -cp C:\Users\josten\.gradle\caches\modules-2\files-2.1\org.webjars\angularjs\1.8.2\7a971be489a3f321b2db104e2a45afaa633e040d\angularjs-1.8.2.jar;C:\Users\josten\.gradle\caches\modules-2\files-2.1\org.webjars\bootstrap\3.4.1\2c6a8508a4f1484abcaf334cf2fe3df97cf93eac\bootstrap-3.4.1.jar;C:\Users\josten\.gradle\caches\modules-2\files-2.1\org.webjars\jquery\3.6.0\633447ad320c04c69fb621d08ba2268f50822eee\jquery-3.6.0.jar;C:\Users\josten\.gradle\caches\modules-2\files-2.1\com.google.code.externalsortinginjava\externalsortinginjava\0.6.0\cf55d839cef1c5148b337e4d5d8d6f75204a4f72\externalsortinginjava-0.6.0.jar;C:\Users\josten\.gradle\caches\modules-2\files-2.1\com.marklogic\marklogic-xcc\10.0.9\ccdfd874cab1081685aabf92e59e624b41ef81da\marklogic-xcc-10.0.9.jar;C:\Users\josten\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-csv\1.4\fc2512d2109144df353501266ac4bbe179058afd\commons-csv-1.4.jar com.marklogic.developer.corb.Manager

Not seeing any reference to a corb jar. Anyone else observing this as well?

grtjn commented 1 year ago

Note: if I go back to 2.5.0 it works just fine.

rjrudin commented 1 year ago

@grtjn I am using https://github.com/marklogic/ml-gradle/tree/master/examples/corb2-project and I cannot reproduce the issue. 2.5.1 and 2.5.2 still fail due to the reason Mads described. But I verified that 2.5.3 and 2.5.4 are both downloaded successfully and used correctly by CorbTask.

If I clear out all the marklogic-corb files in my Gradle cache and then try again (specifically, I've run mlDeploy and then I'm testing with ./gradlew corbAdhoc), I see this logging:

Downloading https://repo.maven.apache.org/maven2/com/marklogic/marklogic-corb/2.5.4/marklogic-corb-2.5.4.jar to /Users/rrudin/.gradle/.tmp/gradle_download1294385243730288117bin

I am thinking the solution may be to delete all the marklogic-corb files in your cache - for me, that's at /Users/rrudin/.gradle/caches/modules-2/files-2.1/com.marklogic/marklogic-corb.

rjrudin commented 1 year ago

I'm going to close because I don't see any action for this, but please reply back if the above doesn't work - if I can find something that can be done, I'll reopen.