ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Susantin <asusan...@FinancialEngines.com>
Subject How to get env variables from property file
Date Fri, 19 Jul 2002 21:17:55 GMT
I installed jsdk 1.3.1 and 1.4 locally d:\jdk1.3.1 (JAVA_HOME) and d:\jdk1.4
(JAVA_HOME14), and I can get the  the environment
varible to ant.
The question is how, to get the env variables from property file instead of
changing the build script itself?
I want to be able to compile with a different java version based on some
property in property file.
<project name="build">
	<property environment="env" />
	<property name="build.sysclasspath" value="last"/>
	<path id="my.classpath">
		<pathelement location="${srcdir}"/>
	      <fileset dir="${env.JAVA_HOME14}/lib">
        	<include name="**/*.jar"/>
	      </fileset>
       </path>
I could use property name like "MY_JAVA_HOME"
<fileset dir="${MY_JAVA_HOME}/lib">
        	<include name="**/*.jar"/>
	      </fileset>
And override it -DMY_JAVA_HOME=d:/jdk1.4 eg., but I prefer setting it on
property file instead
Any suggestions?


Thanks
asusantin@financialengines.com

       

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


Mime
View raw message