On Tue, 31 Aug 2010 08:24:20 +1000
Adam Murdoch <[email protected]> wrote:
> On 30/08/10 11:28 PM, tinca wrote:
> > Hello,
> >
> > A custom task that uses ant task works fine with 0.9-preview-3. In
> > rc-1 it fails:
> >
> > Execution failed for task ':serviceJar'.
> > Cause: taskdef class org.jini.rio.tools.ant.ClassDepAndJarTask
> > cannot be found
> >
> > lib dependency defines:
> > compile module('rioproject:rio:4.0') {
> > dependency(':rio:4.0') {
> > artifact { name = 'classdepandjar'; type = 'jar' }
> > ....
> >
> > Its usage is:
> > task serviceJar<< {
> > ant.taskdef(
> > name: "classdepandjar",
> > classname: "org.jini.rio.tools.ant.ClassDepAndJarTask",
> > classpath: configurations.compile.asPath + ':' +
> > compileJava.destinationDir+ ':' + compileTestJava.destinationDir)
> > ant.classdepandjar(
> > ...
> >
> > Release info mentions nothing on this:
> > http://gradle.1045684.n5.nabble.com/ANN-Gradle-0-9-rc-1-released-td2263741.html
> >
> > If the lib containing ClassDepAndJarTask is put under testRuntime
> > an other error appears, that reports missing classes which
> > otherwise present in compileJava.destinationDir.
> >
> > Any idea how to solve this?
>
> You might start by confirming that the expected library jars are in
> the classpath you specify for the taskdef. Perhaps you could print
> out configurations.compile.asPath just before the taskdef.
Yes, I can confirm that he jar is missing from the classpath. (Even
without explicit printing it can be seen as gradle is kind enough to do
so in such a case.)
Since testCompile and testRuntime contains module dependency
overlapping with that of compile I temoprarily commented out them which
made the missing dependency appear.
So definitions below works with preview-3, but not with rc1:
compile module('rioproject:rio:4.0') {
dependency(':rio:4.0') {
artifact { name = 'boot'; type = 'jar' }
artifact { name = 'cybernode'; type = 'jar' }
artifact { name = 'classdepandjar'; type = 'jar' }
artifact { name = 'groovy-all'; type = 'jar' }
}
...
testCompile module('rioproject:rio:4.0') {
dependency(':rio:4.0') {
artifact { name = 'rio-test'; type = 'jar' }
artifact { name = 'resolver'; type = 'jar' }
}
}
I like the former separation and don't see how I can do it with rc1.
Thanks!
Zsolt
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email