I'm having an issue with the buildscript classpath. Here's what I've been doing:

rm -rf ~/.gradle/cache
./gradlew upload

[downloads lots of stuff]

Build file '/Users/vkolovos/tmp/gradle-test/build.gradle' line: 25

Caused by: groovyx.net.http.HttpResponseException: Not Found [ it's in the 
http-builder jar ]

./gradlew upload

Build file '/Users/vkolovos/tmp/gradle-test/build.gradle' line: 21

Caused by: java.lang.ClassNotFoundException: net.sf.json.JSONObject [ it's in a 
transitive dependency of http-builder, but seems to have been found the first 
time ]

There are 2 different issues here. 1) Why am I not finding the class the first 
time when it is in the jar specified by the dependency? 2) Why am I not finding 
the class the second time which is defined in a transitive dependency?

Here's the build.gradle file:

apply plugin: 'java'

buildscript {
   remoteIvyPath = 'http://10.228.11.203:8081/artifactory/libs-release'
   repositories {
       mavenCentral()
   }
   dependencies {
       classpath group: 'org.codehaus.groovy.modules.http-builder', name: 
'http-builder', version: '0.5.1'
   }
}

task upload {
   doFirst {
       def http = new 
groovyx.net.http.RESTClient('http://my.artifactserver.com/')
       http.auth.basic 'admin', 'super secret password'
       http.put( path: '/libs-release-local/foo',
                 contentType: groovyx.net.http.ContentType.BINARY,
                 body: (new File(project.libsDir, 'gradle-test.jar').bytes)
       )
   }
}

Thanks,

Val
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to