>> Here is an example here:
>> http://gradle.org/userguide/latest/masterch15.html#x51-13400015.3
>>
>> See Javadoc:
>> http://gradle.org/api/0.4/org/gradle/api/DependencyManager.html#antpath(java.lang.String)
>
> That looks like just the ticket. Thanks Hans.

I'm running into problems here. I have this in the "dependencies" closure:

dependencies {
    addFlatDirResolver('lib', new File(rootDir, 'lib'))

    clientModule(['groovy'], ":groovy-all:1.5.6") {
        dependency(":commons-cli:1.0")
        clientModule(":ant:1.7.0") {
            dependencies(":ant-junit:1.7.0", ":ant-launcher:1.7.0")
        }
    }
    ...
}

and I'm using:

  taskdef(name: "groovyc",
                classname: "org.codehaus.groovy.ant.Groovyc",
                classpath: dependencies.antpath("groovy"))

for the "groovyc" task. However, this only appears to be adding the
"groovy-all*" JAR to the classpath - the Ant libraries are not there.
Here's the relevant (I hope) part of the build output:

--- Start
Adding to classpath: /opt/java/jdk1.5.0_11/lib/tools.jar
Executing: :compile-scripts
:: resolving dependencies :: unspecified#grails-1.1-dev;1.1-SNAPSHOT
        confs: [groovy]
        found #groovy-all;1.5.6 in chain
:: resolution report :: resolve 51ms :: artifacts dl 2ms
        :: modules in use:
        #groovy-all;1.5.6 from chain in [groovy]
        ---------------------------------------------------------------------
        |                  |            modules            ||   artifacts   |
        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
        ---------------------------------------------------------------------
        |      groovy      |   1   |   0   |   0   |   0   ||   1   |   0   |
        ---------------------------------------------------------------------
  [groovyc] Compiling 46 source files to
/home/pal20/dev/tools/grails-1.1-dev/build/script-classes
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/tools/ant/launch/AntMain
--- End

I have to admit I don't really understand how the client modules work,
but I would have thought that a dependency on "groovy-all*" would have
translated to the Ant libraries being included on the classpath. I
suspect I'm just misunderstanding what's supposed to be happening, so
any help would once again be greatly appreciated.

Thanks,

Peter

-- 
Software Engineer
G2One, Inc.
http://www.g2one.com/

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

    http://xircles.codehaus.org/manage_email


Reply via email to