-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
121 lines (101 loc) · 3.6 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<project name="trabalhoFinal" default="compile">
<property file="build.properties" />
<taskdef
resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
<classpath>
<pathelement location="${aspectj.api.dir}/aspectj/aspectjtools.jar"/>
</classpath>
</taskdef>
<target name="compile">
<antcall target="clean">
</antcall>
<echo message="Creating ${build.dir} directory" />
<mkdir dir="${build.dir}"/>
<echo message="Compiling the application..." />
<iajc destdir="${build.dir}" source="1.5" fork="true" maxmem="256M" showWeaveInfo="true" log="weaving.txt">
<sourceroots>
<pathelement location="${src.dir}"/>
</sourceroots>
<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
<include name="*.jar" />
</fileset>
<pathelement location="${aspectj.api.dir}/aspectj/aspectjrt.jar"/>
</classpath>
</iajc>
<echo message="Application compiled." />
<echo message=" Compiling the test cases..." />
<iajc destdir="${tests.dir}" source="1.5" fork="true" maxmem="256M">
<sourceroots>
<pathelement location="${tests.dir}"/>
</sourceroots>
<classpath>
<fileset dir="${lib-test.dir}">
<include name="**/*.jar" />
<include name="*.jar" />
</fileset>
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
<include name="*.jar" />
</fileset>
<pathelement location="${build.dir}" />
<pathelement location="${aspectj.api.dir}/aspectj/aspectjrt.jar"/>
</classpath>
</iajc>
<echo message=" Test cases compiled." />
</target>
<target name="full-test" depends="compile">
<echo message="Running full test set of the application..." />
<mkdir dir="${test.reports.dir}"/>
<junit printsummary="yes" haltonfailure="no" timeout="5000">
<classpath>
<fileset dir="${lib-test.dir}">
<include name="**/*.jar" />
<include name="*.jar" />
</fileset>
<pathelement location="${build.dir}"/>
<pathelement location="${tests.dir}"/>
<pathelement path="${lib-test.dir}/junit-4.12.jar"/>
<pathelement path="${lib-test.dir}/hamcrest-all-1.3.jar"/>
<pathelement path="${lib.dir}/mysql-connector-java-5.1.44.jar"/>
<pathelement path="${aspectj.api.dir}/aspectj/aspectjrt.jar"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="${test.reports.dir}">
<fileset dir="${tests.dir}">
<exclude name="**/*Test.java"/>
<include name="**/AllTests.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="single-test" depends="compile">
<echo message="Running individual test of the application..." />
<mkdir dir="${test.reports.dir}"/>
<junit printsummary="yes" haltonfailure="no" timeout="5000">
<classpath>
<pathelement location="${build.dir}"/>
<pathelement location="${tests.dir}"/>
<pathelement path="${lib.dir}/commons-lang-2.6.jar"/>
<pathelement path="${lib-test.dir}/junit-4.12.jar"/>
<pathelement path="${lib-test.dir}/hamcrest-all-1.3.jar"/>
<pathelement path="${lib.dir}/mysql-connector-java-5.1.44.jar"/>
<pathelement path="${aspectj.api.dir}/aspectj/aspectjrt.jar"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="${test.reports.dir}">
<fileset dir="${tests.dir}">
<exclude name="**/AllTests.java"/>
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="clean" description="Remove all files created by the build/test process." >
<echo message="Cleaning built application..." />
<delete dir="${build.dir}" />
<delete dir="${test.reports.dir}" />
<delete file="weaving.txt" />
</target>
</project>