On 31/12/2010, at 1:38 AM, Kolovos, Val (Orbitz) wrote:

> I've been struggling with the following problem and was wondering if someone 
> could provide some input. I have a build.groovy file that looks like this:
> 
> ---------
> buildscript {
>    repositories {
>        mavenCentral()
>    }
>    dependencies {
>        classpath group: 'org.codehaus.groovy.modules.http-builder', name: 
> 'http-builder', version: '0.5.1'
>        classpath group: 'org.apache.httpcomponents', name: 'httpmime', 
> version: '4.0.3'
>    }
> }
> 
> apply from: 'foo.gradle'
> ---------
> 
> 'foo.gradle' looks like this:
> 
> ---------
> import groovyx.net.http.HTTPBuilder
> ---------
> 
> When I try to run this, I get the following error message:

The buildscript { } closure only affects the classpath of the script it appears 
in. So, this means that the buildscript { } closure needs to go into the script 
that imports the classes.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz

Reply via email to