Versions Compared

Key

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

...

The primary tool produced by the installation is a standalone, runnable jar file that can be used along with XML steering files to run reconstruction or analysis jobs.

In order to test the installation, you may execute a command such as the following, where VERSION is replaced by your actual version from the last successful build.

...

The Maven tool will also install this file into your local repository.  This

Here is an example of running the bin jar from your its location in the local repository directory.

No Format
java -jar ~/.m2/repository/org/hps/hps-distribution/3.0.3-SNAPSHOT/hps-distribution-3.0.3-SNAPSHOT-bin.jar

Congratulations!  You now have a working local installation of HPS Java.


Running HPS Java
describes in much greater detail how to run various command line tools in HPS Java using the distribution jar.

...

As an alternative to the above instructions for building the software locally, you may also download and run the a distribution jars jar from a the Nexus repository.

This search URL will show the most recent release of the distribution jar that can be downloaded.  You can simply click on the "bin jar" link for the distribution version you want to download, save it to your machine, and run it using the previous instructions.

You can may also directly download a jar using (rather ugly) URLs like this which should work in tools like wget.

...

Code Block
languagebash
wget "http://srs.slac.stanford.edu/nexus/service/local/artifact/maven/redirect?r=lcsim-maven2-releases&g=org.hps&a=hps-distribution&v=3.6&e=jar&c=bin" -O hps-distribution-3.6-bin.jar

This The above example command will save the 3.6 distribution jar as the file hps-distribution-3.6-bin.jar in the current directory.

Resolving Maven Dependencies

Maven is able to resolve project dependencies by downloading jar files from remote repositories.  In order to do this, it must know about the locations of these jars, or local builds can fail with errors about missing dependencies.

This should not be a problem when building the entire trunk  But errors may occur when building individual modules, if the parent POM has not already been installed locally beforehand.

There are several different ways to resolve these kinds of issues, and generally only one will be needed:

  1. Install the entire set of modules locally by building the trunk.
  2. Checkout and build the parent module at svn://svn.freehep.org/hps/java/trunk/parent which contains the remote repository locations.
  3. Add the remote repository to your global Maven settings file.

The third option entails adding the remote repository information to a local settings file that will apply to all your local Maven builds.

In order to do this, the following XML can be put into the file ~/.m2/settings.xml which you should create if it does not exist already:

Example Settings for Dependency Resolution

No Format
<?xml version="1.0"?>
<settings>
    <profiles>
        <profile>
            <id>yourNameHere</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>lcsim-maven</id>
                    <name>org.lcsim Maven Repository</name>
                    <url>http://srs.slac.stanford.edu/nexus/content/groups/lcsim-maven2-public/</url>
                </repository>
            </repositories>
        </profile>
    </profiles>
</settings>

The above configuration will allow Maven to check the repository used by HPS whenever it looks for dependencies during a build.

Maven Repos

The following Maven repositories provide the the jar dependencies for HPS Java, which are not found in Maven central.

Freehep Repository

 

Code Block
languagexml
<repository>    
    <id>freehep-repo-public</id>
    <name>FreeHEP Maven Public</name>
    <url>http://srs.slac.stanford.edu/nexus/content/groups/freehep-maven2-public/</url>
</repository>

LCSim Repository

 

Code Block
languagexml
<repository>
    <id>lcsim-repo-public</id>
    <name>LCSIM Public Maven Repository</name>
    <url>http://srs.slac.stanford.edu/nexus/content/groups/lcsim-maven2-public/</url>
</repository>

 

CODA Repository

 

...

languagexml

...

 in the current directory.