On Mon, Nov 22, 2010 at 10:44 AM, Adam Murdoch <[email protected]> wrote:
>
> On 22/11/2010, at 8:33 PM, Jeppe Nejsum Madsen wrote:
>
> Hi,
>
> I've pulled a standalone project (that worked fine) in as a subproject
> in another project, like this:
>
> project(':wsclient') {
> apply plugin: 'java'
>
> configurations {
> jaxws
> }
>
> dependencies {
> jaxws "com.sun.xml.ws:jaxws-tools:2.1.4"
> }
>
> task wsimport(dependsOn: JavaPlugin.PROCESS_RESOURCES_TASK_NAME) {
> println ("path "+configurations.jaxws.asPath)
> doLast {
> ant.taskdef(name:'wsimport',
> classname:'com.sun.tools.ws.ant.WsImport',
> classpath:configurations.jaxws.asPath)
> ant.wsimport(keep:true,
> package: "ws",
> extension: true,
> xadditionalHeaders: true,
> destdir: sourceSets.main.classesDir,
> wsdl:'src/main/resources/ws.wsdl')
> }
> }
> compileJava.dependsOn(wsimport)
> }
>
> But it seems the jaxws config is empty (by looking at the println
> output) and I get the following error:
>
> Execution failed for task ':wsclient:wsimport'.
> Cause: taskdef class com.sun.tools.ws.ant.WsImport cannot be found
> using the classloader AntClassLoader[]
>
> Any hints? (I'm using 0.9rc2)
>
> Make sure you add some repositories. Gradle doesn't complain if you have a
> project with no repositories, and you use a dependency which is already in
> the cache. It just ignores the dependency. Which is not very useful. There's
> a JIRA issue to fix this: http://jira.codehaus.org/browse/GRADLE-1229
Ahh that solved it, thanks!
/Jeppe
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email