diff --git a/castor/plugin.jelly b/castor/plugin.jelly index 24989fab..6648e526 100644 --- a/castor/plugin.jelly +++ b/castor/plugin.jelly @@ -1,16 +1,74 @@ - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -22,6 +80,7 @@ - + + diff --git a/castor/plugin.properties b/castor/plugin.properties index a30b79f2..893cc7c5 100644 --- a/castor/plugin.properties +++ b/castor/plugin.properties @@ -1,7 +1,9 @@ # ------------------------------------------------------------------- -# Default Maven properties for the VDoclet plugin. +# Default Maven properties for the Castor plugin. # ------------------------------------------------------------------- # These are the properties that we believe are immutable so we # keep them apart from the project specific properties. # ------------------------------------------------------------------- +maven.castor.dest=${maven.build.dir}/castor/src +maven.castor.tstamp=${maven.build.dir}/castor/tstamp diff --git a/castor/project.xml b/castor/project.xml index 1488532e..0be423af 100644 --- a/castor/project.xml +++ b/castor/project.xml @@ -29,7 +29,7 @@ castor - 0.9.4 + 0.9.4.3 root diff --git a/castor/xdocs/examples.xml b/castor/xdocs/examples.xml new file mode 100644 index 00000000..0c69e8df --- /dev/null +++ b/castor/xdocs/examples.xml @@ -0,0 +1,44 @@ + + + + + Maven Castor Plug-in Examples + Tim Anderson + + + +
+

+ The following generates java sources for the foo.xsd' schema, + in the 'com.foo.bar' package. The sources will use Java 2 collection + types. + + + + + + +]]> +

+

+ The following generates java sources for the 'bar.xsd' schema. + The sources will not included marshalling support (marshal, + unmarshal, validate). + + + + + + +]]> +

+
+ +
diff --git a/castor/xdocs/goals.xml b/castor/xdocs/goals.xml index 75b2c1cc..163572b7 100644 --- a/castor/xdocs/goals.xml +++ b/castor/xdocs/goals.xml @@ -4,17 +4,22 @@ Maven Castor Plug-in Goals Jason van Zyl + Tim Anderson - - - castor:srcgen - - For a given project generate a plexus runtime using the required - components. - - - - +
+ + + + + + +
GoalDescription
castor:prepare-filesystem + Creates the directories specified by the + ${maven.castor.dest} and + ${maven.castor.tstamp} properties. +
+
+ diff --git a/castor/xdocs/index.xml b/castor/xdocs/index.xml index d737b075..f3ac88d6 100644 --- a/castor/xdocs/index.xml +++ b/castor/xdocs/index.xml @@ -4,13 +4,44 @@ Maven Castor Plug-in Jason van Zyl + Tim Anderson
-

- A plugin that currently just sets up castor for use in Jelly -

+

+ This plugin generates java sources from schemas using Castor. +

+ + + + + + + + + + + + + + +
DocumentDescription
Goals + This document provides detailed information on the various + goals that are available as part of the Maven Castor Plug-in. +
Properties + The behavior of the Maven Castor Plug-in can be altered via + several properties. This document describes each property + available, and the default used. +
Tags + The Castor plugin defines Jelly tags to generate java + sources. This document describes the tags and their + arguments. +
Examples + This document provides examples on how to use the Maven Castor + plugin. +
+
- + diff --git a/castor/xdocs/navigation.xml b/castor/xdocs/navigation.xml index a610b692..e5335258 100644 --- a/castor/xdocs/navigation.xml +++ b/castor/xdocs/navigation.xml @@ -11,6 +11,8 @@ + +
diff --git a/castor/xdocs/properties.xml b/castor/xdocs/properties.xml index e6db8607..217342bf 100644 --- a/castor/xdocs/properties.xml +++ b/castor/xdocs/properties.xml @@ -4,6 +4,7 @@ Maven Castor Plugin Properties Jason van Zyl + Tim Anderson @@ -11,13 +12,44 @@ - + - - - + + + + + + + + + +
Property nameOptional? DescriptionOptional?
maven.castor.dest + Specifies the directory to place generated sources.
+ Defaults value is ${maven.build.dir}/castor/src +
Yes
maven.castor.tstamp + Specifies the directory to output timestamp files. + These are used to track source modifications against the + generated files, to avoid unecessary generation.
+ Default value is ${maven.build.dir}/castor/tstamp +
Yes
+ +
+ + + + + + + + + +
Property nameDescriptionOptional?
maven.compile.src.set + The source directories maven uses to compile java code. + The Castor plugin adds the directory it generates code to + this path, so that generated code is compiled seamlessly + Yes
diff --git a/castor/xdocs/tags.xml b/castor/xdocs/tags.xml new file mode 100644 index 00000000..a31321a6 --- /dev/null +++ b/castor/xdocs/tags.xml @@ -0,0 +1,86 @@ + + + + + Maven Castor Plug-in Tags + Tim Anderson + + + +
+

+ This document describes the + tags + that are available when using the Castor Plug-in with Maven. +

+

+ Please refer to the + Integration document for + more information on how to integrate these tags into + your project. +

+
+ +
+ + + + + + + + + + +
GoalDescription
castor:generateGenerate java sources from an XML Schema.
castor:srcgenDEPRECATED. Use castor:generate instead
+ + +

+ The castor:generate target generates java sources + from an XML Schema (XSD file).
+ Sources are generated in the + ${maven.castor.dest} directory.
+ Sources are only generated if the input schema is newer than any + existing generated source. +

+ + + + + + + + + + + + + + + + + + + + + + + + +
Attribute NameDescriptionOptional?
schemaThe path to the XML schemaNo
packageThe package for the generated sourceYes
typesSets which type factory to use. This is useful if you want + JDK 1.2 collections instead of JDK 1.1, or if you want to pass + in your own FieldInfoFactory.
+ If not specified, java.util.Vector will be used for + collections.
+ See + Collection Types + for valid values. +
Yes
marshal + If 'false', disables generation of the marshalling framework + methods (marshal, unmarshal, validate).
+ Defaults to 'true'. +
Yes
+
+
+ +
\ No newline at end of file