Closed mohamead closed 2 years ago
Yes, you can use the xjcArgs
list property.
Based on your Maven configuration, something like:
dependencies {
cxfCodegen("org.apache.cxf.xjcplugins:cxf-xjc-ts:3.3.1")
cxfCodegen("org.jvnet.jaxb2_commons:jaxb2-basics:0.12.0")
}
tasks.withType(Wsdl2Java::class).configureEach {
toolOptions {
extraArgs.add("-impl")
xjcArgs.add("-xjc-Xtsl")
xjcArgs.add("-xjc-Xequals")
bindingFiles.add(layout.projectDirectory.file("/src/main/resources/bindings/global.xml").asFile.absolutePath)
bindingFiles.add(layout.projectDirectory.file("/src/main/resources/bindings/bim/Acknowledgement.xml").asFile.absolutePath)
}
}
Additionally, the usage of -wsdlLocation
can be replaced with the property instead:
tasks.register("example", Wsdl2Java::class) {
toolOptions {
wsdlLocation.set("classpath:no/elhub/wsdl/Query.wsdl")
}
}
Hi @ciscoo that worked like a charm! Thx, closing this ticket :)
Hi! First of all really nice plugin :)
I am trying to generate java-classes from a set of wsdl's that I have. I am trying to convert the following maven profile to use your plugin with gradle:
My current implementation looks like this in build.gradle,kts
The code above will generate the java-classes directly from wsdl, but we want to modify the wsdl some what. Hence the use of extraargs for -xjc options and the use of custom bindingsfile that we have created. Do you know how and if the plugin can be used to add this?