Ant
This area should be used for discussions related to using Apache Ant with uPortal.
Description
Apache Ant is a Java-based build tool. It is a platform independant tool that is used to compile uPortal as well as perform numerous additional tasks, such a deploying all necessary files to the web application container, build and load the database, as well as several others.
The tool uses a build.xml file and build.properties file to create a number of tasks which ant will perform. While it's best to refer to the Apache Ant documentations for specifics on how to use Ant there are a couple of tricks worth mentioning.
First, in order to use Ant, two environment variables must be set:
- ANT_HOME - This variable points to the location where Ant has been installed. For example,
/usr/local/apache-ant-1.6.5
on a unix system, orC:/Ant
on a windows machine. - JAVA_HOME - This variable points to the location where the Java SDK has been installed, for example,
/usr/local/jdk-1.5.0
It is also very useful to put the ANT_HOME/bin variable in the systems standard search path.
Ant has quite a few command line options which may be used. Perhaps the most useful is the -find
option. If Ant is invoked with the -find
option it will look for the specified build file from the dirctory in which it is invoked, up the directory tree until it finds the build file. For example, if one is currently in a directory such as /usr/local/src/uPortal_rel-2-5-1/src/org/jasig/
and the following command is executed:
ant -find build.xml
it will traverse the directory tree upwards until it finds a build file called build.xml and execute the default task.
The other Ant option that is often useful is the -projecthelp
option. When the following command is issued:
ant -projecthelp
it will look in the default build file (build.xml) and display all of the tasks that have been configured.