Git Product home page Git Product logo

sbt-xjc's Introduction

sbt-xjc An SBT 0.11 Plugin to compile XML Schemata to JAXB Java sources with XJC

Usage

Depend on the plugin: ./project/plugins/build.sbt. Requires SBT 0.12.x or 0.13.x

addSbtPlugin("org.scala-sbt.plugins" % "sbt-xjc" % "0.5")

Introduce Settings

Include the settings from com.github.retronym.sbtxjc.SbtXjcPlugin.xjcSettings.

Configure

By default, all XSDs found under unmanagedResourceDirectories will be compiled. This is repeated in the Compile and Test scopes. The table below show the configuration for the Compile scope; replace with Test to configure that scope.

KeyTypeDefaultDescriptionExample
xjcLibsSeq[ModuleId]jaxb-api 2.1, jaxb-impl and jaxb-xjc 2.1.9 The artifacts to download to run XJC
xjcPluginsSeq[ModuleId]The artifacts to download containing XJC plugins
xjcCommandLineSeq[String]Additional command line, e.g. -verbose -Xfluent-api
sources in (Compile, xjc)Seq[File]${unmanagedResourceDirectories} ** "*.xsd"Input XSD Files sources in (Compile, xjc) <<= sourceDirectory map (_ / "main" / "schema" ** "*.xsd" get)
sourceManaged in (Compile, xjc)File${sourceManaged}/compile/xjc Target for generated files. Should not be shared with other generated files

See the Tests for example builds.

As a convenience, the fluent API settings are provided in SbtXjcPlugin.fluentApiSettings

Use

The timestamps of the source XSD files is compared with the generated files, and if newer these are compiled. This occurs automatically before compilation.

Problems

You can troubleshoot problems by inspecting debug logs with > last xjc.

Please use the Issue Tracker here if you find a bug. Do not raise bugs for problems with your schema or with usage of XJC itself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.