Basic Project Template

Introduction

Basic project template is intended to help users starting Hyperjaxb3 projects. This is a simple project templates which contains the prepared directory structure, build scripts (for Ant or Maven) and libraries (in case of Ant).

You can download the basic project template here

Usage

Directory structure

Below is the directory structure of the basic project template.

As noted above, the src/main/resources folder is used to store schema and binding files; src/test/samples is used for XML samples used during the Roundtrip Test.

Build phases

Both Maven and Ant builds execute the following build phases:

clean

This phase clean the project, removes the target directory.

generate-sources

During this phase JAXB schema compiler (XJC) together with Hyperjaxb3 XJC plugin generate source code in target/generated-sources/xjc.

compile

This phase compiles the main Java code in src/main/java and generated Java code target/generated-sources/xjc. Compiled code will be placed under target/classes.

test-compile

This phase compiles the test Java code in src/test/java. Compiled code will be placed under target/test-classes.

test

Executes unit tests from src/test/java and target/generated-sources/xjc. Basic project template instructs Hyperjaxb3 to generate XML-database rountrip test (unmarshall-save-load-marshall-compare) which is used to test if generated ORM annotations or mappings are functional.

Roundtrip test executed during this phase uses persistence properties from src/test/persistence.properties to configure the persistence provider. XML samples used for roundtripping are taken from the src/test/samples folder.

package

Packs the compiled code from target/classes and place the generated jar in the target directory.

Using a different JPA provider

Using a different database


Browse Space

- Pages
- News
- Labels
- Attachments
- Bookmarks
- Mail
- Activity
- Advanced

Explore Confluence

- Popular Labels
- Notation Guide
- Impressum

Your Account

Log In

 

Other Features

Add Content