Welcome to Geek Times!
spacer
Mac OS X: Jakarta Ant install
Find on this site:


home
search
archive
about

.
Using Ant to build software under Tomcat
23 May 2001

Part of my job is to develop and deploy web-based software. To that end I use the Apache Jakarta Ant build tool.

This page describes the installation of the Apache Jakarta Ant Java-based build tool. Rather than describing what you're doing, I'll show you exactly what to do. You'll do the work of acquiring and installing software from within the Terminal application, using a web browser only for the testing steps.

I assure you that the UNIX commands I'll direct you to invoke have been taken directly from a Terminal window - these are the commands I just used to do a clean install - rather than having been composed after the fact. This is *exactly* what worked for me. I've taken pains to choose forms of the commands which should make sense to you even if you're new to UNIX.

Prepare your environment

Using your favorite text editor (pico, vi, or emacs on the command-line side or SimpleText or BBEdit on the graphic user interface side) edit (or create and edit) a file named .tcshrc in your home directory. Edit this file and ncorporate the following:

# Java on Mac OS X
setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework

# Apache Jakarta Ant
setenv JAKARTA_HOME ~/Applications/java/jakarta
setenv ANT_HOME ${JAKARTA_HOME}/ant-2.3
setenv PATH ${PATH}:${ANT_HOME}/bin

Save the file, return to the Terminal, and set your environment with the settings we just created.

% chmod 775 ~/.tcshrc
% source ~/.tcshrc

Create a place in which to work

As we're going to download the binaries, and no other building of tools is required, we'll proceed directly to specifying where we want Ant to be installed. Following the conventions I've used in building Tomcat we'll be installing in my local Application directory. You may install Ant (and Tomcat) anywhere you like, but then you'll have to change the paths in the commands which follow.

% mkdir -p ~/Applications/java/jakarta/
% cd ~/Applications/java/jakarta/

Get and install Ant

% wget http://jakarta.apache.org/builds/jakarta-ant/release/
v1.3/bin/jakarta-ant-2.3-bin.tar.gz
% gnutar zxf jakarta-ant-2.3-bin.tar.gz
% mv jakarta-ant-2.3 ant-2.3

Clean up after yourself

% rm ~/Applications/java/jakarta/jakarta-ant-2.3
%

You might want to - okay, you really ought to - jump up one level, to see how this fits into the big picture of developing and deploying web-based applications (and to see what other tools I've installed to work with this one).

This page is copyrighted 1993-2006 by Michael 'Mickey' Sattler, some rights reserved via the Creative Commons License. Questions and comments? Send email to the Geek Times Webmaster. (Domain and web content hosting at 1and1.)
email