My mistake, I thought my labyrinth of a question gave the impression that I
was adding my custom gradle task to the classpath of something else.  In my
gradle task, I add the custom task class to the classpath of the ant task as
I define it in my build script with the classpath field in the taskdef()
map.  In case that came out wrong, its this:

project.ant{
    taskdef(name: "wsejbdeploy", classname:
"com.ibm.websphere.ant.tasks.WsEjbDeploy", classpath:
project.configurations.wsanttasks.asPath)
    wsejbdeploy(...

Where wsanttasks is a configuration I've defined that refers to the jar
containing WsEjbDeploy and my new jar:

project.dependencies{
    wsanttasks module("com.ibm.websphere:runtime:6.1.0"){
        dependencies "org.jerod:EjbDeployClasses:1.0"
    }
}

But this doesn't get it done.  Gradle gets into the task just fine, but
within the ant task there are a lot of steps and one of them tries to use a
class it can't find.  Again, if I drop that jar in my jdk directory that I
run gradle from, it picks up the files and runs smoothly.

Sorry for the confusion.


Adam Murdoch-2 wrote:
> 
> 
> 
> JerodLass wrote:
>> I'm not adding the custom task itself to the classpath of anything. 
> 
> How are you making the custom task visible to ant?
> 
>>  I'm
>> trying to add a jar to the classpath of:
>> the custom task
>> Ant (if necessary)
>> or anywhere else that would make it accessible
>>
>> I had been looking at an old userguide, so that link should help (though
>> I
>> already feel like I'm doing something I'm not supposed to).
>>
>>
>> Adam Murdoch-2 wrote:
>>   
>>>
>>> JerodLass wrote:
>>>     
>>>> I am defining and using a custom ant task to deploy/generate stubs for
>>>> EJBs. 
>>>> I get an error at the RMIC part of the deploy, where it complains that
>>>> a
>>>> few
>>>> classes could not be found.  This is accurate, and I put together a jar
>>>> to
>>>> fix it, but I don't know how to get it in the classpath for the task.  
>>>>
>>>> The classpath property of the task doesn't work or isn't what I need,
>>>> it
>>>> just adds the jar as an external directory.  If I add the jar as in my
>>>> jdk
>>>> directory as a library everything works, but I don't want to mess
>>>> anyone
>>>> else up so I need to add the jar to the classpath of the ant task,
>>>> classpath
>>>> of ant itself, or something.  Even a brute force way to put this jar in
>>>> the
>>>> ant task's cp would be great.
>>>>
>>>> Any help would be adored.
>>>>   
>>>>       
>>> How are you adding the custom task itself to a classpath? I would try 
>>> adding this extra jar to the exact same classpath.
>>>
>>>
>>> Adam
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>     http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Adding-Dependencies-for-Custom-Ant-Tasks-tp24650392p24652011.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


Reply via email to