Versions Compared

Key

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

...

Maven can be used as the build system for your project. It automates most of the low-level details of dependencies and building for Java projects. For instance, it can automatically download external JARs required by your project. The org.lcsim project uses this tool for its build system, as well.

Basic Setup

Directory Setup

Create a directory for your project and go into it.

No Format

mkdir myProject
cd myProject

Now, create a directory for your source files, including directories for the org.lcsim base package.

No Format

mkdir -p src/org/lcsim

Build Files

The project's root directory needs to contain three Maven configuration files.

  • project.xml - main configuration file, listing the project's core meta-information and its dependencies
  • maven.xml - Maven settings, such as the default build target
  • project.properties - project properties file, including source repository locations, e.g. freehep.org

...

titleorg.lcsim Source

...

These can be

...

obtained from org.lcsim's root directory

...

.

No Format

cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd lcsim
cd lcsim
cp project.xml maven.xml project.properties ..
cd ..
rm -rf lcsim

After copying these files from the After copying over these files from an org.lcsim checkout, the following lines should be inserted into project.xml to make it depend on org.lcsim, itself.

...