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 executablemvn
is in your$PATH
. Then you are done with the installation of maven2.
Command line
The proper command to run maven2 is "mvn". Before building the org.lcsim
libraries with it, you have to create a symbolic link from pom2.xml
to pom.xml
in the main directory of org.lcsim
. In Unix derivates you would go about it like this:
...
You can now build org.lcsim with maven2.
...
Eclipse integration
First, we have to inform Eclipse where to find the maven repository.
Code Block |
---|
mvn -Declipse.workspace=<eclipse workspace dir> eclipse:add-maven-repo |
You will have to restart Eclipse after running this commandcreate 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
...
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
...
Code Block |
---|
ln -s ~/.m2 ~/m2 |
and then change the value of "Preferences->Java->Build Path->Classpath Variables"
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.79. Please follow the installation instructions on the web page for the plug-in.
...