An sbt plugin for generating java artifacts from WSDL using cxf.
For the moment, this fork only updates scala (to 2.10.6 because it's the version used to RUN sbt but your project can be 2.11 or 2.12), sbt (to 0.13.15) and CXF (to 3.1.12).
- SBT 0.13.5+
- Compatible with SBT 1.x (since version 0.2.7)
Add plugin to project/plugins.sbt:
resolvers ++= Seq(Resolver.bintrayIvyRepo("borisnaguet", "ivy"))
addSbtPlugin("io.github.borisnaguet" % "sbt-cxf-wsdl2java" % "0.2.7")
Plugin keys are prefixed with "cxf".
- wsdl2javaDefaultArgs: override the default arguments passed to wsdl2java, supply another Seq[String] of arguments.
- cxfParallelExecution: set to false to disable running wsdl2java commands in parallel. Useful if there are duplicate classes to be generated and the output directory for multiple services are the same
- cxfVersion: override the version of cxf to be used
- cxfJaxb2BasicsVersion: override the version of jaxb2_commons to be used
lazy val wsclientPackage := "io.github.borisnaguet.sample"
cxfWsdls := Seq(
CxfWsdl((resourceDirectory in Compile).value / "Sample.wsdl", Seq("-p", wsclientPackage), "unique wsdl id"),
// add -wsdlLocation for the wsdls to be loaded by the classloader (portable solution)
CxfWsdl(
(resourceDirectory in Compile).value / "wsdls/other.wsdl",
Seq("-p", "com.company.project", "-wsdlLocation", "wsdls/other.wsdl"),
"other wsdl id"
),
...
)
cxfWsdlsUrls := Seq(
CxfWsdlUrl(
url("http://www.my-weather-channel.org/global-weather?wsdl"),
Seq("-p", "global-weather"),
"org.my-weather-channel.global-weather"
)
)
~wsdl2java
To automatically generate source code when a wsdl is changed