-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
193 lines (164 loc) · 5.95 KB
/
build.xml
File metadata and controls
193 lines (164 loc) · 5.95 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<?xml version="1.0"?>
<!--
Build file for the JCatalog Project.
Derek Y. Shen
6/2004
-->
<project name="jcatalog" default="build.war" basedir=".">
<!-- Configure the context path for this application -->
<property name="project.name" value="catalog-1.0" />
<property name="build.dir" value="${basedir}/build" />
<property name="src.dir" value="${basedir}/src" />
<property name="src.java.dir" value="${src.dir}/java" />
<property name="docs.dir" value="${basedir}/docs" />
<property name="docs.api.dir" value="${docs.dir}/api" />
<property name="web.dir" value="${basedir}/web" />
<property name="lib.dir" value="${basedir}/lib" />
<property name="dist.dir" value="${basedir}/dist" />
<property name="testdir" location="${basedir}/test" />
<property name="srcdir" location="${basedir}/src" />
<property name="full-compile" value="false" />
<property name="report.dir" location="C:\Users\ashutoshs.RLLABINDIA\Desktop\report" />
<property name="test.htmlreports.dir" location="${build.dir}/test/htmlreports/" />
<property name="test.data.dir" location="${build.dir}/test/data/" />
<property name="junit.class.name" value="catalog.model.dao.hibernate.Testdb" />
<!--<property name="class.name" value="catalog.view.builder.Test1" />-->
<!--<property name="classes.dir" location="${basedir}/output" />-->
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<!--<path id="javaclasspath">
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
</path>-->
<!--<path id="classpath.base">
<pathelement location="${lib.dir}/tools.jar" />
</path>-->
<path id="classpath.test">
<pathelement location="${basedir}/lib/junit-4.10.jar" />
<pathelement location="${testdir}" />
<!--<path refid="classpath.base" />-->
<path refid="classpath" />
</path>
<path id="classpath.src">
<pathelement location="test" />
</path>
<target name="clean">
<delete dir="${build.dir}" />
<delete verbose="${full-compile}">
<fileset dir="${testdir}" includes="**/*.class" />
</delete>
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${src.dir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${testdir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${classes.dir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${test.htmlreports.dir}">
<include name="**/*.txt" />
<include name="**/*.xml" />
<include name="**/*.html" />
</fileset>
</delete>
</target>
<target name="prepare" depends="clean" description="Create build directories.">
<mkdir dir="${build.dir}/${project.name}" />
<mkdir dir="${build.dir}/${project.name}/WEB-INF" />
<mkdir dir="${build.dir}/${project.name}/WEB-INF/classes" />
<mkdir dir="${build.dir}/${project.name}/WEB-INF/lib" />
<mkdir dir="${test.data.dir}" />
<mkdir dir="${test.htmlreports.dir}" />
</target>
<target name="deploy.copyJars">
<copy todir="${build.dir}/${project.name}/WEB-INF/lib">
<fileset dir="lib">
<include name="**/*.jar" />
<include name="**/*.dtd" />
</fileset>
</copy>
</target>
<!-- Executable Targets -->
<target name="build" depends="prepare,deploy.copyJars,test" description="Compile Java files and copy static files.">
<javac srcdir="${src.java.dir}" destdir="${build.dir}/${project.name}/WEB-INF/classes">
<include name="**/*.java" />
<classpath refid="classpath"/>
</javac>
<copy todir="${build.dir}/${project.name}/WEB-INF">
<fileset dir="${web.dir}/WEB-INF">
<include name="*.xml" />
<include name="*.tld" />
</fileset>
</copy>
<copy todir="${build.dir}/${project.name}/">
<fileset dir="${web.dir}">
<include name="*.html" />
<include name="*.gif" />
<include name="*.jpg" />
<include name="*.jsp" />
<include name="*.xml" />
<include name="*.css" />
</fileset>
</copy>
<copy todir="${build.dir}/${project.name}/images">
<fileset dir="${web.dir}/images">
<include name="**/*.gif" />
<include name="**/*.jpg" />
</fileset>
</copy>
<copy todir="${build.dir}/${project.name}/WEB-INF/classes">
<fileset dir="${src.java.dir}">
<include name="**/*.properties" />
<include name="**/*.xml" />
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="compile">
<javac srcdir="${src.dir}" destdir="${src.dir}" verbose="${full-compile}">
<classpath refid="classpath.test" />
<!--<classpath refid="classpath.base" />-->
</javac>
</target>
<target name="compile-test">
<mkdir dir="${classes.dir}" />
<javac srcdir="${testdir}" classpathref="compile.classpath" destdir="${testdir}" debug="true" includes="${src.dir}" includeAntRuntime="false" />
<javac srcdir="${testdir}" destdir="${testdir}" debug="true" includes="${srcdir}" includeAntRuntime="false">
<!--<classpath refid="classpath.base" />-->
<classpath refid="classpath.src" />
<classpath refid="classpath.test" />
<include name="**/*.java" />
</javac>
</target>
<target name="test" depends="compile-test">
<junit fork="no" haltonfailure="no" showoutput="yes" printsummary="true">
<test name="${junit.class.name}" todir="${test.data.dir}" />
<formatter type="brief" usefile="false" />
<formatter type="xml" />
<!--<classpath refid="classpath.base" />-->
<classpath refid="classpath.src" />
<classpath refid="classpath.test" />
<formatter type="brief" usefile="false" />
<!--<test name="TestMessageUtil" />-->
</junit>
<junitreport todir="${test.htmlreports.dir}">
<fileset dir="${test.data.dir}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${test.htmlreports.dir}" />
</junitreport>
</target>
<target name="build.war" depends="build">
<delete dir="${dist.dir}" />
<mkdir dir="${dist.dir}" />
<!-- create a war file for distribution -->
<jar destfile="${dist.dir}/${project.name}.war" basedir="${build.dir}/${project.name}" />
<delete dir="${build.dir}" />
</target>
</project>