wiki:AppBuilding

Application Building

This page describes how to build single applications. For official release and nightly build information/procedures, see Automated Build Process. For detailed documentation on each build file, see Important Build Files

OpenSHA uses Apache Ant to automate the build process.

Using Eclipse

To build an application using eclipse, open ant/MultiAppBuilder.xml inside eclipse. If you don't see the "Outline" view (usually on the right side of your eclipse workspace), first make sure you're in the Java perspective. If it still doesn't show up, go to Window -> Show View -> Outline.

Locate the task for the application(s) that you would like to build in the outline. For example:

  • build.hc.local - for Hazard Curve Local Mode Application
  • build.local - for all Local Mode Applications
  • build.atten.rel - for the Attenuation Relationship Plotter Application

Right click on the task, and select "Run As -> Ant Build". Progress will be shown in the console window. Resulting jar files will be stored in the "dist" folder.

On the Unix/Linux/Mac OS-X command line

In a terminal, navigate to the "ant" directory. The script runAnt.sh can be used to build applications. First make sure that you have ant installed and in your path:

[1:opensha] ~: ant -version
Apache Ant version 1.7.0 compiled on December 13 2006

The usage for the runAnt.sh script is: ./runAnt.sh [buildFile [target]]

If you run it without any arguments, it will use the build.xml build file with the default target. If you want to build a specific application, here is the syntax:

./runAnt.sh MultiAppBuilder.xml build.(APP NAME)

For example, to build the Hazard Curve Local Mode Application:

./runAnt.sh MultiAppBuilder.xml build.hc.local

Or, to build all local mode applications:

./runAnt.sh MultiAppBuilder.xml build.local

See Important Build Files for a list of more application build targets.

Last modified 54 years ago Last modified on Dec 31, 1969, 4:35:47 PM