This pages describes how to easily create a new project which uses the org.lcsim analysis/reconstruction framework. This method makes use of a maven2 archetype, which automates the process of creating a new project from scratch. The maven2 archetype can be used either from within Netbeans or from the command line.

Creating a new LCSIM project using Netbeans (6.5 or later)

I assume you have already installed netbeans 6.5 and the maven plugin.

  • From the Netbeans menu Choose File, New Project. Then select Maven, Maven Project, click Next>
  • Click Add... then fill in the "Specify archetype details" dialog as shown:
  • and click OK.
  • Select "Custom archetype - lcsim-example-archetype", click Next>
  • Fill in the form, choosing a project name, and replacing com.mycompany with your own package name (for example org.lcsim.contrib.tony). Click Finish
  • Netbeans should open your project. You should immediately be able to build and then run it. Now just started editing the ExampleDriver.java file to make the project do as you like.

Creating a new LCSIM project from the command line

Issue the following commands:

mvn archetype:create -DarchetypeGroupId=org.lcsim -DarchetypeArtifactId=lcsim-example-archetype -DarchetypeVersion=1.1-SNAPSHOT -DgroupId=org.lcsim.contrib.tony -DartifactId=MyLCSimBasedProject -DremoteRepositories=http://lcsim.org/maven2
cd MyLCSimBasedProject
mvn install

It is not currently possible to run the project from the command line, but Jeremy could probably fix that.

Care and feeding of the lcsim-example-archetype

The lcsim-example-archetype is itself a maven project which lives in CVS as module lcsim-example-archetype. The built-in version numbers will need to be updated, and the project re-deployed, when we make a new lcsim release.

  • No labels