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 2005/12/13 21:01:25 UTC

svn commit: r356601 [3/3] - in /webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin: ./ src/main/java/org/apache/ws/jaxme/maven/plugins/ src/schema/ src/site/ src/site/apt/

Added: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/goals.apt
URL: http://svn.apache.org/viewcvs/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/goals.apt?rev=356601&view=auto
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/goals.apt (added)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/goals.apt Tue Dec 13 12:00:57 2005
@@ -0,0 +1,34 @@
+~~
+~~
+~~  Copyright 2005  The Apache Software Foundation
+~~
+~~  Licensed under the Apache License, Version 2.0 (the "License");
+~~  you may not use this file except in compliance with the License.
+~~  You may obtain a copy of the License at
+~~
+~~  http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~  Unless required by applicable law or agreed to in writing, software
+~~  distributed under the License is distributed on an "AS IS" BASIS,
+~~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~  See the License for the specific language governing permissions and
+~~  limitations under the License.
+~~
+~~
+		   ---------------
+           Available Goals
+           ---------------
+
+Available Goals
+
+  The Maven JaxMe Plugin specifies the following goals: See the
+  {{{./properties.html}property list}} for details on how to
+  configure these goals.
+
+*--------------+---------------------------------------------------+
+| Goal         | Description                                       |
+*--------------+---------------------------------------------------+
+| jaxme:jaxme  | Invokes the binding compiler                      |
+*--------------+---------------------------------------------------+
+
+  
\ No newline at end of file

Added: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewcvs/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/index.apt?rev=356601&view=auto
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/index.apt (added)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/index.apt Tue Dec 13 12:00:57 2005
@@ -0,0 +1,40 @@
+~~
+~~
+~~  Copyright 2005  The Apache Software Foundation
+~~
+~~  Licensed under the Apache License, Version 2.0 (the "License");
+~~  you may not use this file except in compliance with the License.
+~~  You may obtain a copy of the License at
+~~
+~~  http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~  Unless required by applicable law or agreed to in writing, software
+~~  distributed under the License is distributed on an "AS IS" BASIS,
+~~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~  See the License for the specific language governing permissions and
+~~  limitations under the License.
+~~
+~~
+           ------------------
+           Maven JaxMe Plugin
+           ------------------
+
+The Maven JaxMe Plugin
+
+  {{{http://ws.apache.org/jaxme}JaxMe}} is a
+  {{{http://java.sun.com/webservices/jaxb/}JAXB}} compliant
+  binding compiler, which takes an XML Schema as input and generates
+  Java classes. Using these classes to process XML documents, which
+  are matching the schema, is an easy and convenient task.
+
+  {{{http://maven.apache.org}Maven}} is a very powerful build
+  and development framework for Java programmers. It is based on
+  a set of so-called plugins: There are plugins for compiling
+  Java sources, creating Jar files, and so on.
+
+  The Maven JaxMe Plugin allows to use JaxMe from within Maven.
+  Basically, you configure the plugin by telling him what schemas
+  are being read, and that's it. The plugin will invoke the
+  binding compiler for you, generate the classes and make sure,
+  that they are compiled together with the manually written
+  sources.

Added: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/properties.apt
URL: http://svn.apache.org/viewcvs/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/properties.apt?rev=356601&view=auto
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/properties.apt (added)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/properties.apt Tue Dec 13 12:00:57 2005
@@ -0,0 +1,118 @@
+~~
+~~
+~~  Copyright 2005  The Apache Software Foundation
+~~
+~~  Licensed under the Apache License, Version 2.0 (the "License");
+~~  you may not use this file except in compliance with the License.
+~~  You may obtain a copy of the License at
+~~
+~~  http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~  Unless required by applicable law or agreed to in writing, software
+~~  distributed under the License is distributed on an "AS IS" BASIS,
+~~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~  See the License for the specific language governing permissions and
+~~  limitations under the License.
+~~
+~~
+		   ----------
+           Properties
+           ----------
+
+Properties
+
+  The following properties are available for configuring the
+  Maven JaxMe Plugin:
+
+*-------------------+--------------------------------------------------+-----------------------+
+| Name              | Description                                      | Example               |
+*-------------------+--------------------------------------------------+-----------------------+
+| depends           | Specifies additional                             | \<depends\>           |
+|                   | dependencies. Typically, these are files, which  |   \<value\>           |
+|                   | are imported from within some schema, but        |     src/jaxme/*.xsi   |
+|                   | aren't compiled themselves. The plugin uses      |   \</value>           |
+|                   | these files within the uptodate check: Generated | \</depends\>          |
+|                   | sources aren't considered uptodate, if an        |                       |
+|                   | additional dependency has a more recent          |                       |
+|                   | modification date. Multiple dependencies may be  |                       |
+|                   | specified (by repeating the "depends" element),  |                       |
+|                   | all 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   | \<schema\>            |
+|                   | being processed by the generator. You may have   |   \<value\>           |
+|                   | multiple "schema" elements, each of which        |     src/jaxme/*.xsd   |
+|                   | containing wildcard characters. The default      |   \</value>           |
+|                   | "src/jaxme/*.xsd" is used, if you do not specify | \</schema\>           |
+|                   | any "schema" 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\>       |
+*-------------------+--------------------------------------------------+-----------------------+

Added: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/use.apt
URL: http://svn.apache.org/viewcvs/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/use.apt?rev=356601&view=auto
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/use.apt (added)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/apt/use.apt Tue Dec 13 12:00:57 2005
@@ -0,0 +1,95 @@
+~~
+~~
+~~  Copyright 2005  The Apache Software Foundation
+~~
+~~  Licensed under the Apache License, Version 2.0 (the "License");
+~~  you may not use this file except in compliance with the License.
+~~  You may obtain a copy of the License at
+~~
+~~  http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~  Unless required by applicable law or agreed to in writing, software
+~~  distributed under the License is distributed on an "AS IS" BASIS,
+~~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~  See the License for the specific language governing permissions and
+~~  limitations under the License.
+~~
+~~
+           ----------------
+           Using the Plugin
+           ----------------
+
+Using the Plugin
+
+  Using the plugin is relatively simple and requires the following steps:
+
+* Creating a schema folder
+
+  By default, the plugin searches for schema files in
+  <<<src/jaxme>>>. More precisely, it uses the wildcard
+  <<<src/jaxme/*.xsd>>> when looking for schema files. In other
+  words, you put your schema files into <<<src/jaxme>>>, and
+  call them <<<something.xsd>>>. That way, the plugin will
+  automatically detect them.
+
+  If you wish to have another location, use the "schema" element
+  for configuring it. See below for an example.
+
+* Extending the POM
+
+  First of all, there is currently no official release of the
+  plugin. For that reason, it is currently not distributed via
+  the central Maven repository. In other words, we need to
+  declare an additional repository:
+
+--------------------------------------------------------------------
+  <repositories>
+      <repository>
+      <id>jochen</id>
+      <name>people.apache.org/~jochen</name>
+      <url>http://people.apache.org/~jochen/jaxme/dist</url>
+    </repository>
+  </repositories>
+--------------------------------------------------------------------
+
+  This step will vanish as soon as we have a first release.
+
+  Your POM needs to declare, that you want to use the plugin.
+  The declaration occurs by adding the following lines:
+
+--------------------------------------------------------------------
+    <plugins>
+      ... Possibly more plugin declarations here
+      <plugin>
+        <groupId>org.apache.ws.jaxme</groupId>
+        <artifactId>maven-jaxme-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>jaxme</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+--------------------------------------------------------------------
+
+  Note, that the "plugin" section might also contain a
+  "configuration" element, if you need additional configuration.
+  For example, the following might advice the plugin to search
+  for schema files in "src/xsd", rather than "src/jaxme":
+
+--------------------------------------------------------------------
+        <configuration>
+          <schema>src/xsd/*.xsd</schema>
+        </configuration>
+--------------------------------------------------------------------
+
+  See the {{{./properties.html}property page}} for more details
+  on the plugins configuration.
+
+* That's it!
+
+  Really, you're done. Maven will automatically invoke the plugin
+  for you. The plugin will generate sources, and advice Maven to
+  compile them. Nice, isn't it? :-)

Added: webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/site.xml
URL: http://svn.apache.org/viewcvs/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/site.xml?rev=356601&view=auto
==============================================================================
--- webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/site.xml (added)
+++ webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/src/site/site.xml Tue Dec 13 12:00:57 2005
@@ -0,0 +1,41 @@
+<!--
+
+  Copyright 2005  The Apache Software Foundation
+  
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+ -->
+<project name="JaxMe API">
+    <bannerLeft>
+        <name>Maven JaxMe Plugin</name>
+        <src>http://ws.apache.org/jaxme/images/group-logo.gif</src>
+        <href>http://ws.apache.org/jaxme/</href>
+    </bannerLeft>
+    <body>
+        <links>
+            <item name="Apache" href="http://www.apache.org/"/>
+            <item name="Webservices" href="http://ws.apache.org/"/>
+            <item name="JaxMe" href="http://ws.apache.org/jaxme/"/>
+            <item name="Maven Plugin" href="http://ws.apache.org/jaxme/mp/"/>
+        </links>
+
+        <menu name="Maven JaxMe Plugin">
+            <item name="About" href="/index.html"/>
+            <item name="Use" href="/use.html"/>
+            <item name="Goals" href="/goals.html"/>
+            <item name="Properties" href="/properties.html"/>
+        </menu>
+
+    ${reports}
+    </body>
+</project>



---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org