-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
84 lines (83 loc) · 3.35 KB
/
build.xml
File metadata and controls
84 lines (83 loc) · 3.35 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="myssh2" default="buildwar" xmlns:artifact="urn:maven-artifact-ant">
<property file="build.properties"/>
<path id="maven-ant-tasks.classpath" path="D:/apache-ant-1.8.2/lib/maven-ant-tasks-2.1.3.jar"/>
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant"
classpathref="maven-ant-tasks.classpath"/>
<artifact:pom id="maven.project" file="pom.xml"/>
<artifact:dependencies filesetId="deps.fileset.compile" useScope="compile">
<!--<pom file="pom.xml"/>-->
<pom refid="maven.project"/>
</artifact:dependencies>
<path id="compile.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${tomcat.dir}/lib">
<include name="servlet-api.jar"/>
</fileset>
</path>
<target name="clean" description="Delete old build and dist directories">
<delete dir="${dist.dir}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.dir}/${webAppName}"/>
<mkdir dir="${dist.dir}/${webAppName}/WEB-INF"/>
<mkdir dir="${dist.dir}/${webAppName}/WEB-INF/lib"/>
<mkdir dir="${dist.dir}/${webAppName}/WEB-INF/classes"/>
<mkdir dir="${dist.dir}/${webAppName}/css"/>
<mkdir dir="${dist.dir}/${webAppName}/images"/>
<mkdir dir="${dist.dir}/${webAppName}/jsp"/>
</target>
<target name="download-libs" depends="clean">
<copy todir="${lib.dir}">
<fileset refid="deps.fileset.compile"/>
<mapper type="flatten"/>
</copy>
</target>
<target name="compile" description="Compile java sources" depends="download-libs">
<javac debug="true" destdir="${dist.dir}/${webAppName}/WEB-INF/classes" includeAntRuntime="false"
srcdir="${src.dir}">
<classpath refid="compile.classpath"/>
</javac>
<copy todir="${dist.dir}/${webAppName}/WEB-INF/lib">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</copy>
<copy todir="${dist.dir}/${webAppName}/WEB-INF/classes">
<fileset dir="${resources.dir}">
<include name="**/*.*"/>
</fileset>
</copy>
<copy todir="${dist.dir}/${webAppName}/css">
<fileset dir="${webroot.dir}/css">
<include name="**/*.*"/>
</fileset>
</copy>
<copy todir="${dist.dir}/${webAppName}/images">
<fileset dir="${webroot.dir}/images">
<include name="**/*.*"/>
</fileset>
</copy>
<copy todir="${dist.dir}/${webAppName}/jsp">
<fileset dir="${webroot.dir}/jsp">
<include name="**/*.*"/>
</fileset>
</copy>
<copy todir="${dist.dir}/${webAppName}">
<fileset dir="${webroot.dir}">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="${dist.dir}/${webAppName}/WEB-INF">
<fileset dir="${webroot.dir}/WEB-INF">
<include name="*.*"/>
</fileset>
</copy>
</target>
<target name="buildwar" depends="compile">
<war warfile="${dist.dir}/${webAppName}.war">
<fileset dir="${dist.dir}/${webAppName}"/>
</war>
</target>
</project>