Hi Kenneth,

Am 03.09.10 01:16, schrieb Kenneth Kousen:
> Hi again Rene,
>
> The situation isn't nearly as dire as that sounds.
>
> 1. My wsgen task does have "dependsOn: compileGroovy" in it.  I can also
> confirm that the compileGroovy task runs successfully.  I can see the
> compiled form of the SEI and SIB inside the 'bin' directory.
>
> 2. The wsgen task itself is not trying to overwrite anything.  It's only
> supposed to generate proxies, which it places in a package called
> "mypackage.jaxws", as well as the wsdl file, which it puts in the
> 'resources' directory.  If I run that command from the command line, it
> works like a charm.
>
> 3. I used the jar task for the dependsOn only because it was the next task
> in the build process.  I really don't care about the jar task.  I just want
> to make sure I run wsgen any time after compileGroovy has completed.
>
> 4. When I run "gradle clean wsgen" explicitly, the compileJava task runs,
> which does nothing, followed by the compileGroovy task, which fills the
> build\classes\main\mypackage directory with the compiled SIB and SEI.
>
> Even with all that, though, the wsgen task fails because it can't find the
> compiled SIB.
>
> Is there any way I can get the wsgen task to print out what it thinks the
> classpath is when it's trying to run?
>
> Again, I really appreciate all the assistance.  I'm very enthusiastic about
> gradle and want to show others how much it has helped me already, and if I
> can get this resolved I'll be that much closer to having a complete story.
>
> For the record, here's my complete build.groovy file at the moment:
>
> apply plugin:'groovy'
> apply plugin:'eclipse'
>
> repositories {
>  mavenCentral()
> mavenRepo urls:["http://download.java.net/maven/1";,
>  "http://download.java.net/maven/2";]
> }
>
> configurations {
>  jaxws
> }
>
> sourceSets {
>    main {
>          java { srcDirs = [] }
>          groovy { srcDir 'src' }
>    }
>    test {
>          java { srcDirs = [] }
>          groovy { srcDir 'tests' }
> resources { srcDir 'resources' }
>    }
> }
>
> task wsgen(dependsOn: compileGroovy)  {
> if (!(new File('src/mypackage/jaxws')).exists()) {
>      doLast{
>      ant {
>      taskdef(name:'wsgen',
>      classname:'com.sun.tools.ws.ant.WsGen',
>      classpath:(configurations.jaxws + sourceSets.main.classes).asPath)
>          wsgen(keep:true,
>          destdir: 'bin',
>          sourcedestdir:'src',
>          resourcedestdir:'resources',
>          genwsdl:'true',
>          sei:'mypackage.MySIB')
>          }
>      }
>     }
> }
Aaahrgh,
while watching your wsgen definition again, I think I got the problem.
The classpath property we add the sourceSet.main.classes is the
classpath of the task definition and not of the wsgen ant task itself.
so we mixed up the classpath of your ant task definition and the wsgen
classpath. try this:

task wsgen(dependsOn: compileGroovy)  {
if (!(file('src/mypackage/jaxws')).exists()) {
     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',
                        classpath:sourceSets.main.classes.asPath,
                        sei:'   mypackage.MySIB')
         }
     }
    }
}


you can print the used classpathes easily by:

    println (configurations.jaxws.asPath) //classpath of the ant task
definition
   
    println (sourceSets.main.classes.asPath) //path to your compiled
productive code


regards,
René

-- 
------------------------------------
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


Reply via email to