I am working with the gradle.plugin.cz.swsamuraj:gradle-jaxws-plugin:0.6.1 plugin to generate webservice code (contract first) from a given set of wsdl. When I use its wsImport task, I configure its ‘jaxws’ extension properties that the wsImport task uses to generate code. This all work fine. Now I have a second wsdl that I need to generate another service and it needs to generate using a different set of ‘jaxws’ properties.
Can anyone recommend an approach to do this?
I’ve tried create my own 2 tasks of type wsImport that independently configure the jaxws properties, but one of the new tasks properties always takes precedence over the other, and I end up with different code from the two tasks generating into the same packages (packagename is one of the jaxws properties that the plugin uses.
Here is my attempt:
task generateSesEventService (type: cz.swsamuraj.gradle.jaxws.WSImportTask) {
jaxws.wsdlLocationDefault = true
jaxws.packageName = 'org.arbfile.dint.starterkit.ws.ses'
jaxws.extension = true
wsdlDir = file(dintWsdlDir + '/server/payment_v2')
generatedSources = file(generatedWsService + '/ses')
}
task generateDintEventService (type: cz.swsamuraj.gradle.jaxws.WSImportTask) {
jaxws.wsdlLocationDefault = true
jaxws.packageName = 'org.arbfile.dint.starterkit.ws.dint'
jaxws.extension = true
wsdlDir = file(dintWsdlDir + '/server/standard_v3')
generatedSources = file(generatedWsService + '/dint')
}
I think my general issues is how do I vary a plugins extension properties on a per task basis? If I am missing some major concepts here, let me know.