ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: Switching versions of java during an ant build
Date Tue, 16 Apr 2002 15:04:16 GMT
I would probable have 2 scripts kicking off Ant with different environment
settings (i.e. pointing to the 2 different SDKs). It would be SO sweet if
you were able to pass a value for JAVA_HOME (or any environment variable for
that matter) on tasks, probably should be paired with fork=true?

For the time being, can you kick off the 2 discrete compilation steps
seperately and then maybe go into a joint remainder of the build once you
don't depend on using a specific SDK version anymore?

> ----- Original Message -----
> From: "Daniel Barclay" <>
>> > -----Original Message-----
>> > From: []
>> > ...
>> >
>> > Would that still allow him to run javadoc from the standard
>> > <javadoc> task?
>> Should Ant provide a general way to run tasks using different Java
>> platform versions?  (Tasks could take an additional attribute that
>> specified which version to use.)
>> If you need to build different parts of your system with different
>> versions, or maybe run tests on different versions, it might be
>> useful.
> I'm facing this challenge for the next version of the project I'm
> working on. We've got 5 packages making up the product, 3 of which need
> to be compiled with JDK 1.4 and the other 2 need to be compiled with
> JDK 1.3. Currently all 5 packages are built with one javac task. While
> it's simple to split that up into separate javac tasks for the various
> packages, I'm not sure how easy it will be to make Ant use different
> JDKs to compile them.
> I haven't applied much brainpower to this problem yet since we're still
> in the dev cycles for the current version of the product but I'm going
> to have to deal with this soon and any suggestions would be greatly
> appreciated.
>> On the other hand, it would slow things down a lot, and would
>> probably complicate internal Ant code a lot (passing arguments
>> to a new VM instead of directly calling methods).
> They have to do that with <javac fork="true"> anyway.
> Ciao,
> Gordon
> --
> To unsubscribe, e-mail:  
> <> For additional
> commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message