<project name="i-math-web" default="datanucleusenhance">
	<property environment="env" />
	<property name="appengine.sdk.dir" location="${env.appengine_home}" />

	<import file="${appengine.sdk.dir}/config/user/ant-macros.xml" />

	<property name="war.dir" value="target/i-math-web-1.0-SNAPSHOT" />

	<target name="datanucleusenhance" description="Performs JDO enhancement on compiled data classes.">
		<enhance_war war="${war.dir}" />
	</target>

	<target name="runserver" depends="datanucleusenhance" description="Starts the development server.">
		<!--many developer's workstation using port 8080, change the default port -->
		<dev_appserver war="${war.dir}" />
	</target>

	<target name="update" depends="datanucleusenhance" description="Uploads the application to App Engine.">
		<appcfg action="update" war="${war.dir}" />
	</target>

	<target name="update_indexes" depends="datanucleusenhance" description="Uploads just the datastore index configuration to App Engine.">
		<appcfg action="update_indexes" war="${war.dir}" />
	</target>

	<target name="rollback" depends="datanucleusenhance" description="Rolls back an interrupted application update.">
		<appcfg action="rollback" war="${war.dir}" />
	</target>

	<target name="request_logs" description="Downloads log data from App Engine for the application.">
		<appcfg action="request_logs" war="${war.dir}">
			<options>
				<arg value="--num_days=5" />
			</options>
			<args>
				<arg value="logs.txt" />
			</args>
		</appcfg>
	</target>

</project>
