You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by jo...@apache.org on 2006/10/28 23:27:24 UTC
svn commit: r468742 - in
/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin: ./ src/changes/
src/main/java/org/apache/ws/jaxme/maven/plugins/ src/site/apt/
Author: jochen
Date: Sat Oct 28 14:27:23 2006
New Revision: 468742
URL: http://svn.apache.org/viewvc?view=rev&rev=468742
Log:
Documented the changes, in order to prepare release of version 2.
Modified:
webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/pom.xml
webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/changes/changes.xml
webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/EntityResolverFactory.java
webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/FileSet.java
webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/ISchemaCollection.java
webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/JaxMeMojo.java
webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/SchemaCollection.java
webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/SchemaCollectionProcessor.java
webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/properties.apt
webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/use.apt
Modified: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/pom.xml
URL: http://svn.apache.org/viewvc/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/pom.xml?view=diff&rev=468742&r1=468741&r2=468742
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/pom.xml (original)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/pom.xml Sat Oct 28 14:27:23 2006
@@ -25,7 +25,7 @@
<artifactId>maven-jaxme-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>Maven JaxMe Plugin</name>
- <version>1.1-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<description>
This plugin allows running the JaxMe binding compiler on
your XML schema files and add the generated sources to
@@ -181,6 +181,13 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>changes-maven-plugin</artifactId>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>changes-report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Modified: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/changes/changes.xml?view=diff&rev=468742&r1=468741&r2=468742
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/changes/changes.xml (original)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/changes/changes.xml Sat Oct 28 14:27:23 2006
@@ -3,6 +3,33 @@
<title>Maven JaxMe Plugin Changes</title>
</properties>
<body>
+ <release version="2.0" date="Not yet released" desc="Version 2">
+ <action dev="jochen" type="add">
+ Added the concept of schema collections, which allows to compile
+ multiple schema files within one project using different
+ configurations. You had to use subprojects before.
+ </action>
+ <action dev="jochen" type="fix">
+ Upgrade to JaxMe 0.5.2.
+ </action>
+ <action dev="jochen" type="fix">
+ File sets are now built using the Plexus utilities, which is the
+ standard for Maven plugins. Unfortunately, this means that the
+ syntax for configuring the plugin has changed.
+ </action>
+ <action dev="jochen" type="add">
+ Added support for entity resolvers.
+ </action>
+ <action dev="jochen" type="add">
+ The input files may now be added to the generated jar file, so that
+ they can be used for documentation or validation.
+ </action>
+ <action dev="jochen" type="add">
+ Sources and resources may now have different target directories,
+ which matches the Maven standards.
+ </action>
+ </release>
+
<release version="1.0.3" date="2006-02-18" desc="The Vito release">
<action dev="jochen" type="fix" due-to="Anthony Vito"
due-to-email="anthony.vito@gmail.com">
Modified: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/EntityResolverFactory.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/EntityResolverFactory.java?view=diff&rev=468742&r1=468741&r2=468742
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/EntityResolverFactory.java (original)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/EntityResolverFactory.java Sat Oct 28 14:27:23 2006
@@ -18,6 +18,7 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+import java.net.MalformedURLException;
import java.net.URL;
import org.apache.maven.plugin.MojoExecutionException;
@@ -43,7 +44,34 @@
}
}
- private static class FilesEntityResolver extends EntityResolver2Impl {
+ private static class URLEntityResolver extends EntityResolver2Impl {
+ private final String prefix;
+ URLEntityResolver(String pPrefix) {
+ prefix = pPrefix;
+ }
+ public InputSource resolveEntity(String pPublicId, String pSystemId)
+ throws SAXException, IOException {
+ if (pSystemId == null) {
+ return null;
+ }
+ final String u = prefix + pSystemId;
+ final URL url;
+ try {
+ url = new URL(u);
+ } catch (MalformedURLException e) {
+ throw new SAXException("Malformed URL: " + u, e);
+ }
+ try {
+ InputSource isource = new InputSource(url.openStream());
+ isource.setSystemId(url.toExternalForm());
+ return isource;
+ } catch (IOException e) {
+ throw new SAXException("Failed to open URL " + url + ": " + e.getMessage(), e);
+ }
+ }
+ }
+
+ private static class FilesEntityResolver extends EntityResolver2Impl {
private final String prefix;
FilesEntityResolver(String pPrefix) {
prefix = pPrefix;
@@ -97,7 +125,11 @@
if (pMode == null || pMode.length() == 0 || "files".equals(pMode)) {
return null;
}
- if (pMode.startsWith("files:")) {
+ if (pMode.startsWith("url:")) {
+ final String prefix = pMode.substring("url:".length());
+ return new URLEntityResolver(prefix);
+ }
+ if (pMode.startsWith("files:")) {
final String prefix = pMode.substring("files:".length());
return new FilesEntityResolver(prefix);
}
Modified: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/FileSet.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/FileSet.java?view=diff&rev=468742&r1=468741&r2=468742
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/FileSet.java (original)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/FileSet.java Sat Oct 28 14:27:23 2006
@@ -24,7 +24,7 @@
public class FileSet {
private File directory;
private String[] includes, excludes;
- private boolean disableDefaultExcludes;
+ private boolean skipDefaultExcludes;
/**
* Returns the file sets base directory.
@@ -72,16 +72,16 @@
* Returns, whether default excludes are being disabled.
* Defaults to false (default excludes are enabled).
*/
- public boolean isDisableDefaultExcludes() {
- return disableDefaultExcludes;
+ public boolean isSkipDefaultExcludes() {
+ return skipDefaultExcludes;
}
/**
* Sets, whether default excludes are being disabled.
* Defaults to false (default excludes are enabled).
*/
- public void setDisableDefaultExcludes(boolean disableDefaultExcludes) {
- this.disableDefaultExcludes = disableDefaultExcludes;
+ public void setSkipDefaultExcludes(boolean skipDefaultExcludes) {
+ this.skipDefaultExcludes = skipDefaultExcludes;
}
Modified: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/ISchemaCollection.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/ISchemaCollection.java?view=diff&rev=468742&r1=468741&r2=468742
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/ISchemaCollection.java (original)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/ISchemaCollection.java Sat Oct 28 14:27:23 2006
@@ -59,7 +59,7 @@
* The set of produced files is used for checking,
* whether the generated files are uptodate. If that is
* the case, then the generator will omit recreating
- * them. If the uptodate check fails, or if the "force"
+ * them. If the uptodate check fails, or if the "forceCreation"
* property is turned on, then the source generator
* will actually be invoked. In that case, the set of
* produces files will also be used for removing old
Modified: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/JaxMeMojo.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/JaxMeMojo.java?view=diff&rev=468742&r1=468741&r2=468742
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/JaxMeMojo.java (original)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/JaxMeMojo.java Sat Oct 28 14:27:23 2006
@@ -81,7 +81,7 @@
* uptodate check.
* @parameter expression="false"
*/
- private boolean force;
+ private boolean forceCreation;
/** Sets the Java package name.
* @parameter
@@ -94,7 +94,7 @@
* The set of produced files is used for checking,
* whether the generated files are uptodate. If that is
* the case, then the generator will omit recreating
- * them. If the uptodate check fails, or if the "force"
+ * them. If the uptodate check fails, or if the "forceCreation"
* property is turned on, then the source generator
* will actually be invoked. In that case, the set of
* produces files will also be used for removing old
@@ -232,8 +232,8 @@
}
- protected boolean isForce() {
- return force;
+ protected boolean isForceCreation() {
+ return forceCreation;
}
public String getPackageName() {
@@ -379,7 +379,7 @@
FileSet[] schemaArray = getSchemas();
final ISchemaCollection[] collections = schemaCollections;
- SchemaCollectionProcessor processor = new SchemaCollectionProcessor(project, getLog(), isForce(), isReadOnly());
+ SchemaCollectionProcessor processor = new SchemaCollectionProcessor(project, getLog(), isForceCreation(), isReadOnly());
if (isEmpty(schemaArray)) {
if (schemaCollections == null || schemaCollections.length == 0) {
FileSet fileSet = new FileSet();
Modified: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/SchemaCollection.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/SchemaCollection.java?view=diff&rev=468742&r1=468741&r2=468742
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/SchemaCollection.java (original)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/SchemaCollection.java Sat Oct 28 14:27:23 2006
@@ -76,7 +76,7 @@
* The set of produced files is used for checking,
* whether the generated files are uptodate. If that is
* the case, then the generator will omit recreating
- * them. If the uptodate check fails, or if the "force"
+ * them. If the uptodate check fails, or if the "forceCreation"
* property is turned on, then the source generator
* will actually be invoked. In that case, the set of
* produces files will also be used for removing old
Modified: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/SchemaCollectionProcessor.java
URL: http://svn.apache.org/viewvc/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/SchemaCollectionProcessor.java?view=diff&rev=468742&r1=468741&r2=468742
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/SchemaCollectionProcessor.java (original)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/main/java/org/apache/ws/jaxme/maven/plugins/SchemaCollectionProcessor.java Sat Oct 28 14:27:23 2006
@@ -63,14 +63,14 @@
private final Log log;
private final MavenProject project;
- private final boolean forced, readOnly;
+ private final boolean forceCreation, readOnly;
private final Map sourceDirectories = new HashMap(), resourcecDirectories = new HashMap();
- SchemaCollectionProcessor(MavenProject pProject, Log pLog, boolean pForced,
+ SchemaCollectionProcessor(MavenProject pProject, Log pLog, boolean pForceCreation,
boolean pReadOnly) {
project = pProject;
log = pLog;
- forced = pForced;
+ forceCreation = pForceCreation;
readOnly = pReadOnly;
}
@@ -89,7 +89,7 @@
ds.setBasedir(dir);
ds.setIncludes(set.getIncludes());
ds.setExcludes(set.getExcludes());
- if (!set.isDisableDefaultExcludes()) {
+ if (!set.isSkipDefaultExcludes()) {
ds.addDefaultExcludes();
}
ds.scan();
@@ -161,8 +161,8 @@
}
private boolean isUptodate(FileSpec[] pSourceFiles, FileSpec[] pProducedFiles) {
- if (forced) {
- log.debug("Force flag set, disabling uptodate check.");
+ if (forceCreation) {
+ log.debug("ForceCreation flag set, disabling uptodate check.");
return false;
}
if (pProducedFiles.length == 0) {
@@ -357,7 +357,7 @@
for (int i = 0; i < pSchemaFiles.length; i++) {
final SchemaReader reader = getSchemaReaderInstance(pCollection);
g.setSchemaReader(reader);
- g.setForcingOverwrite(forced);
+ g.setForcingOverwrite(forceCreation);
g.setSettingReadOnly(readOnly);
g.setTargetDirectory(getSrcTargetDirectory(pCollection));
g.setResourceTargetDirectory(resourceTargetDir);
Modified: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/properties.apt
URL: http://svn.apache.org/viewvc/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/properties.apt?view=diff&rev=468742&r1=468741&r2=468742
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/properties.apt (original)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/properties.apt Sat Oct 28 14:27:23 2006
@@ -19,104 +19,183 @@
Properties
----------
+File Sets
+
+ Several properties are configured by file sets. A file set is a directory with
+ inclusions, exclusions and default exclusions. For example, the following might
+ be used to configure the set of schema files, which are being compiled.
+
+--------------------------------------------------------------------
+ <schemas>
+ <schema>
+ <directory>src/main/jaxme
+ <includes>
+ <include>*.xsd</include>
+ </includes>
+ <excludes>
+ <exclude>dontCompileMe.xsd</exclude>
+ </excludes>
+ <skipDefaultExcludes>false</skipDefaultExcludes>
+ </schema>
+ </schemas>
+--------------------------------------------------------------------
+
+ The properties, which accept file sets, are: <<<bindings>>>, <<<depends>>>,
+ <<<produces>>> and <<<schemas>>>.
+
+Schema Collections
+
+ A schema collection is a set of schema files, which are being processed, plus configuration.
+ The plugins purpose is to compile one or more schema collections.
+
+ Any schema collection may be configured differently. For example, you may have a schema
+ collection, which is compiled strictly compliant to the JAXB specification. Another
+ schema collection might require the JaxMe vendor extensions.
+
+ A schema collection is configured through the following properties:
+
+*--------------------+---------------------------------------------------------------------------+
+| Name | Description |
+*--------------------+---------------------------------------------------------------------------+
+| bindings | Specifies one or more file sets with external binding files, which are |
+| | being applied to the schema file or the schema files. Example: |
+| | \<bindings\>\<binding\> |
+| | \<directory\>src/main/jaxme\</directory\> |
+| | \<includes\>\<include\>*.jxb\</include\>\</includes\> |
+| | \<binding\>\</bindings\> |
+*--------------------+---------------------------------------------------------------------------+
+| depends | Specifies one or more file sets with additional dependencies. Typically, |
+| | these are files, which are imported from within one or more schema files, |
+| | but aren't compiled themselves. The plugin uses these files within the |
+| | uptodate check: Generated sources aren't considered uptodate, if an |
+| | additional dependency has a more recent modification date. Example: |
+| | \<depends\>\<depend\> |
+| | \<directory\>src/main/jaxme\</directory\> |
+| | \<includes\>\<include\>*.xsi\</include\>\</includes\> |
+| | \<depends\>\</depend\> |
+*--------------------+---------------------------------------------------------------------------+
+| entityResolverMode | Configures the entity resolver mode. See the special section on |
+| | "Entity Resolvers" below for more details. |
+*--------------------+---------------------------------------------------------------------------+
+| extension | A boolean property, which may be used to enable JaxMe's vendor extensions.|
+| | By default, JaxMe is strictly compliant to the JAXB specification. |
+*--------------------+---------------------------------------------------------------------------+
+| packageName | Specifies the package name, in which the generated sources are being |
+| | placed. The preferred way of specifying a package name is within the |
+| | jaxb:schemaBindings tag of the schema itself or an external binding file. |
+*--------------------+---------------------------------------------------------------------------+
+| produces | Specifies a set of files, which are being produced. Using these property |
+| | enables the uptodate check: The generator will compare the modification |
+| | dates of the input files (given by the "schema" and "depends" properties) |
+| | with the output files, given by "produces". This property is also used, |
+| | if "removeOldOutput" is set to true, in which case it specifies the set |
+| | of files, which are being deleted. Example: |
+| | \<produces\>\<produce\> |
+| | \<directory\>target/generated-sources/jaxme\</directory\> |
+| | \<depends\>\</depend\> |
+*--------------------+---------------------------------------------------------------------------+
+| properties | Specifies properties, which are being set on the generator object. |
+| | Example: |
+| | \<properties\>\<key\>value\</key\>\</properties\> |
+*--------------------+---------------------------------------------------------------------------+
+| removingOldOutput | A boolean property, which specifies, whether generated files are being |
+| | removed before invoking the generator. This is useful, if you have elder |
+| | sources floating around, which are no longer compilable. On the other |
+| | hand, a simple "mvn clean" will do the same trick, so you probably can do |
+| | very well without "removingOldOutput". |
+*--------------------+---------------------------------------------------------------------------+
+| resourceTarget | Sets the target directory, in which generated resource files are being |
+| | created. Defaults to |
+| | "${project.build.directory}/generated-sources/jaxme/resources". |
+*--------------------+---------------------------------------------------------------------------+
+| schemaReader | By default, the generator will use an instance of |
+| | org.apache.ws.jaxme.generator.sg.impl.JAXBSchemaReader for processing its |
+| | input files. If the "extension" property is set, then the default |
+| | changes to org.apache.ws.jaxme.generator.sg.impl.JaxMeSchemaReader. |
+| | But the "schemaReader" option allows you to have a completely different |
+| | schema reader class. |
+*--------------------+---------------------------------------------------------------------------+
+| schemas | Specifies the set of input schemata, which are being processed by the |
+| | generator. You may have multiple "schema" elements, each of which |
+| | containing wildcard characters. The default "src/main/jaxme/*.xsd" is |
+| | used, if you do not specify any "schema" element. Example: |
+| | \<schemas\>\<schema\> |
+| | \<directory\>src/main/jaxme\</directory\> |
+| | \<includes\>\<include\>*.xsd\</include\>\</includes\> |
+| | \<schemas\>\</schema\> |
+*--------------------+---------------------------------------------------------------------------+
+| schemaTargetPrefix | Setting this property enables copying the schema files into the resource |
+| | target directory. For example, you might want to have the schema files |
+| | embedded into the jar file for documentation or validation purposes. |
+| | The property value is the prefix within the resource target directory. |
+| | Example: \<schemaTargetPrefix\>META-INF/schema\</schemaTargetPrefix\> |
+*--------------------+---------------------------------------------------------------------------+
+| sgFactoryChains | An instance of SGFactoryChain is an object, which modifies the source |
+| | generators behaviour. Multiple "sgFactoryChain" elements may be used, |
+| | each containing the fully qualified class name of another chain. |
+*--------------------+---------------------------------------------------------------------------+
+| srcTarget | Sets the target directory, in which generated Java sources are being |
+| | created. Defaults to |
+| | "${project.build.directory}/generated-sources/jaxme/java". |
+*--------------------+---------------------------------------------------------------------------+
+| validating | By default, the XML schema files are being read with a non-validating |
+| | parser. Setting this property to "true" turns on validation. |
+*--------------------+---------------------------------------------------------------------------+
+
+
Properties
- The following properties are available for configuring the
- Maven JaxMe Plugin:
+ The plugin is configured through the following properties:
+
+*-------------------+----------------------------------------------------------------------------+
+| Name | Description |
+*-------------------+----------------------------------------------------------------------------+
+| forceCreation | A boolean property, which disables the uptodate check: The value "true" |
+| | will force invocation of the binding compiler. This property is mainly |
+| | usefull when developing the generator itself. The default value is |
+| | ${jaxme.forceCreation}, so that you can force creation from the command |
+| | line. |
+*-------------------+----------------------------------------------------------------------------+
+| readOnly | Specifies, whether the generated files are being made read-only. |
+*-------------------+----------------------------------------------------------------------------+
+| schemaCollections | Specifies the schema collections, which are being compiled. Example: |
+| | \<schemaCollections\>\<schemaCollection\> |
+| | \<schemas\>\<schema\> |
+| | \<directory\>src/main/jaxme/*.xsd\</directory\> |
+| | \</schema\>\</schemas\> |
+| | \</schemaCollection\>\</schemaCollections\> |
+*-------------------+----------------------------------------------------------------------------+
+
+ Additionally, the plugin is itself an implicit schema collection. In other words, all
+ properties of a schema collection apply as well.
+
+
+Entity Resolvers
+
+ If your schema collection is using xs:include, xs:import or xs:redefine, then it might be
+ important to configure an entity resolver. This applies, in particular, if one or more og
+ the schema files are located elsewhere.
+
+ An entity resolver is configured per schema collection through the property entityResolverMode.
+ This property is a string, which consists of a prefix and a suffix. Possible prefixes are:
-*-------------------+--------------------------------------------------+-----------------------+
-| Name | Description | Example |
-*-------------------+--------------------------------------------------+-----------------------+
-| bindings | Specifies a set of external binding files, which | \<bindings\> |
-| | are being applied. Multiple bindings may be | \<value\> |
-| | specified, each of which containing wildcards. | src/main/jaxme/*.jxb |
-| | | \</value\> |
-| | | \</bindings\> |
-*-------------------+--------------------------------------------------+-----------------------+
-| depends | Specifies additional dependencies. Typically, | \<depends\> |
-| | these are files, which are imported from within | \<value\> |
-| | some schema, but aren't compiled themselves. | src/main/jaxme/*.xsi |
-| | The plugin uses these files within the uptodate | \</value> |
-| | check: Generated sources aren't considered | \</depends\> |
-| | uptodate, if an additional dependency has a more | |
-| | recent modification date. Multiple dependencies | |
-| | may be, each of which may contain wildcards. | |
-*-------------------+--------------------------------------------------+-----------------------+
-| extension | A boolean property, which may be used to enable | \<extension\> |
-| | JaxMe's vendor extensions. By default, JaxMe | true |
-| | is strictly compliant to the JAXB specification. | \</extension\> |
-*-------------------+--------------------------------------------------+-----------------------+
-| force | A boolean property, which disables the uptodate | \<force\> |
-| | check: The value "true" will force invocation of | true |
-| | the binding compiler. This property is mainly | \</force\> |
-| | useful when developing the generator itself. | |
-*-------------------+--------------------------------------------------+-----------------------+
-| packageName | Specifies the package name, in which the | \<packageName\> |
-| | generated sources are being placed. The | com.foo.bar |
-| | preferred way of specifying a package name is | \</packageName\> |
-| | within the jaxb:schemaBindings tag in the | |
-| | schema itself. | |
-*-------------------+--------------------------------------------------+-----------------------+
-| produces | Specifies a set of files, which are being | \<produces\> |
-| | produces. Using these property enables the | \<value\> |
-| | uptodate check: The generator will compare the | build/jaxme/**/* |
-| | modification dates of the input files (given by | \</value\> |
-| | the "schema" and "depends" properties) with the | \</produces\> |
-| | output files, given by "produces". This property | |
-| | is also used, if "removeOldOutput" is set to | |
-| | true, in which case it specifies the set of | |
-| | files, which are being deleted. Multiple | |
-| | "produces" elements may be specified, each of | |
-| | which may contain wildcards. | |
-*-------------------+--------------------------------------------------+-----------------------+
-| properties | Specifies properties, which are being set on the | \<properties\> |
-| | generator object. | \<key\>foo\</key\> |
-| | | \<value\>bar\</value\> |
-| | | \</properties\> |
-*-------------------+--------------------------------------------------+-----------------------+
-| readOnly | Specifies, whether the generated files are being | \<readOnly\> |
-| | made read-only. | true |
-| | | \</readOnly\> |
-*-------------------+--------------------------------------------------+-----------------------+
-| removingOldOutput | Specifies, whether generated files are being | \<removingOldOutput\> |
-| | removed before invoking the generator. This is | true |
-| | useful, if you have elder sources floating | \</removingOldOutput\>|
-| | around, which are no longer compilable. On the | |
-| | other hand, a simple "mvn clean" will do the | |
-| | same trick, so you probably can do very well | |
-| | without "removingOldOutput". | |
-*-------------------+--------------------------------------------------+-----------------------+
-| resourceTarget | Sets the target directory, in which generated | \<resourceTarget\> |
-| | Java sources are being created. Defaults to | target/src-resource |
-| | "${project.build.directory}/jaxme/resource". | \</resourceTarget\> |
-*-------------------+--------------------------------------------------+-----------------------+
-| schemaReader | By default, the generator will use an instance | \<schemaReader\> |
-| | org.apache.ws.jaxme.generator.sg.impl.JAXBSchemaReader | com.foo.MySchemaReader |
-| | for processing its input files. If the | \</schemaReader\> |
-| | "extension" property is set, then the default | |
-| | changes to | |
-| | org.apache.ws.jaxme.generator.sg.impl.JaxMeSchemaReader. | |
-| | But the "schemaReader" option allows you to have | |
-| | a completely different schema reader class. | |
-*-------------------+--------------------------------------------------+-----------------------+
-| schemas | Specifies the set of input schemata, which are | \<schemas\> |
-| | being processed by the generator. You may have | \<value\> |
-| | multiple "schema" elements, each of which | src/main/jaxme/*.xsd |
-| | containing wildcard characters. The default | \</value> |
-| | "src/main/jaxme/*.xsd" is used, if you do not | \</schemas\> |
-| | specify any "schemas" element. | |
-*-------------------+--------------------------------------------------+-----------------------+
-| sgFactoryChain | An instance of SGFactoryChain is an object, | \<sgFactoryChain\> |
-| | which modifies the source generators behaviour. | \<value\> |
-| | Multiple "sgFactoryChain" elements may be used, | com.foo.MyChain |
-| | each containing the fully qualified class name | \</value\> |
-| | of another chain. | \</sgFactoryChain\> |
-*-------------------+--------------------------------------------------+-----------------------+
-| target | Sets the target directory, in which generated | \<target\> |
-| | Java sources are being created. Defaults to | target/src-gen |
-| | "${project.build.directory}/jaxme/java". | \</target\> |
-*-------------------+--------------------------------------------------+-----------------------+
-| validating | By default, the XML schema files are being read | \<validating\> |
-| | with a non-validating parser. Setting this | true |
-| | property to "true" turns on validation. | \</validating\> |
-*-------------------+--------------------------------------------------+-----------------------+
+*----------------+------------------------------------------------------------------------------+
+| Prefix | Description |
+*----------------+------------------------------------------------------------------------------+
+| class: | The suffix is the fully qualified name of a class, which implements the |
+| | EntityResolver interface. An instance of this class is created using |
+| | Class.newInstance() and this instance is used to resolve entities. |
+*----------------+------------------------------------------------------------------------------+
+| classpath: | Entities are resolved through ClassLoader.getResource(String). The suffix is |
+| | prepended to the entity name. For example, if your entities are in the |
+| | "META-INF/schema" directory of a jar file, then you would use |
+| | "classpath:META-INF/schema/". (Note the trailing slash!) |
+*----------------+------------------------------------------------------------------------------+
+| files: | Entities are located in a directory on your file system. The suffix is the |
+| | directory name. Example: "files:/usr/local/schemas/". (Note the trailing |
+| | slash!) |
+*----------------+------------------------------------------------------------------------------+
+| url: | Entities are resolved by appending the entity name to an URL, which is the |
+| | schema modes prefix. Example: "url:http://www.foo.org/schemas/". (Note the |
+| | trailing slash!) |
+*----------------+------------------------------------------------------------------------------+
Modified: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/use.apt
URL: http://svn.apache.org/viewvc/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/use.apt?view=diff&rev=468742&r1=468741&r2=468742
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/use.apt (original)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/use.apt Sat Oct 28 14:27:23 2006
@@ -35,7 +35,7 @@
If you wish to have another location, use the "schema" element
for configuring it. See below for an example.
-* Extending the POM
+* Plugin declaration in the POM
Your POM needs to declare, that you want to use the plugin.
The declaration occurs by adding the following lines:
@@ -64,7 +64,11 @@
--------------------------------------------------------------------
<configuration>
- <schema>src/xsd/*.xsd</schema>
+ <schemas>
+ <schema>
+ <directory>src/xsd/*.xsd</directory>
+ </schema>
+ </schemas>
</configuration>
--------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org