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 in
For example you would use something similar to
ant -buildfile ~/desktop/build.xml -DechoMsg=NewEchoMessage
Putting this into practice here is a sample build.xml which I am going to save to my Desktop
<?xml version="1.0" encoding="UTF-8"?>
<project name="myProject" default="runEcho" basedir=".">
<property name="echoMsg" value="I am the original message" />
<target name="runEcho">
<!-- Simply echo's a message to the screen -->
<echo message="${echoMsg}"/>
</target>
</project>
From the Terminal no run
ant -buildfile ~/desktop/build.xml -DechoMsg='I overwrite the echo message'
In your terminal window you should see something like
Buildfile: [PATH TO BUILD FILE]build.xml
runEcho:
[echo] I overwrite the echo message
BUILD SUCCESSFUL
Total time: 0 seconds


I've taken the old Model-Glue Ant script you had and modified it a bit.. I've downloaded the latest and placed it on my computer.. made these modification: @modelglueapplicationtemplate@ to all the necessary files..
so now I can call my build.xml and pass in the directory name where I want M-G to be built..