koofr / sbt-jaxws   0.2

MIT License GitHub

sbt plugin for JAX-WS

Scala versions: 2.10
sbt plugins: 0.13

The sbt equivalent of the JAX-WS Maven plug-in. It's a bit of a poor relation at the moment, supporting wsimport only (to generate Java from WSDL).

You should also consider using scalaxb.

Compatible with sbt 0.12.x and 0.13.x.

Configuration

Put this in your project/plugins.sbt:

addSbtPlugin("net.koofr" % "sbt-jaxws" % "0.2")

Light configuration example (in build.sbt):

sbtJaxWsSettings

SbtJaxWsKeys.wsdlFiles <+= baseDirectory(_ / "service.wsdl")

SbtJaxWsKeys.bindingFiles <+= baseDirectory(_ / "message.xsd")

SbtJaxWsKeys.targetVersion := "2.1"

Full configuration example:

import sbtjaxws.Plugin.{ SbtJaxWsKeys, sbtJaxWsSettings }

class MyBuild extends Build {
     lazy val myProject = Project("Mine", file("."), settings = Defaults.defaultSettings ++ sbtJaxWsSettings ++ Seq(
         SbtJaxWsKeys.wsdlFiles <+= baseDirectory(_ / "service.wsdl"),
         SbtJaxWsKeys.bindingFiles <+= baseDirectory(_ / "message.xsd"),
         SbtJaxWsKeys.targetVersion := "2.1"))
}

There is an SbtJaxWsKeys.otherArgs for other wsimport arguments -- if you use this, please consider adding a new setting to the plug-in and sending a pull request ;-)