ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "W. Sean Hennessy" <shenne...@goldenhourdata.com>
Subject RE: Branching on Java version
Date Mon, 09 Jun 2003 15:24:13 GMT
The java developers are submitting code that does not execute in the
production environment?
What is the world coming too?!
I would submit that the build is not the correct place to fix runtime
behavior.
Persuade the authors of the java class to implement a little adaptability.
The class should be able to discern the JDK version at runtime and select
the appropriate connector.

-----Original Message-----
From: Sauyet, Scott (OTS-HAR) [mailto:Scott_Sauyet@output.net]
Sent: Monday, June 09, 2003 7:26 AM
To: 'Ant Users List'
Subject: Branching on Java version


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 is
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 that.

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 wasn't
available in 1.3.)  Because the additional methods are not called in our
code, I can compile this with 1.4 and run with 1.3, so there is no issue
there.

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 1.3
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message