ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Morris" <>
Subject Re: Branching on Java version
Date Mon, 09 Jun 2003 15:27:32 GMT

I ran across an open source package called jenable that claims 
to support more configurable builds including JDK build via 
conditional source pre-processing. 

David Morris

>>> 6/9/2003 8:25:50 AM >>>
Hi folks,

I'm mostly a lurker here, learning a lot.

I have a problem I can't quite figure out.  I think what I want to do
to conditionally use one source file when compiling with Java 1.3 and 
another when compiling with Java 1.4.  And I don't know how to do

The problem is that the interface java.sql.Connection has changed 
between 1.3 and 1.4 in a way that I cannot use the same source for both

(1.4 adds new methods involving a class, java.sql.Savepoint, that
available in 1.3.)  Because the additional methods are not called in
code, I can compile this with 1.4 and run with 1.3, so there is no

The production system is currently Web Logic, running on Java 
1.3.something.  But most of the developers are on 1.4.  For stupid 
political reasons, I cannot insist that the few developers on 1.2 or
switch to 1.4, so I really need this build to run in both 1.3 and 1.4. 

I was going to introduce two versions of the one class that's causing 
problems and copy the one matching the the java version to the source 
directory, but I can't figure out how to do that.

Does anyone have a suggestion for how to do this?  Or for a better way
to handle this problem?

Thanks for your time,

  -- Scott Sauyet

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

View raw message