Tinking around with Ant I found out you can reference system environment properties within your build file.
So in Windows for example you can run SET at the command line and get a long list of properties:
U:\set ALLUSERSPROFILE=C:\Documents and Settings\All Users ANT_HOME=D:\ant APPDATA=C:\Documents and Settings\priestj\Application Data
You can easily reference these in your build file - first set property environment to "env":
<property environment="env"/>
Now we'll add some of our Windows system properties (note these are case sensitive!):
<echo>evn.ALLUSERSPROFILE: ${env.ALLUSERSPROFILE}</echo> <echo>evn.ANT_HOME: ${env.ANT_HOME}</echo> <echo>env.APPDATA: ${env.APPDATA}</echo>
Read full article from Using Environment Properties In Ant // thecrumb // Developer. Thinker. Tinkerer
No comments:
Post a Comment