Ant Script Library: asl-java-package.xml

Overview

asl-java-package.xml contains properties and targets that are used to create an application package. That is, a zip file containing an executable jar, wrapper scripts for the operating system, library jars and configuration.

The default directory layout of the zip file will be as follows:

/
 + ${ant.project}.jar
 + run.cmd
 + run.sh
 +--config/
 |  + (configuration files in this directory)
 |  ...
 +--lib/
    + (library jars in this directory)
    ...

There is a prerequisite that is required for an application package to work, namely the property java-build.jar-main-class must be set (see the documentation of the jar target for details.

Properties

Name Default Value Description
java-package.pkg-dir ${common.target-dir}/package The directory where the package structure will be set up in preparation for creating the zip file.
java-package.pkg-lib-dir ${java-package.pkg-dir}/lib The directory where all the library jars in the runtime classpath will be copied.
java-package.src-config-dir config The location of the directory containing configuration files for the application (this is optional)
java-package.pkg-config-dir ${java-package.pkg-dir}/config The directory where all the configuration files will be copied
java-package.run-sh-name run.sh The name of the script file that will run on Unix compatible systems.
java-package.run-sh-file ${java-package.pkg-dir}/${java-package.run-sh-name} The location of the script file that will run on Unix compatible systems.
java-package.run-cmd-name run.cmd The name of the script file that will run on Windows.
java-package.run-cmd-file ${java-package.pkg-dir}/${java-package.run-cmd-name} The location of the script file that will run on Windows.
java-package.jvm-options (not set) Optional command line options that will be passed to the JRE inside the application scripts.
java-package.package-version release-version if it is set, otherwise dev-${common.date-iso} The version of the package.
java-package.zip-dir ${common.dist-dir} The directory where the zip file will be created.
java-package.zip-file ${java-package.zip-dir}/${ant.project.name}-${release.version}.zip The location of the zip file that will be created.

Targets

package

Creates an application package. That is, a zip file containing an executable jar, wrapper scripts for the operating system, library jars and configuration.

install

Installs the application package to a directory specified by the property "install-dir". If this property is undefined, the user will be prompted.


Is there a problem or mistake on this page? Do you want to contribute some changes? Send me an email at joe@exubero.com.