ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCallum <mich...@snaphire.com>
Subject [SUBMIT] wrapper script to launch ant
Date Mon, 06 May 2002 01:56:28 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I find myself with multiple versions of ant and wish to still call 'ant' for each project.

I also hate setting JAVA_HOME and ANT_HOME globally rather just using scripts to populate
it.
Its like setting a global CLASSPATH, yuck.

so i created wrapper script that lets you choose the version of ant to run and stes the java
version as well

it just stores the info in jakarta-antrc (in /etc/jakarta-antrc or ~/.jakarta-antrc or ./.jakarta-antrc
)

- ----------------------------------------
change the ant version

rimu ~/src/jakarta-turbine-maven
$ ant -version
Ant version 1.4.1 compiled on October 11 2001

rimu ~/src/jakarta-turbine-maven
$ ant --change-ant-version
Found these versions for jakarta-ant:
  1) 1.3
  2) 1.4.1
  3) 1.5alpha
  4) current

Please choose a version: 3
Where would you like to save this setting?
 2) User ( /home/michael/.jakarta-antrc )
 3) Local ( /home/michael/src/jakarta-turbine-maven/.jakarta-antrc )
 4) Dont save.

Please choose save type: 3

rimu ~/src/jakarta-turbine-maven
$ ant -version
Apache Ant version 1.5alpha compiled on April 29 2002

- ------------------------------------------------
You can also change java versions:

rimu ~/src/jakarta-turbine-maven
$ ant --change-java-version
Found these versions for java:
  1) j2sdk1.3.1
  2) j2sdk1.4.0

Please choose a version: 2
Where would you like to save this setting?
 2) User ( /home/michael/.jakarta-antrc )
 3) Local ( /home/michael/src/jakarta-turbine-maven/.jakarta-antrc )
 4) Dont save.

Please choose save type: 3

Rather than the standard install mechanism of putting the ant script from the dist in your
path this could be installed instead.

It does require and installation like so though

/usr/share/jakarta-ant/1.3/
/usr/share/jakarta-ant/1.4.1/

where /usr/share can be /usr/local/, /opt/

Michael




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE81eLMiVyQAvn9zYsRAg1GAKCcNEjysAg2P/gk6xdC4G4FOG2AfACglXqs
JVA5YOSVFqI+maPNKDvNimQ=
=bl2+
-----END PGP SIGNATURE-----

Mime
View raw message