I'm trying to define a new custom ant task that replaces some context-related
code in a few files, which is already written and works from an ant build,
but I seem to be having classpath problems. I am defining the task as
follows:
configurations{
replacer
}
// hopefully major overkill, but I just want jdom to be in the
classpath
dependencies{
replacer module("org.jerod:tools-replacer:1.0"){
dependency("jdom:jdom:1.0"){}
dependency("jaxen:jaxen:1.1"){
transitive = true
}
}
replacer "jdom:jdom:1.0"
replacer "jaxen:jaxen:1.1"
}
ant.taskdef(name: "replacer", classname:
"org.jerod.tools.Replacer",classpath:
project.configurations.replacer.asPath)
I call it with this line:
ant.replacer(file: replacePath, config: configPath, env: environment)
I've tried declaring the module dependencies as transitive and
non-transitive, and I feel like I've exhausted the ways I know to declare
dependencies. It runs through the task a few times, and the first time
works (but correctly doesn't actually do anything), but the second time
there is a thrown exception from a noClassDefFound error on org.jdom.Parent.
Curious, because the first time through the class this is apparently loaded
in the debug statements but it doesn't appear to be loaded the second time
through. I have attached the debug output, but I'm starting to wonder if
ant.taskdef works as it should.
Any thoughts would be appreciated
Jerod
output:
http://www.nabble.com/file/p25116786/debug.txt debug.txt
--
View this message in context:
http://www.nabble.com/trouble-with-ant.taskdef-classpath-tp25116786p25116786.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email