ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Mailhot <Nicolas.Mail...@laposte.net>
Subject Re: [JPackage-devel] FW: jakarta ant 1.4.1/1.5 ant script
Date Tue, 30 Apr 2002 11:51:54 GMT
Hi all,

	Ok, I guess it was time for a new version of the script. Main changes :
        * correct the typo spotted by Henri
        * build working classpaths out of dirs and jars with spaces in
          the name (original method didn't work, new method should have
          but didn't, newser new method was tested a bit and works at
          least on my setup)
        * automatically detect java functions and use them :
            * set_jvm originates in tomcat3, was cleaned up by me and
              later Guillaume, has been used by jpackage ever since. It
              will try to find a jvm in a list of know locations if
              JAVA_HOME is not defined
            * set_javacmd is a new one. the AIX hack shows we need to
              test for not-standard jvm layouts. I've not added it to
              the jpackage java-functions yet, but it could look like
              the following :
        
        set_javacmd() {
        
        [ -x "$JAVACMD" ] && return
        
        # Add all sorts of jvm layouts here
        
        [ -x "$JAVA_HOME/jre/sh/java" ] &&
        JAVACMD="$JAVA_HOME/jre/sh/java"
        
        [ ! -x "$JAVACMD" -a -x "$JAVA_HOME/bin/java" ] &&
        JAVACMD="$JAVA_HOME/bin/java"
        
        [ ! -x "$JAVACMD" ] && JAVACMD="java"
        
        }
        
        The fact tomcat knew how to look for a jvm but not about the aix
        hack, and ant about the aix hack but not how to search for jvm
        strongly hints these functions must exist and be externalized
        (i.e not project specific). The new version of the script will
        look for a common functions files when we know it exists (i.e.
        in rpm mode) and else fall back on a (maybe obsolete) copy that
        could be shipped with ant

I didn't change back the $() back since it's required by posix and the
few test we did with csh-like scripts show some versions won't even
accept ``. csh support should be done via scripts written in c-shell
syntax by c-shell users IMHO.

Comments ?

-- 
Nicolas Mailhot

Mime
View raw message