ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Problems with the Javac task
Date Thu, 19 Apr 2001 00:03:51 GMT
Nico,

Thanks for looking into it. Turns out if you're using 'jikes' you also
need to point the "extdirs" attribute to nowhere as well. It's an awfully
hacky workaround, though. The way I thought it was supposed to work was
that if you set the include*runtime attrs to "no", then that's all you'd
need to do to get just the classpath you've specified yourself -- and
that's still the way I think it should work. Think it merits discussion on
the dev list?

Thanks,
Diane

--- Nico Seessle <nico@apache.org> wrote:
> ----- Original Message -----
> From: "Diane Holt" <holtdl@yahoo.com>
> To: <ant-user@jakarta.apache.org>
> Sent: Wednesday, April 18, 2001 7:48 PM
> Subject: Re: Problems with the Javac task
> 
> 
> > Stefan, I've also been telling people they can do this, but I hadn't
> > actually tested it yet. Have you tried it? If you have, does it work
> for
> > you? I've just picked up 1.3 and given it a try, and it doesn't appear
> to
> > work for me.
> >
> [...]
> > [BINKY:dianeh]: ant -Dbuild.compiler="jikes" -verbose
> > Ant version 1.3 compiled on March 2 2001
> >
> 
> Now please try with "-Dbuild.compiler=classic" - it works.
> 
> The relevant part from the sources seems to be
> 
>         if ( (bootclasspath == null) || (bootclasspath.size() == 0) ) {
>             // no bootclasspath, therefore, get one from the java
> runtime
>             includeJavaRuntime = true;
>         } else {
>             // there is a bootclasspath stated.  By default, the
>             // includeJavaRuntime is false.  If the user has stated a
>             // bootclasspath and said to include the java runtime, it's
> on
>             // their head!
>         }
> 
> and if you change your example to
> 
> <?xml version="1.0"?>
> <project name="test" default="compile" basedir=".">
>   <target name="compile">
>     <delete file="Test.class"/>
>     <javac
>       srcdir="${basedir}"
>       destdir="${basedir}"
>       includeantruntime="no"
>       includejavaruntime="no"
>       bootclasspath="D:\nowhere"
>       includes="Test.java">
>       <classpath>
>         <pathelement location="D:/jdk117/lib\classes.zip"/>
>       </classpath>
>     </javac>
>   </target>
> </project>
> 
> you get
> 
> D:\temp>ant -Dbuild.compiler="jikes" -verbose
> Ant version 1.4alpha compiled on April 16 2001
> 
> Buildfile: build.xml
> Detected Java Version: 1.3
> Detected OS: Windows 2000
> parsing buildfile D:\temp\build.xml with URI = file:D:/temp/build.xml
> Project base dir set to: D:\temp
> Build sequence for target `compile' is [compile]
> Complete build sequence is [compile]
> 
> compile:
>    [delete] Deleting: D:\temp\Test.class
>     [javac] Test.java added as D:\temp\Test.class doesn't exist.
>     [javac] Compiling 1 source file to D:\temp
>     [javac] Using jikes compiler
>     [javac] Compilation args: jikes -d D:\temp -classpath
> D:\nowhere;D:\temp;D:\jdk117\lib\classes.zip
>     [javac] File to be compiled:
>     D:\temp\Test.java
> 
>     [javac]
>     [javac] Issued 1 system warning:
>     [javac]
>     [javac] *** Warning: The file "D:\nowhere" is not a valid directory.
> 
> BUILD SUCCESSFUL
> 
> Total time: 1 second
> D:\temp>
> 
> Nico
> 
> 


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



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Mime
View raw message