Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The SLAC CVS contains a sample module Maven project called ExampleMavenProject that can be used as a template for your own Maven-based projects.

Obtaining

To obtain the ExampleMavenProject module, execute this CVS command from a work directory.

No Format
cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd co ExampleMavenProject

This project is ready to use simple project can be used as a template for starting new project or as a platform for experimentation with package imports, scratch Java code execution, etcand JAS3 plugins.

Anatomy of the Project

Directories

...

The src dir is the root area for Java source code. (

Tip
titleYour Source Code

All the code for your project should be placed someplace under src.

...

The test dir contains unit tests that use . LCSim uses the JUnit testing framework.test framework.

Tip
titleUnit Tests

Ideally, each of your Java classes should have a unit test.

These directories can be customized or additional ones can be added by modifying the project.xml file. (which is beyond the scope of this tutorial)

Maven Build Files

The ExampleMavenProject module contains the following Maven files, which should be included in a new Maven project.

...