Thursday, December 6, 2012

How to access Environment Variables in an ANT build script

Often you tend to require to write an ANT build script with references to Environment Variables like 'JBOSS_HOME' or 'JAVA_HOME'.

This can be achieved using the following:
<property environment="env"/>
<property name="JBOSS_HOME" value="${env.JBOSS_HOME}"/>
<property name="JAVA_HOME" value="${env.JAVA_HOME}"/>

No comments:

Post a Comment