It might take a little time to make a test project that produces this without
getting fired :)
Before I do, I noticed this, and I was wondering if you thought it might be
related:
http://www.nabble.com/G2.1-class-loader-error-td15875538s134.html
Since I saw a lot of similar stuff in the debug output with the parentLoader
class loading.
Thoughts?
Jerod
hdockter wrote:
>
>
> On Aug 24, 2009, at 4:13 PM, JerodLass wrote:
>
>>
>> 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.
>
> I can't find any bug in your code. I would need a running test project
> that reproduces this problem to tell more.
>
> - Hans
>
> --
> Hans Dockter
> Gradle Project Manager
> http://www.gradle.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
>
--
View this message in context:
http://www.nabble.com/trouble-with-ant.taskdef-classpath-tp25116786p25136363.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