Magic runs on top of Ant. Before installing Magic you need to build or download a binary installation of Ant (version 1.6.2 or later).
Using MAGIC_HOME ...
Magic registers content in a common repository. If you want to
share the repository with Merlin or other repository enabled products
you should define the MAGIC_HOME
environment variable with a value
pointing to a directory within which the repository will be created. If
undefined, the installation will create the magic installation in
${user.home}/.magic.
Download setup.xml from Apache.
From within the directory that you downloaded setup.xml to ...
$ ant -buildfile setup.xml
The above command invokes ant. Ant will downloads the magic library and installs this under ${user.home}/.ant/lib as an antlib extension. In addition the procedure will also check for the presence of JUnit libraries in Ant's claspath and if required the necessary jar files will be download and installed.