build.xml 1.45 KB
Newer Older
1
<project name="ARSnova" default="run">
2
	<property name="main.dir" value="src/main/webapp" />
3 4 5
	<property name="sencha.build.dir" value="${main.dir}/build" />
	<property name="sencha.build.testing.dir" value="${sencha.build.dir}/testing/ARSnova" />
	<property name="sencha.build.production.dir" value="${sencha.build.dir}/production/ARSnova" />
6
	
7
	<property name="build.dir" value="src/main/build" />
8
	
9 10 11 12
	<target name="-build:init">
		<mkdir dir="${build.dir}" />
	</target>
	
13
	<target name="sencha:refresh">
14
		<exec executable="sencha" dir="${main.dir}" failonerror="true">
15 16 17 18 19
			<arg value="app"/>
			<arg value="refresh"/>
		</exec>
	</target>
	
20
	<target name="sencha:build:testing">
21
		<exec executable="sencha" dir="${main.dir}" failonerror="true">
22 23 24 25
			<arg value="app"/>
			<arg value="build"/>
			<arg value="testing"/>
		</exec>
26 27
	</target>
	
28
	<target name="sencha:build:production">
29
		<exec executable="sencha" dir="${main.dir}" failonerror="true">
30 31 32 33
			<arg value="app"/>
			<arg value="build"/>
			<arg value="production"/>
		</exec>
34 35
	</target>
	
36
	<target name="-assets:testing:copy"  depends="-build:init">
37
		<copy todir="${build.dir}">
38
			<fileset dir="${sencha.build.testing.dir}" />
39
		</copy>
40 41
	</target>
	
42 43 44 45
	<target name="-assets:production:copy"  depends="-build:init">
		<copy todir="${build.dir}">
			<fileset dir="${sencha.build.production.dir}" />
		</copy>
46
	</target>
47
	
48
	<target name="run" depends="sencha:refresh, sencha:build:production, -assets:production:copy"/>
49
</project>