ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Luby <patrick.l...@sun.com>
Subject Re: cvs commit: jakarta-ant/src/script ant antRun
Date Fri, 09 Aug 2002 07:36:00 GMT
Stefan,

Stefan Bodewig wrote:
> On 8 Aug 2002, <costin@apache.org> wrote:
> 
> 
>>  1. Removes the extraneous "cd `dirname $PRG`" line
>>  
>>  3. Invoke Java using the "exec" shell command.
> 
> 
> Has this been tested under Cygwin?

Not Cygwin. But I have tried Solaris, Linux, and Mac OS X.

> 
> I'm not sure whether exec works as expected there and cannot test it,
> that's why I've kept away from that patch.
> 

We have been using "exec" in the Tomcat 4.x scripts for quite some time 
now without ill effect.

> Also
> 
> 
>>  @@ -167,7 +165,6 @@
>>     if $cygwin ; then
>>       JIKESPATH=`cygpath --path --windows "$JIKESPATH"`
>>     fi
>>  -  ANT_OPTS="$ANT_OPTS -Djikes.class.path=$JIKESPATH"
>>   fi
> 
> 
> <snip/>
> 
>>  -Djikes.class.path="$JIKESPATH" $ANT_OPTS
> 
> 
> changes things a bit.  In the old version jikes.class.path would be
> left unset if the environment variable JIKESPATH was unset (and you
> are not on MacOS X).  Now this property will be always defined, but
> may get an empty value.
> 

I can generate a reversion of this part of the patch. However, there is 
a bit of a problem. Previously, -Djikes.class.path=$JIKESPATH was 
appended onto $ANT_OPTS and then $ANT_OPTS is included in the Java 
command. The problem is that if $JIKESPATH contains spaces, the above 
will break into 2 arguments: -Djikes.class.path=... and ... The only way 
around this is to explicitly put -Djikes.class.path="$JIKESPATH" in the 
Java command.

> There certainly is a difference between a property that is not set and
> an empty one (see if/unless attributes) and the jikes compiler adapter
> behaves differently as well:
> 
>         String jikesPath = System.getProperty("jikes.class.path");
>         if (jikesPath != null) {
>             classpath.append(new Path(project, jikesPath));
>         }
> 
> which may lead to adding an empty entry to the classpath before
> invoking jikes.

Looking at the o.a.t.a.types.Path code, an empty String looks like it 
will turn into the current working directory :(. This is probably why I 
never found a problem with this change.

> 
> Could you please revert at least this last part of the patch?

I will post a patch in a few minutes that reverts the JIKESPATH always 
== "" problem. Note, however, that Mac OS X will not have JIKESPATH set 
like in the old script. This is because since the Mac OS X official 
release, the compiler classes are included in the bootstrap classpath. I 
believe that the setting of JIKESPATH for Mac OS X is leftover from the 
pre-release versions of Mac OS X.

Patrick

-- 
________________________________________________________________
Patrick Luby                     Email: patrick.luby@sun.com
Sun Microsystems                         Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
________________________________________________________________


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message