-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
182 lines (156 loc) · 7.36 KB
/
Copy pathbuild.xml
File metadata and controls
182 lines (156 loc) · 7.36 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="buildAll" name="CompoundGraph">
<property environment="env" />
<property name="junit.output.dir" value="junit" />
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.6" />
<property name="source" value="1.6" />
<property name="build.dir" value="./ant-build" />
<property name="build.dir.src" value="${build.dir}/src"/>
<property name="build.dir.src.noaspects" value="${build.dir}/srcNoAspects"/>
<property name="build.dir.tests" value="${build.dir}/test"/>
<property name="docs.build.dir" value="./doc"/>
<property name="src.dir" value="./src" />
<property name="test.dir" value="./test" />
<property name="integrationTest.dir" value="./integrationTest" />
<property name="libs.dir" value="./lib" />
<property name="jar.dir" value="./jars" />
<property name="jar.name.bin" value="CompoundGraph.jar" />
<property name="jar.name.bin.noaspects" value="CompoundGraph-noaspects.jar" />
<property name="jar.name.src" value="CompoundGraph-src.jar" />
<property name="jar.name.doc" value="CompoundGraph-docs.jar" />
<path id="CompoundGraph.classpath">
<pathelement location="${libs.dir}/junit-4.8.2/junit-4.8.2.jar" />
<pathelement location="${libs.dir}/apache-log4j-1.2.15/log4j-1.2.15.jar" />
<pathelement location="${libs.dir}/jmock-2.5.1/jmock-2.5.1.jar" />
<pathelement location="${libs.dir}/jmock-2.5.1/jmock-junit4-2.5.1.jar" />
<pathelement location="${libs.dir}/jmock-2.5.1/jmock-legacy-2.5.1.jar" />
<pathelement location="${libs.dir}/jmock-2.5.1/hamcrest-core-1.1.jar" />
<pathelement location="${libs.dir}/jmock-2.5.1/hamcrest-library-1.1.jar" />
<pathelement location="${libs.dir}/jmock-2.5.1/objenesis-1.0.jar" />
<pathelement location="${libs.dir}/jmock-2.5.1/cglib-nodep-2.1_3.jar" />
<pathelement location="${libs.dir}/aspectj-1.6.9/aspectjrt.jar" />
<pathelement location="${libs.dir}/antlr-3.4/antlr-3.4-complete.jar" />
<pathelement location="${libs.dir}/jopt-simple-3.2/jopt-simple-3.2.jar" />
</path>
<path id="test.classpath">
<path refid="CompoundGraph.classpath" />
<pathelement location="${build.dir.src}" />
<pathelement location="${build.dir.tests}" />
</path>
<target name="buildAll" description="builds all code and docs and jars them up" depends="build-project,api-docs,jarAll" />
<target name="init">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir.src}" />
<mkdir dir="${build.dir.src.noaspects}" />
<mkdir dir="${build.dir.tests}" />
</target>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target depends="build-project" name="build" />
<target depends="init,build-src,build-test, build-integration-test" name="build-project" />
<taskdef
resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
<classpath>
<pathelement location="${lib.dir}/aspectj-1.6.9/aspectjtools.jar"/>
</classpath>
</taskdef>
<target name="buildSrcNoAspect" description="src build with no aspects task" depends="init">
<!-- <echo>running with classpath ${toString:classpath}</echo>-->
<javac classpathref="CompoundGraph.classpath" srcdir="${src.dir}" source="${source}" target="${target}"
debug="true" debuglevel="lines,vars,source" destdir="${build.dir.src.noaspects}" includeantruntime="false">
</javac>
<copy todir="${build.dir.src.noaspects}">
<fileset dir="${src.dir}">
<exclude name="**/*.java" />
<exclude name="**/*.class" />
<exclude name="**/*.txt" />
<exclude name="**/*.aj" />
</fileset>
</copy>
</target>
<target depends="init" name="build-src">
<echo message="${ant.project.name}: ${ant.file}" />
<iajc debug="true" debuglevel="${debuglevel}" destdir="${build.dir.src}" source="${source}"
nowarn="false" target="${target}" verbose="true">
<src path="${src.dir}" />
<classpath refid="CompoundGraph.classpath" />
<!--compilerarg value="-Xlint" /-->
</iajc>
<copy todir="${build.dir}">
<fileset dir="${build.dir}" />
</copy>
</target>
<target depends="init,build-src" name="build-test">
<echo message="${ant.project.name}: ${ant.file}" />
<javac debug="true" debuglevel="${debuglevel}" destdir="${build.dir.tests}" source="${source}" nowarn="false" target="${target}">
<src path="${test.dir}" />
<classpath refid="test.classpath" />
<compilerarg value="-Xlint" />
</javac>
</target>
<target depends="init,build-src" name="build-integration-test">
<echo message="${ant.project.name}: ${ant.file}" />
<javac debug="true" debuglevel="${debuglevel}" destdir="${build.dir.tests}" source="${source}" nowarn="false" target="${target}">
<src path="${integrationTest.dir}" />
<classpath refid="test.classpath" />
<compilerarg value="-Xlint" />
</javac>
</target>
<target name="jar-bin-noaspects" description="builds a jar for distribution without aspectJ DBC code" depends="buildSrcNoAspect,init-jardirs">
<jar destfile="${jar.dir}/${jar.name.bin.noaspects}" basedir="${build.dir.src.noaspects}">
</jar>
</target>
<target name="jar-bin" depends="build-src,init-jardirs">
<jar destfile="${jar.dir}/${jar.name.bin}" basedir="${build.dir.src}">
</jar>
</target>
<target name="api-docs">
<javadoc access="package" author="true" splitindex="true" use="true" version="true" source="1.5" sourcepath="src" destdir="doc" doctitle="Compund Graph API" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false">
<classpath refid="CompoundGraph.classpath" />
</javadoc>
</target>
<target name="tests" depends="build-test,build-integration-test">
<delete dir="${build.dir.tests}/logs" />
<mkdir dir="${build.dir.tests}/logs" />
<!-- <echo>running with classpath ${toString:test.classpath}</echo>-->
<!--run test cases. All test class names should end in 'Test' to avoid
inclusion of inner classes. -->
<junit printsummary="yes" haltonfailure="no" fork="true" maxmemory="512m">
<classpath>
<path refid="test.classpath" />
</classpath>
<batchtest todir="${build.dir.tests}/logs">
<formatter type="xml" />
<fileset dir="${build.dir.tests}">
<include name="**/*Test.class" />
</fileset>
</batchtest>
</junit>
<!-- clean report directory -->
<delete dir="${build.dir.tests}/junitReports" />
<mkdir dir="${build.dir.tests}/junitReports" />
<!-- generate report -->
<junitreport todir="${build.dir.tests}/junitReports">
<fileset dir="${build.dir.tests}/logs" includes="**/*.xml" />
<report todir="${build.dir.tests}/junitReports" />
</junitreport>
</target>
<target name="jarAll" description="creates all jar files for distribution" depends="jar-bin, jar-bin-noaspects, jar-src, jar-docs"/>
<target name="jar-docs" depends="api-docs">
<mkdir dir="${jar.dir}" />
<jar destfile="${jar.dir}/${jar.name.doc}">
<fileset dir="${docs.build.dir}" />
</jar>
</target>
<target name="init-jardirs">
<delete dir="${jar.dir}" />
<mkdir dir="${jar.dir}" />
</target>
<target name="jar-src" depends="init-jardirs">
<jar destfile="${jar.dir}/${jar.name.src}">
<fileset dir="${src.dir}" />
</jar>
</target>
</project>