wsdl2java icon indicating copy to clipboard operation
wsdl2java copied to clipboard

0.11 and 0.12 won't respect the wsdlDir

Open MacTrophy opened this issue 5 years ago • 2 comments

Using 0.11 and 0.12 the generated files are built in build/wsdl2java/... and the copied in build/generated/wsdl but nothing gets in the specified wsdlDir. The presence of the directory specified in wsdlDir is verified but nothing gets placed in it.

I don't know if this has a link but with 0.10 there was the setting generatedWsdlDir which is no longer present for 0.11 and 0.12. This setting is still a variable Wsdl2JavaTask.groovy but it's no longer possible to change its value?

I keep the generated code in a versioning repository, that is why I want to change this directory.

Oh also wsdl2java doesn't support doLast therefore I cannot add a copy from build/generated/wsdl into my directory, that could have been a solution to my problem.

MacTrophy avatar Feb 07 '20 16:02 MacTrophy

The exposed generatedWsdlDir property has been removed, because it did not work with automatic configuration of source dirs.

If you need the generated files somewhere else, you can add a custom task for it:

task copyWsdlClasses(type: Copy) {
    from 'build/generated/wsdl'
    into 'build/vcs' // Your target here.
}

afterEvaluate {
    tasks.withType(no.nils.wsdl2java.Wsdl2JavaTask).each {
        it.finalizedBy copyWsdlClasses
    }
}

If that works for you I can add it to the README :slightly_smiling_face:.

rubengees avatar Feb 09 '20 16:02 rubengees

A changelog would be really nice because silently breaking compatibility is a bit frustrating.

ben-manes avatar Apr 01 '20 22:04 ben-manes