We are starting to have support for maven 2 for building org.lcsim.
This is a cheat sheet for building org.lcsim with maven 2.

Prerequisites

  • Maven 2
  • GeomConverter
  • org.lcsim
    Once you have downloaded maven and put the directory where you want it, make sure the executable mvn is in your $PATH. Then you are done with the installation of maven2.

Command line

You can now build org.lcsim with maven2.

mvn

If you want to skip the tests, use

mvn -Dmaven.test.skip=true

Note that Maven 2 also automatically updates the JAS3 plugins

Eclipse integration

First, create a new project with the existing sources for GeomConverter and lcsim. If you have checked out the two projects from cvs, Eclipse will recognize that, so that you have all the cvs commands available within the IDE.

Next, make sure that org.lcsim builds. When building and testing has finished, issue

mvn eclipse:clean
mvn eclipse:eclipse

This will download all dependencies and put the correct paths into the Eclipse .project file. Upon refreshing the project, you should now have code completion working.

Eclipse plug-in

Plug-ins for Eclipse are available from the Maven2 homepage. We have tested the Q plug-in and can confirm it works with maven 2.0.9. Please follow the installation instructions on the web page for the plug-in.

After installing the plug-in, you are now able to build org.lcsim from within Eclipse.

Building a new project

If you now create a new project, have it depend on the lcsim project in Eclipse. In the properties of the lcsim project, in the build path settings, export the dependencies of the lcsim project, so that they are automatically passed down to the new dependent project. Then code completion should also work in the new project that you just created.

Troubleshooting

If everything is screwed up in eclipse (e.g. your programs don't compile any more because of some dependency problems) try:

mvn eclipse:clean
mvn eclipse:eclipse

 in the directory where you have installed lcsim.


  • No labels