Subversion Repositories general

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
902 dev 1
<project name="hostcaptain" default="deploy" basedir=".">
899 dev 2
 
3
	<property name="build.compiler" value="jikes" />
4
 
5
	<property name="src"            location="src" />
6
	<property name="classes"        location="classes" />
7
	<property name="app.web-inf"    location="webapp/WEB-INF" />
8
	<property name="classes.deploy" location="${app.web-inf}/classes" />
9
	<property name="conf"           location="conf" />
10
	<property name="lib"            location="lib" />
11
	<property name="lib.ant"        location="lib/ant" />
12
	<property name="lib.deploy"     location="${app.web-inf}/lib" />
13
	<property name="classpath"      value="" />
14
 
15
	<path id="classpath.general">
16
		<pathelement path="${classpath}" />
17
		<fileset dir="${lib.deploy}">
18
			<include name="*.jar" />
19
		</fileset>
20
	</path>
21
 
22
	<path id="classpath.test">
23
		<path refid="classpath.general" />
24
		<pathelement location="${classes.deploy}" />
25
	</path>
26
 
27
	<path id="classpath.compile">
28
		<path refid="classpath.general" />
29
		<pathelement location="${classes}" />
30
		<fileset dir="${lib}">
31
			<include name="**/*.jar" />
32
			<exclude name="ant/" />
33
		</fileset>
34
	</path>
35
 
36
	<path id="classpath.ant">
37
		<fileset dir="${lib.ant}">
38
			<include name="**/*.jar" />
39
		</fileset>
40
	</path>
41
 
42
	<taskdef name="hibernatedoclet" classname="xdoclet.modules.hibernate.HibernateDocletTask">
43
		<classpath refid="classpath.ant"/>
44
	</taskdef>
45
 
46
	<target name="compile">
47
		<mkdir dir="${classes}" />
48
 
49
		<javac
50
			srcdir="${src}"
51
			destdir="${classes}"
52
			classpathref="classpath.compile"
53
			debug="on"
54
			nowarn="on"
55
		/>
56
	</target>
57
 
58
	<target name="hibernate">
59
		<hibernatedoclet
60
			destdir="${classes}"
61
			excludedtags="@version,@author,@todo"
62
			mergedir="${classes}"
63
			verbose="false"
64
		>
65
			<fileset dir="src">
66
				<include name="**/*.java" />
67
			</fileset>
68
			<hibernate version="2.0" />
69
		</hibernatedoclet>
70
	</target>
71
 
72
	<target name="deploy" depends="compile,hibernate">
73
		<copy todir="${classes.deploy}">
74
			<fileset dir="${classes}" />
75
		</copy>
76
 
77
		<copy todir="${classes.deploy}">
78
			<fileset
79
				dir="${src}"
80
				includes="**/*.properties"
81
				excludes="**/*_*.properties"
82
			/>
83
			<fileset
84
				dir="${classes}"
85
				includes="**/*.xml"
86
			/>
87
		</copy>
88
 
89
		<copy todir="${app.web-inf}" flatten="yes">
90
			<fileset
91
				dir="${src}"
92
				includes="**/*.tld"
93
			/>
94
		</copy>
95
 
96
		<delete>
97
			<fileset dir="${classes.deploy}" includes="**/*_*.properties" />
98
		</delete>
99
 
100
		<native2ascii
101
			encoding="Cp1251"
102
			src="${src}"
103
			dest="${classes.deploy}"
104
			includes="**/*_ru.properties"
105
		/>
106
 
107
		<native2ascii
108
			encoding="ISO8859_1"
109
			src="${src}"
110
			dest="${classes.deploy}"
111
			includes="**/*_de.properties"
112
		/>
113
 
114
		<copy todir="${classes.deploy}" file="${conf}/log4j.properties" />
115
		<copy todir="${classes.deploy}" file="${conf}/hibernate.cfg.xml" />
116
 
117
		<touch file="${app.web-inf}/web.xml" />
118
	</target>
119
 
120
	<target name="clean">
121
		<delete dir="${classes}"/>
122
		<delete dir="${classes.deploy}"/>
123
	</target>
124
 
125
	<target name="all" depends="clean,deploy" />
126
 
127
	<target name="test" depends="deploy">
128
		<java
902 dev 129
			classname="ak.hostcaptain.core.model.test.Test"
899 dev 130
			classpathref="classpath.test"
131
		/>
132
	</target>
133
 
134
</project>