ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravagli Virgilio <Virgilio.Rava...@ansaldo-sts.com>
Subject passing ant.java.version as an option
Date Mon, 05 Nov 2012 12:35:23 GMT
Hi everybody.
I expose my question.
I had to build JOB-4.3.4, Orbacus Java version, and I couldn't use JDK1.7 because of errors;
everything would be fine using ant 1.7.1 to build Orbacus, in fact ant 1.7.1 assigns ant.java.version
= 1.6 even if my JDK1.7 is 1.7.

Trying ant 1.8.4, I had the same mistakes, because this time ant.java.version was 1.7 (the
same as the installed JDK).

As a matter of fact, I prefer using ant 1.8.4, so I thought to modify it: I downloaded the
source dist and modified two classes, JavaEnvUtils.java and its caller Main.java, introducing
"an option of mine", ajv (acronym that stands for ant java version) followed by the desired
Java version.

I built my ant 1.8.4, then compiled with -ajv 1.6 and everything was good.

Imho it's a better solution than using source = 1.6 spreaded into the build file, it's more
flexible.

So, that's my doubt: is there any other way, some trick,  to assign ant.java.version instead
of letting it assigned by the ant code ?

The other way round, if someone thinks my choice is good, or if he's interested in it, I can
publish the code.

Thanks in advance,
Virgilio Ravagli


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message