License     Codehaus     OpenEJB     OpenJMS     OpenORB     Tyrex     
 

Main
  Home
  About
  Features
  Download
  Dependencies
  JavaDoc
  Maven 2 support
  Maven 2 archetypes
  DTD & Schemas
  Recent HTML changes
  News Archive
  RSS news feed

Development/Support
  Mailing Lists
  SVN/JIRA
  Contributing
  Support
  Prof. services

Related projects
  Spring ORM support
  Spring XML factories
  WS frameworks

XML
  Using XML
  XML Mapping
  Configuration
  Properties
  XML parsers
  XML FAQ
  XML HOW-TOs
  Tips & Tricks
  Custom Handlers
  Best practice

XML Code Generator
  Introduction
  Properties
  Custom bindings
  Ant task
  Maven 2 plugin
  Command line
  Schema Support
  Example

JDO
  Introduction
  First steps
  Using JDO
  JDO Config
  Types
  JDO Mapping
  JDO FAQ
  JDO Examples
  JDO HOW-TOs
  Tips & Tricks
  Other Features
  JDO sample JAR

Tools
  Schema generator

Advanced JDO
  Caching
  OQL
  Trans. & Locks
  Design
  KeyGen
  Long Trans.
  Nested Attrs.
  Pooling Examples
  LOBs
  Best practice

DDL Generator
  Using DDL Generator
  Properties
  Ant task
  Type Mapping

More
  Presentations
  The Examples
  3rd Party Tools
  JDO Tests
  XML Tests
  Configuration
 
 

About
  License
  Contributors
  Marketplace
  Status, Todo
  Changelog
  Library
  Contact
  Project Name

  



How to use the Maven 2 archetypes for Castori

Documentation Author(s):
Werner Guttmann


Introduction
    Template for XML code generator test case


Introduction

Maven 2 has a very sophisticated feature named 'archetype' for bootstrapping development with e.g. frameworks such as Castor is. As we do have a very high appreciation for the benefits of this feature, we provide a selection of Maven 2 archetypes for Castor.

NameDescription
codegen-testcase A template for a XML code generator test case, incl. JUnit test case, sample XML schema, builder properties and binding file.

Template for XML code generator test case

This archetype creates a standard Maven project with a preconfigured project structure that includes the following artefacts:

-JUnit test case
-Sample XML schema
-(Empty) builder properties file
-(Empty) XML code generator binding file
-A Maven 2 POM with all the required dependencies (Castor XML, etc.).

In order to e.g. create a project based upon the codegen-testcase archetypes shown above, please issue the following Maven goal on your command line (of choice):

> mvn archetype:create -DarchetypeGroupId=org.codehaus.castor \
                       -DarchetypeArtifactId=testcase-archetype \
                       -DarchetypeVersion=1.0  \
                       -DgroupId=<your.group.id> \
                       -DartifactId=<your.artitact.id> \
                       -DpackageName=    

In case you are trying to use an archetype that has been made available as a snapshot release only, please makse sure you include the Codehaus Maven 2 repository in the command as shown above similar to ...

> mvn archetype:create -DarchetypeGroupId=org.codehaus.castor \
                       -DarchetypeArtifactId=testcase-archetype \
                       -DarchetypeVersion=1.0-SNAPSHOT  \
                       -DgroupId=<your.group.id> \
                       -DartifactId=<your.artitact.id> \
                       -DpackageName=    
                       -DremoteRepositories=http://maven.codehaus.org/maven2/

Once a specific Castor release has been propagated to the main Maven 2 repository at ibiblio (usually within 48 hours), adding just the dependency will be sufficient.

 
   
  
   
 


Copyright © 1999-2005 ExoLab Group, Intalio Inc., and Contributors. All rights reserved.
 
Java, EJB, JDBC, JNDI, JTA, Sun, Sun Microsystems are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and in other countries. XML, XML Schema, XSLT and related standards are trademarks or registered trademarks of MIT, INRIA, Keio or others, and a product of the World Wide Web Consortium. All other product names mentioned herein are trademarks of their respective owners.