-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
executable file
·71 lines (60 loc) · 2.25 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="rpha" default="deploy" basedir=".">
<property file="build.properties" />
<property name="project.name" value="${ant.project.name}" />
<property name="src.dir" value="${basedir}/src" />
<property name="test.dir" value="${basedir}/test" />
<property name="web.dir" value="${basedir}/web" />
<property name="build.dir" value="${basedir}/build" />
<property name="build.classes.dir" value="${basedir}/build/classes" />
<property name="lib.dir" value="${basedir}/lib/dependencies" />
<property name="j2ee.lib.dir" value="${basedir}/web/WEB-INF/lib" />
<property name="tomcat.lib.dir" value="${tomcat.dir}/common/lib" />
<property name="struts.dir" value="com/kirunews/rpha/struts" />
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${j2ee.lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${tomcat.lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="deploy" depends="compile, build-war">
<echo message="Delete ${deploy.dir}/${project.name}" />
<delete dir="${deploy.dir}/${project.name}" />
<echo message="Deploy ${project.name}.war" />
<copy file="${build.dir}/${project.name}.war" todir="${deploy.dir}" />
</target>
<target name="compile" depends="prepare">
<echo>${j2ee.lib.dir}</echo>
<javac srcdir="${src.dir}" destdir="${build.classes.dir}"
debug="on"
deprecation="on"
optimize="off"
failonerror="false"
compiler="modern">
<classpath refid="classpath" />
</javac>
<copy todir="${build.classes.dir}">
<fileset dir="${src.dir}" includes="**/*.properties"/>
</copy>
</target>
<target name="prepare">
<mkdir dir="${build.dir}" />
<delete dir="${build.classes.dir}" />
<mkdir dir="${build.classes.dir}" />
<!-- mkdir dir="${test.classes.dir}" /-->
<!-- mkdir dir="${report.dir}" /-->
</target>
<target name="build-war" depends="compile">
<war destfile="${build.dir}/${project.name}.war"
webxml="${web.dir}/WEB-INF/web.xml" >
<fileset dir="${web.dir}" excludes="**/web.xml"/>
<!-- lib dir="${lib.dir}" / -->
<classes dir="${build.classes.dir}" />
</war>
</target>
</project>