Hi again,
sorry the snippet
-- compileJava.dependsOn(wsgen) --
confused me, since if the wsgen task depends on output of the
compileJava task (compiled classes) you cannot configure the compileJava
task to be dependent by wsgen.
To add the compileJava output to the classpath of your wsgen task you
can write:
task wsgen(dependsOn: compileJava) {
doLast{
ant {
taskdef(name:'wsgen',
classname:'com.sun.tools.ws.ant.WsGen',
classpath:(configurations.jaxws + sourceSet.main.classes).asPath)
wsgen(keep:true,
destdir: 'bin',
sourcedestdir:'src',
resourcedestdir:'resources',
genwsdl:'true',
sei:'mypackage.MySIB')
}
}
}
does this solve your wsgen classpath problems?
regards,
René
Am 02.09.10 22:20, schrieb Kenneth Kousen:
> My situation is actually the opposite of that. I'm assuming my SIB and SEI
> were already compiled, and then I want to add their compiled classes to the
> classpath when I run wsgen. The wsgen tool takes the compiled SIB as an
> argument.
>
> Ken
>
> On Thu, Sep 2, 2010 at 4:16 PM, Rene Groeschke <[email protected]> wrote:
>
>> Hi Ken,
>>
>> do add the wsgen output to your compileJava classpath you can configure
>> the compileJava task like this:
>>
>> compileJava{
>> dependsOn(wsgen)
>> setClasspath(files("bin") + getClasspath())
>> }
>>
>> regards,
>> René
>>
>>
>>
>> Am 02.09.10 21:44, schrieb Kenneth Kousen:
>>> I'm trying to run the wsgen task inside gradle. The tool requires that
>> the
>>> directory of compiled classes be added to the classpath in order to run.
>>>
>>> My current setup includes:
>>>
>>> configurations {
>>> jaxws
>>> }
>>>
>>> task wsgen(dependsOn: JavaPlugin.PROCESS_RESOURCES_TASK_NAME) {
>>> doLast{
>>> ant {
>>> taskdef(name:'wsgen',
>>> classname:'com.sun.tools.ws.ant.WsGen',
>>> classpath:configurations.jaxws.asPath)
>>> wsgen(keep:true,
>>> destdir: 'bin',
>>> sourcedestdir:'src',
>>> resourcedestdir:'resources',
>>> genwsdl:'true',
>>> sei:'mypackage.MySIB')
>>> }
>>> }
>>> }
>>> compileJava.dependsOn(wsgen)
>>>
>>> dependencies {
>>> ...
>>> jaxws 'com.sun.xml.ws:jaxws-tools:2.1.4'
>>> }
>>>
>>> The message I get is:
>>> error: Could not find class file for mypackage.MySIB
>>>
>>> If I run wsgen from the command line, I need to add the 'bin' directory
>> to
>>> the classpath of the wsgen command. I see in the docs how to add
>> specific
>>> files to the classpath, but how do I add the entire directory?
>>>
>>> Thanks,
>>>
>>> Ken
>>>
>>
>> --
>> ------------------------------------
>> Rene Groeschke
>>
>> [email protected]
>> http://www.breskeby.com
>> http://twitter.com/breskeby
>> ------------------------------------
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>>
>
--
------------------------------------
Rene Groeschke
[email protected]
http://www.breskeby.com
http://twitter.com/breskeby
------------------------------------
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email