-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
156 lines (136 loc) · 5.45 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
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="NotationSubsystemBuild" default="buildAll">
<property name="build.dir" value="./antBuild" />
<property name="build.dir.src" value="${build.dir}/src"/>
<property name="build.dir.tests" value="${build.dir}/test"/>
<property name="build.dir.stubs" value="${build.dir}/stubs"/>
<property name="docs.build.dir" value="./doc"/>
<property name="src.dir" value="./src" />
<property name="test.dir" value="./test" />
<property name="jar.dir" value="./jars" />
<property name="jar.name.bin" value="SbgnERNotation.jar" />
<property name="jar.name.src" value="SbgnERNotation-src.jar" />
<property name="jar.name.doc" value="SbgnERNotation-docs.jar" />
<property name="lib.dir" value="./lib" />
<property name="target" value="1.5" />
<property name="source" value="1.5" />
<path id="classpath">
<pathelement location="${build.dir.src}" />
<pathelement location="${lib.dir}/CompoundGraph/CompoundGraph.jar" />
<pathelement location="${lib.dir}/BusinessObjects/BusinessObjects.jar" />
<pathelement location="${lib.dir}/Toolkit/toolkit.jar" />
</path>
<path id="test.classpath">
<path refid="classpath" />
<pathelement location="${build.dir.src}" />
<pathelement location="${build.dir.tests}" />
<pathelement location="${build.dir.stubs}" />
</path>
<target name="mkdirs" depends="" description="--> Creates the directories used in the build">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir.src}" />
<mkdir dir="${build.dir.tests}" />
<mkdir dir="${build.dir.stubs}" />
</target>
<target name="clean">
<delete dir="${build.dir}">
</delete>
</target>
<target name="buildAll" description="main build task" depends="clean,buildSrc, api-docs,buildTest, jarAll" />
<!--target name="buildStubs" description="build task" depends="buildSrc">
<javac source="${source}" target="${target}" classpathref="test.classpath" srcdir="${stubs.dir}" debug="true" debuglevel="lines,vars,source" destdir="${build.dir.stubs}">
</javac>
<copy todir="${build.dir.stubs}">
<fileset dir="${stubs.dir}">
<exclude name="**/*.java" />
<exclude name="**/*.class" />
</fileset>
</copy>
</target-->
<target name="buildTest" description="test build task" depends="buildSrc">
<javac source="${source}" target="${target}" classpathref="test.classpath" srcdir="${test.dir}" debug="true" debuglevel="lines,vars,source" destdir="${build.dir.tests}">
<exclude name="**"/> <!-- everything is excluded at the moment -->
</javac>
<copy todir="${build.dir.tests}">
<fileset dir="${test.dir}">
<exclude name="**/*.java" />
<exclude name="**/*.class" />
</fileset>
</copy>
</target>
<target name="buildSrc" description="src build task" depends="mkdirs">
<!--echo>running with classpath ${toString:classpath}</echo-->
<javac classpathref="classpath" srcdir="${src.dir}" source="${source}" target="${target}" debug="true" debuglevel="lines,vars,source" destdir="${build.dir.src}">
<exclude name="**/export/*"/>
<exclude name="**/ndom/*"/>
<exclude name="**/ndoAPI/*"/>
<exclude name="**/validation/*"/>
</javac>
<copy todir="${build.dir.src}">
<fileset dir="${src.dir}">
<exclude name="**/*.java" />
<exclude name="**/*.class" />
</fileset>
</copy>
</target>
<target name="api-docs" depends="buildSrc">
<javadoc access="package" author="true" splitindex="true" use="true" version="true" source="1.5" sourcepath="${src.dir}" destdir="${docs.build.dir}" doctitle="Business Objects API" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false">
<classpath refid="classpath" />
<fileset dir="${src.dir}">
<exclude name="**/export/*.java"/>
<exclude name="**/ndom/*.java"/>
<exclude name="**/ndoAPI/*.java"/>
<exclude name="**/validation/*.java"/>
</fileset>
</javadoc>
</target>
<target name="tests" depends="buildTest">
<delete dir="${build.dir}/test/logs" />
<mkdir dir="${build.dir}/test/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="yes">
<classpath>
<path refid="test.classpath" />
</classpath>
<batchtest todir="${build.dir}/test/logs">
<formatter type="xml" />
<fileset dir="${build.dir.tests}">
<include name="**/*Test.class" />
</fileset>
</batchtest>
</junit>
<!-- clean report directory -->
<delete dir="${build.dir}/test/junitReports" />
<mkdir dir="${build.dir}/test/junitReports" />
<!-- generate report -->
<junitreport todir="${build.dir}/test/junitReports">
<fileset dir="${build.dir}/test/logs" includes="**/*.xml" />
<report todir="${build.dir}/test/junitReports" />
</junitreport>
</target>
<target name="jarAll" depends="jar-bin, jar-src, jar-docs"/>
<target name="init-jardirs">
<delete dir="${jar.dir}" />
<mkdir dir="${jar.dir}" />
</target>
<target name="jar-bin" depends="buildSrc, init-jardirs">
<jar destfile="${jar.dir}/${jar.name.bin}">
<fileset dir="${build.dir.src}" />
</jar>
</target>
<target name="jar-src" depends="init-jardirs">
<jar destfile="${jar.dir}/${jar.name.src}">
<fileset dir="${src.dir}" />
</jar>
</target>
<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>
</project>