Build Ant Applications
You can use Apache Ant to automate your build processes, as described in its build files:
-
Upload the Ant build files (such as
build.xml
andbuild.properties
) to the project Git repository. -
Open the job’s configuration page.
-
In the Git tab, add the Git repository where you uploaded the build files.
-
Click the Steps tab.
-
From Add Step, select Ant.
-
In Targets, specify the Ant targets or leave it empty to run the default Ant target specified in the build file.
-
In Build File, specify the path of the build file.
-
If necessary, in Properties, specify the values for properties used in the Ant build file:
# comment name1=value1 name2=$VAR2
When a build runs, these values will be passed to Ant as
-Dname1=value1 -Dname2=value2
. You should always use$VAR
for parameter references instead of using%VAR%
). Use a double backslash (\\
) to escape a backslash (\). Avoid using double-quotes ("). To define an empty property, usevarname=
in the script. -
If your build requires a custom
ANT_OPTS
, specify it in Java Options. You may use it to specify Java memory limits (example:-Xmx512m
). Don’t specify other Ant options here (such as-lib
), but specify them in Targets. -
Click Save.
For more information, see https://ant.apache.org/
.