-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
100 lines (83 loc) · 3.3 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<project name="spring starter app" default="make">
<property name="sourcedir" value="${basedir}/src"/>
<property name="generated.home" value="${basedir}/src"/>
<property name="exploded" value="${basedir}/out/exploded/" />
<property name="targetdir" value="${exploded}/WEB-INF/classes"/>
<property name="scripts" value="${basedir}/scripts" />
<path id="my_classpath">
<pathelement location="${targetdir}"/>
<fileset dir="web/WEB-INF/lib">
<include name="*.jar" />
</fileset>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${exploded}"/>
<mkdir dir="${targetdir}"/>
</target>
<target name="clean">
<delete dir="${targetdir}"/>
<mkdir dir="${targetdir}"/>
</target>
<target name="make" depends="compile">
<copy file="${sourcedir}/hibernate.cfg.xml" todir="${exploded}/WEB-INF/classes" overwrite="true" />
</target>
<target name="jsp-deploy">
<copy todir="${basedir}/out/exploded" overwrite="true">
<fileset dir="${basedir}/web/resources">
<include name="**/*.jsp"/>
<include name="**/*.js"/>
<include name="**/*.css"/>
</fileset>
</copy>
<copy todir="${basedir}/out/exploded/WEB-INF/jsp" overwrite="true">
<fileset dir="${basedir}/web/WEB-INF/jsp">
<include name="**/*.jsp"/>
<include name="**/*.js"/>
<include name="**/*.css"/>
</fileset>
</copy>
<copy todir="${basedir}/out/exploded/WEB-INF/bundles" overwrite="true">
<fileset dir="${basedir}/web/WEB-INF/bundles">
<include name="**/*.properties"/>
</fileset>
</copy>
<copy todir="${basedir}/out/exploded/WEB-INF/classes" overwrite="true">
<fileset dir="${basedir}/web/WEB-INF/classes">
<include name="**/*.properties"/>
</fileset>
</copy>
</target>
<target name="jsp-deploy-full" depends="jsp-deploy">
<copy todir="${basedir}/out/exploded" overwrite="true">
<fileset dir="${basedir}/web/resources">
<include name="**/*.png"/>
<include name="**/*.html"/>
<include name="**/*.txt"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
<include name="**/*.xml"/>
</fileset>
</copy>
</target>
<target name="deploy-WEB-INF">
<copy todir="${basedir}/out/exploded/WEB-INF" overwrite="true">
<fileset dir="${basedir}/web/WEB-INF">
<include name="**/*.properties"/>
<include name="**/*.xml"/>
<include name="**/*.tld"/>
<include name="**/*.jar"/>
<include name="**/*.jrxml"/>
<include name="**/*.jasper"/>
<include name="**/*.ttf"/>
<include name="**/*.tag"/>
</fileset>
</copy>
</target>
<target name="compile" depends="init">
<javac srcdir="${sourcedir}" destdir="${targetdir}" debug="on" classpathref="my_classpath"/>
</target>
<target name="update-mappings">
<exec executable="${scripts}/update-mappings.sh" />
</target>
</project>