<!--
	Ant script to create new Model-Glue 2.0 applications
	
	If you're using CFEclipse, or you know how to use Ant (http://ant.apache.org), 
	just run this file to create a ready-to-go Model-Glue application.
	
	To run it in CFEclipse, it's Alt-Shift-X -> Q
	
	Instructions:
	
	Set the "newApplicationName" property's value to the datasource name of
	your new application directory.  The script will name the application 
	(via <cfapplication>) the same thing - feel free to change it later.
	
	Set the "newApplicationDirectory" to the directory where you'd like your
	new application to go.
	
	Run the script.
	
-->	
<project name="New Model-Glue Application" default="build" basedir="..">
  <property name="newApplicationName" value="myApplicationName" />
	<property name="newApplicationDirectory" value="c:/inetpub/wwwroot/${newApplicationName}" />
	<!--
    For the OS X crowd (since Joe saw the light and converted)  
		<property name="newApplicationDirectory" value="/Library/WebServer/Documents/${newApplicationName}" />
	-->
	
	<!-- Where is the MG app template? -->
	<property name="templateDirectory" value="./modelglueapplicationtemplate"/>
	
  <target name="build">
    <copy todir="${newApplicationDirectory}">
      <fileset dir="${templateDirectory}">
				<exclude name="**/build.xml" />
			</fileset>
    </copy>
    <replace dir="${newApplicationDirectory}" token="modelglueapplicationtemplate" value="${newApplicationName}" />
  </target>
</project> 