Domain Schemagen

  • Tags : /
  • Latest : 1.0
  • Last Updated: 18 January 2012
  • Grails version : 1.3.7
  • Authors : null
1 vote
Dependency :
compile ":domain-schemagen:1.0"

Documentation Source

Summary

Runs schemagen on your Groovy domain classes to output an XML Schema representation of your domain.

Installation

grails install-plugin domain-schemagen

Description

Domain Schemagen provides a new script to scan your domain classes and generate an XML Schema from them. It also respects all standard java XML annotations to manipulate schema generation. i.e. @XmlType, @XmlElement, @XmlAttribute, etc. The only part that doesn't work is @XmlSchema found in package-info.java.

This can be circumvented by using @XmlType(namespace="yournamespace"), though be sure you do it for all classes in a specific package, otherwise you'll have multiple schemas generated.

Usage:

grails domain-schemagen [-option=value]

The default output directory is web-app/schemas

The default src directory is grails-app/domain

Options:
  • -outputDir= override the default output directory.
  • -pkg= Specify specific packages for schemagen, multiples separated by comma. Cannot use with -classes=
  • -classes= Specify specific classes for schemagen, multiples separated by comma. Cannot use with -pkg=
  • -srcDir= Specify alternate directory for Groovy source. Yes, that means you're not limited to Domain classes!
  • -help See this message

YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: YourKit Java Profiler and YourKit .NET Profiler