-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.xml
200 lines (170 loc) · 7.16 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
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
193
194
195
196
197
198
199
200
<?xml version="1.0" encoding="UTF-8"?>
<project name="VooDooDriver" default="default-build" basedir=".">
<description>Build script for VooDooDriver</description>
<!-- set global properties for this build -->
<property name="buildnum" value="666" />
<property name="bin" location="bin"/>
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="VooDooDriver"/>
<property name="lib" location="./lib"/>
<property name="product-zip" location="${bin}/VooDooDriver.zip"/>
<property name="sodaelements" location="${src}/org/sugarcrm/voodoodriver/Events.xml"/>
<property name="suitereport-header" location="${src}/org/sugarcrm/vddlogger/suitereporter-header.txt" />
<property name="issuesreport-header" location="${src}/org/sugarcrm/vddlogger/issues-header.txt" />
<property name="summaryreport-header" location="${src}/org/sugarcrm/vddlogger/summaryreporter-header.txt" />
<property name="reportlog-header" location="${src}/org/sugarcrm/vddlogger/reportlogheader.txt" />
<property name="officialName" value="VooDooDriver" />
<property name="options" location="${src}/org/sugarcrm/voodoodriver/options.xml"/>
<property name="version" value="0.0.1" />
<property name="year" value="2011" />
<pathconvert property="jars.classes" pathsep=" ">
<mapper>
<chainedmapper>
<!-- remove absolute path -->
<flattenmapper />
<!-- add lib/ prefix -->
<globmapper from="*" to="lib/*" />
</chainedmapper>
</mapper>
<path>
<!-- lib.home contains all jar files, in several subdirectories -->
<fileset dir="${lib}/libs">
<include name="**/*.jar" />
</fileset>
</path>
</pathconvert>
<target name="docs">
<javadoc sourcepath="${src}" destdir="${dist}/javadocs">
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javadoc>
</target>
<target name="api-docs" depends="init">
<copy todir="${dist}/docs">
<fileset dir="docs/" />
</copy>
</target>
<target name="copy-launchers" depends="init">
<copy todir="${dist}">
<fileset dir="launchers/" />
</copy>
</target>
<target name="init" depends="clean">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${bin}" />
<mkdir dir="${dist}" />
<mkdir dir="${dist}/lib"/>
</target>
<target name="clean">
<delete failonerror="false">
<fileset dir="${build}" />
</delete>
<delete failonerror="false">
<fileset dir="${dist}" />
</delete>
<delete failonerror="false">
<fileset dir="${bin}" />
</delete>
<delete failonerror="false" file="${product-zip}" />
<delete dir="${bin}" failonerror="false" />
<delete dir="${build}" failonerror="false" />
<delete dir="${dist}" failonerror="false" />
</target>
<target name="create-propfile">
<tstamp>
<format property="timestamp" pattern="MM/dd/yyyy hh:mm aa"
timezone="America/Los_Angeles" />
</tstamp>
<propertyfile file="${build}/org/sugarcrm/voodoodriver/vdd.properties" comment="VooDooDriver Properties">
<entry key="version" value="${timestamp} 1.5.1 (build: ${buildnum})" />
</propertyfile>
</target>
<target name="debug"
depends="clean,init,api-docs,copy-launchers,docs"
description="compile the source in debug mode" >
<javac srcdir="${src}" destdir="${build}" debug="true"
debuglevel="lines,vars,source"
includeantruntime="false">
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
<compilerarg value="-Xlint:unchecked"/>
</javac>
<copy todir="${build}/org/sugarcrm/voodoodriver" file="${sodaelements}" />
<copy todir="${build}/org/sugarcrm/vddlogger" file="${suitereport-header}" />
<copy todir="${build}/org/sugarcrm/vddlogger" file="${issuesreport-header}" />
<copy todir="${build}/org/sugarcrm/vddlogger" file="${summaryreport-header}" />
<copy todir="${build}/org/sugarcrm/vddlogger" file="${reportlog-header}" />
<copy todir="${build}/org/sugarcrm/voodoodriver" file="${options}" />
<antcall target="create-propfile" />
<jar jarfile="${dist}/VooDooDriver.jar" basedir="${build}">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
<manifest>
<attribute name="Main-Class" value="VooDooDriver"/>
<attribute name="Class-Path" value="${jars.classes}"/>
</manifest>
</jar>
<!-- LogReporter build -->
<jar jarfile="${dist}/VDDReporter.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="org.sugarcrm.vddlogger.VddLogConverter"/>
</manifest>
</jar>
<copy todir="${dist}/lib">
<fileset dir="lib/libs" />
</copy>
<zip destfile="${bin}/VooDooDriver-debug.zip" basedir="${dist}"/>
</target>
<target name="compile" depends="init" description="compile the source " >
<javac srcdir="${src}" destdir="${build}" includeantruntime="false">
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
<compilerarg value="-Xlint:unchecked"/>
</javac>
</target>
<target name="default-build" depends="compile,api-docs,copy-launchers,docs" description="generate the distribution" >
<copy todir="${dist}/lib">
<fileset dir="lib/libs" />
</copy>
<copy todir="${build}/org/sugarcrm/voodoodriver" file="${sodaelements}"/>
<copy todir="${build}/org/sugarcrm/vddlogger" file="${suitereport-header}" />
<copy todir="${build}/org/sugarcrm/vddlogger" file="${issuesreport-header}" />
<copy todir="${build}/org/sugarcrm/vddlogger" file="${summaryreport-header}" />
<copy todir="${build}/org/sugarcrm/vddlogger" file="${reportlog-header}" />
<copy todir="${build}/org/sugarcrm/voodoodriver" file="${options}" />
<antcall target="create-propfile" />
<jar jarfile="${dist}/VooDooDriver.jar" basedir="${build}">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
<manifest>
<attribute name="Main-Class" value="VooDooDriver"/>
<attribute name="Class-Path" value="${jars.classes}"/>
</manifest>
</jar>
<!-- LogReporter build -->
<jar jarfile="${dist}/VDDReporter.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="org.sugarcrm.vddlogger.VddLogConverter"/>
</manifest>
</jar>
<zip destfile="${bin}/VooDooDriver.zip" basedir="${dist}"/>
</target>
</project>