Version 5 (modified by 55 years ago) (diff) | ,
---|
Application Building
This page describes how to build single applications. For official release and nightly build information/procedures, see BuildProcess
OpenSHA uses Apache Ant to automate the build process.
All ant build scripts are located in the ant directory.
Important Files
build.xml
Common build functions, including project building (building the entire project in your working directory, not creating jars) are loacted in this file. This file is also used by other build files to avoid duplication.
CompleteJar.xml
Creates single jar distributions. For a complete distribution (including data files), use the "jar.full.dist" target. To simple create a jar with all Java classes, use the "jar.classes.only" target
AppBuilder.xml
This is the core app building file. This will build a jar for a single application. It should not be run directly, however. It should be run by a separate build file, with the following properties set:
Properties that must be set
- app.short.name - (required) The "short" name for the application (should not contain spaces/special characters).
- example: HazardCurveLocal
- app.main.class - (required) The Java main class for the application.
- example: org.opensha.sha.gui.HazardCurveLocalModeApplication
- javac.includes - (recommended) The javac includes for the application. Multiple patterns/files can be comma separated. If omitted, all .java files will be compiled. See "includes" for the Javac Ant Task for more information.
- example: org/opensha/sha/gui/HazardCurveLocalModeApplication.java
- example: org/opensha/sha/gui/HazardCurveLocalModeApplication.java,org/opensha/imr/**/*.java
- javac.excludes - (optional) The javac excludes for the application. Multiple patterns/files can be comma separated. See "excludes" for the Javac Ant Task for more information.
- example: org/opensha/sra/'
- resource.target - (recommended) The target from build.xml that should be executed to copy resources for this application.
- example: resource.hazard.apps
- example: resource.hazard.apps.server
- example: resource.misc.required
- rmi.target - (optional) The target from build.xml that should be executed to compile RMI classes. Only required for RMI (remote) applications.
- example: rmi.hazard.curve
MultiAppBuilder.xml
This file is used to actually build the application jar files. It contains targets which call AppBuilder.xml for each application.
Targets
- build.nightly - Should not be run by end users, for more information see BuildProcess
- build.dist - Should not be run by end users, for more information see BuildProcess
- build.all - Build all standard local and remote applications
- build.local - Build only local applications
- build.server - Build only remote (RMI) applications
- build.(APP NAME) - build a single application
..