AndyJarrett

Ant- Passing attributes to Build.xml

Critter on a previous post asked "if you can pass in attributes to the build.xml file?" From the Terminal this is as easy as adding another argument "-D". -D<property>=<value>
This will update a property in you build.xml file with the value you passed inFor example you would use something similar toant -buildfile ~/desktop/build.xml -DechoMsg=NewEchoMessagePutting this into practice here is a sample build.xml which I am going to save to my Desktop From the Terminal no runant -buildfile ~/desktop/build.xml -DechoMsg='I overwrite the echo message'In your terminal window you should see something likeBuildfile: [PATH TO BUILD FILE]build.xmlrunEcho:[echo] I overwrite the echo messageBUILD SUCCESSFULTotal time: 0 seconds