an sbt plugin for generating java artifacts from WSDL using cxf
Add plugin to project/plugins.sbt:
resolvers += "Sonatype Repository" at "https://oss.sonatype.org/content/groups/public"
addSbtPlugin("com.ebiznext.sbt.plugins" % "sbt-cxf-wsdl2java" % "0.1.4")
For .sbt build definitions, inject the plugin settings in build.sbt:
Seq(cxf.settings: _*)
For .scala build definitions, inject the plugin settings in Build.scala:
Project(..., settings = Project.defaultSettings ++ com.ebiznext.sbt.plugins.CxfWsdl2JavaPlugin.cxf.settings)
Plugin keys are located in com.ebiznext.sbt.plugins.CxfWsdl2JavaPlugin.Keys
cxf.cxfVersion := "3.1.3"
lazy val wsclientPackage := "com.ebiznext.sbt.sample"
cxf.wsdls := Seq(
cxf.Wsdl((resourceDirectory in Compile).value / "Sample.wsdl", Seq("-p", wsclientPackage), "unique wsdl id"),
...
)
~wsdl2java
To automatically generate source code when a wsdl is changed