ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reuleaux, Andreas" <A.Reule...@klopotek.de>
Subject calling ant from cygwin under win32
Date Wed, 13 Dec 2000 14:41:20 GMT
Hi ants,

I am using ant on a win32 System. The Scripts to call ant that come with the
current distribution include

  ant (formerly ant.sh)    ---    a (ba)sh - Skript for UNIX and
  ant.bat                        ---   for the win32 command line
interpreter

I am using cygwin as a better command line interpreter for win32 though,
that is the GNU utils including
bash ported to win32, see http://sources.redhat.com/cygwin

I find myself modifying the ant Skript to be suitable for cygwin each time a
new ant version gets out 
and I wonder if it wouldn't be possible to include such an **ant-cygwin**
Skript in the ant distibution.
Anyone interested will find some hints of what modifications I am using
below.
(I am not sure if alternatively it would be possible to have one single
Script the runs under unix and cygwin).

Andreas

--
Modifications for ant to make it suitable for cygwin:
  * replace ':' by ';' in the classpath as the java-interpreter under win32
wants the path elements separated by ';'
    (but is comfortable with forward slashes in the classpath like 
    -classpath d:/wherever/ant.jar;d:/wherever/blah.jar...)
  * whenever a path is expanded I use double quotes that is I replace
      LOCALCLASSPATH=$LOCALCLASSPATH;$JAVA_HOME/lib/tools.jar
    by 
      LOCALCLASSPATH="$LOCALCLASSPATH;$JAVA_HOME/lib/tools.jar"
    (don't really know why just found the difference is essential in order
to get things running)
  * haven't included the environment classpath $CLASSPATH yet.
  * in my bashrc I have the following settings:
      export JAVA_HOME="d:/jdk1.3"
      export ANT_HOME="d:/win32/ant/v1.2-bin-okt2000"
      export PATH="$PATH:/cygdrive/d/win32/ant/v1.2-bin-okt2000/bin" 
    Beware: :/cygdrive/d/ works for the path in cygwin-bash but confuses the
java-interpreter.
 

Mime
View raw message