ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: calling ant from cygwin under win32
Date Wed, 13 Dec 2000 16:54:30 GMT
--- "Reuleaux, Andreas" <A.Reuleaux@klopotek.de> wrote:
> 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 ';'

I run under MKS on NT, so I use the 'ant' script as well (not the .bat)
--but I want to allow for running on Unix boxen as well, so I modified the
'ant' script to do a:
  [ "`uname`" = "Windows_NT" ] && {
    CPS=";"
  } || {
    CPS=":"
  }
Then use $CPS in the line that sed's the spaces in setting LOCALCLASSPATH.
Granted, it's only slightly more robust than hard-coding a single value,
but you could and -o's to the test for other Windoze OS names.

>   * 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)

Because if you don't protect the semi's from being interpreted by the
shell, it'll see them as command separators, which will clearly bomb out
but good. :)

>   * haven't included the environment classpath $CLASSPATH yet.

I don't do anything with the $CLASSPATH in my environment when using 'ant'
-- I do all that with properties files read in at run-time (which ones get
read in is based on what certain env vars are set to [eg., ANT_COMPILER,
JDK, etc.], which the script deals with by passing them in as properties
on the 'java' command-line [the <property> tasks read in things like
${build.compiler}.properties, ${jdk}.properties, etc.]).

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Mime
View raw message