1. Overview
JEUS provides the following Ant tasks to automatize jobs for application development. The user must create buildfiles, which describe the tasks performed by Ant.
This section describes the contents of the buildfiles of each function and how to execute each Ant task using buildfiles. For more information about Ant configuration and its usage, refer to Apache Ant Official Documentation.
Buildfile: build.xml
build.xml is an XML type Ant buildfile that describes Ant tasks. Important parts of the buildfile are included inside the <project> element, and multiple <target> elements generally exist in a project. The <target> element defines an Ant task to be executed.
In order to use an Ant task provided by JEUS, add the following task definition to the build.xml file.
<taskdef resource="jeus/util/ant/jeusant.properties">
<classpath>
<path refid="jeus.libraries"/>
</classpath>
</taskdef>
Project properties are defined in the <project> element, and attribute values can be used through expressions like ${property-name}.
When using the Ant task provided by JEUS, specifying "jeus.home" in the project of a buildfile is recommended. This is because a target running in a project may require the JEUS_HOME directory information. JEUS_HOME is a static final variable that fixes its value to the initial value specified in a single JVM. However, if a target that does not require JEUS_HOME information is executed first, JEUS_HOME is set to null. A target that requires JEUS_HOME information uses the value specified by the previously executed target, which can cause the program to run incorrectly. |