Closed mikhail-timofeev closed 2 years ago
The plugin delegates to wsdl2java
. The tool itself does not provide any option in relation to the language or locale as far as I can see, so this plugin does not either.
Oh, I see. That plugin programmatically invokes the wsdl2java
tool directly. This plugin does not do that and instead delegates the invocation to Gradle via JavaExec
:
As mentioned in the documentation, Wsdl2JavaTask
is a subclass of JavaExec
, so whatever you can do to JavaExec
tasks you can do to Wsdl2JavaTask
From Googling, there are two ways to set the locale.
You should be able to do (2) with something like following:
import io.mateo.cxf.codegen.wsdl2java.Wsdl2JavaTask
plugins {
id("java")
id("io.mateo.cxf-codegen") version "1.0.0-rc.3"
}
repositories {
mavenCentral()
}
cxfCodegen {
wsdl2java {
register("calculator") {
wsdl.set(file("calculator.wsdl"))
}
}
}
tasks.named("wsdl2javaCalculator", Wsdl2JavaTask::class) {
allJvmArgs = listOf("-Duser.language=fr", "-Duser.country=CA")
}
References:
will try that right away, thank you for your support and work!
I could not find a way to specify the language used to generate javadoc comments in the generated classes and I think this would be a great feature to have. E.g. via a parameter 'locale' accepting java.util.Locale.