ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Leftwich <>
Subject RE: Newbie question
Date Mon, 30 Apr 2001 22:54:36 GMT
At 05:38 AM 01-05-01 +1000, I wrote:

>At 11:06 AM 30-04-01 -0400, Pinar Bicioglu wrote:
>>I believe that all you need to do specify the property tag for
>>"buil.compiler". And the value should be "modern".
>Unless you are using Jikes to actually compile the files - which I am. Any 
>other ideas ?

Well, he says, answering his own question, thanks to "Nico Seessle" 
<> answer to 'Re: Platform specific targets???' I have a 
workable solution as follows :

<!-- Java version info -->
<property name="javaVersionIs${}" value="1"/>

<!-- check java version -->
<target name="version.check" unless="javaVersionIs1.3">
     <fail message="You need to be running with JDK1.3"/>

which, while not perfect, does what I am after.

Thanks Nico!


>>-----Original Message-----
>>From: Robert Leftwich []
>>Sent: Sunday, April 29, 2001 9:40 PM
>>Subject: Newbie question
>>I have a newbie question that I cannot find the answer to in the doco or
>>the archive.
>>I want to ensure that a project is only built under jdk1.3. I can see
>>several options :
>>a) Use a batch file/shell script file to control the build that sets the
>>values appropriately - but this requires that everybody always uses that
>>mechanism to run the build which you cannot ensure.
>>b) Fail the build if JAVA_HOME or is not correct - but the
>>only way I can find to do that is to write a script
>>(javascript/netrexx/etc) that checks the value and adds a target (or
>>enables a target) that does the fail - this seems overly complex.
>>c) Force the setting of JAVA_HOME to the appropriate place in the build
>>file - but I can't find a way to do this that is global in nature.
>>As this is a simple task I am sure there is something I am missing, hence
>>this email.
>>Thanks in advance

View raw message