Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 256 lines (224 sloc) 8.392 kb
fbd0f95d »
2009-01-02 Initial import
1 <?xml version="1.0"?>
2
3 <project name="voldemort" basedir="." default="all">
1b788672 »
2009-02-05 ReadOnly store batch data indexer package as contrib.
4 <property file="build.properties"/>
5
6 <property name="name" value="voldemort"/>
7 <property name="display.name" value="Voldemort"/>
8 <property name="author" value="Jay Kreps"/>
9
10 <path id="main-classpath">
11 <fileset dir="${lib.dir}">
12 <include name="*.jar"/>
13 </fileset>
14 <pathelement path="${classes.dir}"/>
15 </path>
16
17 <path id="contrib-classpath">
18 <fileset dir="${dist.dir}">
19 <include name="${name}-${curr.release}.jar" />
20 </fileset>
21 <fileset dir="${contrib.src.dir}">
22 <include name="**/*.jar" />
23 </fileset>
24 </path>
25
26 <path id="test-classpath">
27 <path refid="main-classpath" />
28 <pathelement path="${testclasses.dir}"/>
29 </path>
30
31 <path id="contrib-test-classpath">
32 <path refid="main-classpath" />
33 <path refid="contrib-classpath" />
34 <fileset dir="${dist.dir}">
35 <include name="${name}-contrib-${curr.release}.jar" />
36 </fileset>
37 </path>
38
39 <macrodef name="replace-dir">
40 <attribute name="dir"/>
41 <sequential>
42 <delete dir="@{dir}"/>
43 <mkdir dir="@{dir}"/>
44 </sequential>
45 </macrodef>
46
47 <target name="all" depends="clean, srcjar, jar, war, test, contrib-jar" description="Build all artifacts." />
48
49 <target name="clean" description="Delete generated files.">
50 <delete dir="${dist.dir}" />
51 <replace-dir dir="${javadoc.dir}"/>
52 </target>
53
54 <target name="build" description="Compile main source tree java files">
55 <replace-dir dir="${classes.dir}"/>
56 <!-- copy non-java files to classes dir to load from classpath -->
57 <copy todir="${classes.dir}">
58 <fileset dir="${java.dir}">
59 <exclude name="**/*.java"/>
60 <exclude name="**/*.html"/>
61 </fileset>
62 </copy>
63 <javac destdir="${classes.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
64 <src path="${java.dir}"/>
65 <classpath refid="main-classpath"/>
66 </javac>
67 <buildnumber file="build_number.txt"/>
68 </target>
69
70 <target name="test" depends="build, buildtest" description="Build test jar file">
71 <jar destfile="${dist.dir}/${name}-test-${curr.release}.jar">
72 <fileset dir="${testclasses.dir}"/>
73 </jar>
74 </target>
75
76 <target name="jar" depends="build" description="Build server jar file">
77 <jar destfile="${dist.dir}/${name}-${curr.release}.jar">
78 <fileset dir="${classes.dir}">
79 <include name="**/*.*"/>
80 </fileset>
81 <!-- include xsds -->
82 <fileset dir="${java.dir}">
83 <include name="**/*.xsd"/>
84 </fileset>
85 </jar>
86 </target>
87
88 <target name="srcjar" description="Build source jar file">
89 <mkdir dir="${dist.dir}"/>
90 <jar destfile="${dist.dir}/${name}-${curr.release}-src.jar">
91 <fileset dir="${java.dir}">
92 <include name="**/*.java"/>
93 </fileset>
94 </jar>
95 </target>
96
2f0129a1 »
2009-02-27 read-only swapper and test committed.
97 <target name="contrib-build" depends="build, buildtest" description="Compile contrib packages (java and test) ">
1b788672 »
2009-02-05 ReadOnly store batch data indexer package as contrib.
98 <replace-dir dir="${contrib.classes.dir}"/>
99 <!-- copy non-java files to classes dir to load from classpath -->
100 <copy todir="${contrib.classes.dir}">
101 <fileset dir="${contrib.java.dir}">
102 <exclude name="**/*.java"/>
103 <exclude name="**/*.html"/>
104 </fileset>
105 </copy>
106 <javac destdir="${contrib.classes.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
107 <src path="${contrib.java.dir}"/>
108 <classpath refid="main-classpath"/>
109 <classpath refid="contrib-classpath"/>
110 </javac>
111 <buildnumber file="build_number.txt"/>
112 </target>
113
114
115
116 <target name="contrib-jar" depends="contrib-build" description="Build contrib jar file">
117 <jar destfile="${dist.dir}/${name}-contrib-${curr.release}.jar">
118 <fileset dir="${contrib.classes.dir}">
119 <include name="**/*.*"/>
120 </fileset>
121 <!-- include xsds -->
122 <fileset dir="${contrib.java.dir}">
123 <include name="**/*.xsd"/>
124 </fileset>
125 </jar>
126 </target>
127
128 <target name="contrib-srcjar" description="Build contrib source jar file">
129 <mkdir dir="${dist.dir}"/>
130 <jar destfile="${dist.dir}/${name}-contrib-${curr.release}-src.jar">
131 <fileset dir="${contrib.java.dir}">
132 <include name="**/*.java"/>
133 </fileset>
134 </jar>
135 </target>
136
137 <target name="utils" depends="build" description="Build a jar file with voldemort util classes.">
138 <tstamp>
139 <format property="TODAY" pattern="yyyy-MM-dd" locale="en,US"/>
140 </tstamp>
141 <jar destfile="${dist.dir}/${name}-utils-${TODAY}.jar">
142 <fileset dir="${classes.dir}">
143 <include name="voldemort/VoldemortException.class"/>
144 <include name="voldemort/Serializer.class"/>
145 <include name="voldemort/serialization/SerializationException.class"/>
146 <include name="voldemort/serialization/json/*"/>
147 <include name="voldemort/utils/*"/>
148 </fileset>
149 </jar>
150 </target>
151
152 <target name="buildtest" description="Compile test classes">
153 <replace-dir dir="${testclasses.dir}"/>
154 <javac destdir="${testclasses.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
155 <src path="${unittestsrc.dir}"/>
156 <src path="${inttestsrc.dir}"/>
157 <src path="${commontestsrc.dir}"/>
158 <classpath refid="main-classpath"/>
159 </javac>
160 </target>
161
162 <target name="contrib-junit" depends="contrib-jar" description="Run contrib junit tests.">
163 <junit printsummary="yes" maxmemory="1024m" showoutput="true" failureProperty="test.failure">
164 <classpath refid="contrib-test-classpath"/>
165 <formatter type="brief" usefile="false"/>
166 <batchtest fork="yes" todir="${testreport.dir}">
167 <fileset dir="${contrib.classes.dir}">
168 <include name="**/Test*.class"/>
169 </fileset>
170 </batchtest>
171 </junit>
172 </target>
173
174 <target name="junit" depends="build, buildtest" description="Run junit tests.">
175 <replace-dir dir="${testreport.dir}"/>
176 <replace-dir dir="${testhtml.dir}"/>
177 <junit printsummary="yes" showoutput="true">
178 <classpath refid="test-classpath"/>
179 <formatter type="xml"/>
180 <batchtest fork="yes" todir="${testreport.dir}">
181 <fileset dir="${unittestsrc.dir}">
182 <include name="**/*Test.java"/>
183 </fileset>
184 </batchtest>
185 </junit>
186 <junitreport todir="${testhtml.dir}">
187 <fileset dir="${testreport.dir}">
188 <include name="TEST-*.xml"/>
189 </fileset>
190 <report todir="${testhtml.dir}" styledir="junitreport" format="frames" />
191 </junitreport>
192 </target>
193
194 <target name="war" depends="build" description="Build server war file">
195 <war destfile="${dist.dir}/${name}.war" webxml="web.xml" basedir="${classes.dir}">
196 <classes dir="${classes.dir}"/>
197 <lib dir="${lib.dir}">
198 <exclude name="${lib.dir}/servlet-api.jar"/>
199 <exclude name="${lib.dir}/src/**"/>
200 </lib>
201 </war>
202 </target>
203
204 <macrodef name="make-javadocs">
205 <attribute name="dir"/>
206 <attribute name="packagenames"/>
207 <sequential>
208 <replace-dir dir="@{dir}"/>
209 <javadoc sourcepath="${java.dir}" destdir="@{dir}" windowtitle="${display.name}"
8219a4ae »
2009-01-19 Cleanup. Add support for removing versioning from voldemort config. M…
210 source="1.5" author="true" version="true" use="true" packagenames="@{packagenames}">
1b788672 »
2009-02-05 ReadOnly store batch data indexer package as contrib.
211 <doctitle>${display.name}</doctitle>
212 <bottom>${author}</bottom>
213 <classpath refid="main-classpath"/>
214 </javadoc>
215 </sequential>
216 </macrodef>
217
218 <target name="docs" description="Create complete Javadoc documentation">
219 <make-javadocs dir="${javadoc.dir}/all" packagenames="*"/>
220 <make-javadocs dir="${javadoc.dir}/client" packagenames="voldemort.versioning.*, voldemort.client.*,voldemort.serialization.*"/>
221 <make-javadocs dir="${javadoc.dir}/contrib" packagenames="voldemort.contrib.*"/>
222 </target>
223
224 <target name="redeploy" depends="war, deploy">
225 </target>
226
227 <taskdef file="tomcat-tasks.properties">
228 <classpath>
229 <path location="${lib.dir}/catalina-ant.jar"/>
230 </classpath>
231 </taskdef>
232
233 <target name="list" description="List Tomcat applications">
234 <list url="${tomcat.manager.url}"
fbd0f95d »
2009-01-02 Initial import
235 username="${tomcat.manager.username}"
236 password="${tomcat.manager.password}"/>
1b788672 »
2009-02-05 ReadOnly store batch data indexer package as contrib.
237 </target>
fbd0f95d »
2009-01-02 Initial import
238
1b788672 »
2009-02-05 ReadOnly store batch data indexer package as contrib.
239 <target name="deploy" description="Deploy application" depends="war">
240 <deploy url="${tomcat.manager.url}"
fbd0f95d »
2009-01-02 Initial import
241 username="${tomcat.manager.username}"
242 password="${tomcat.manager.password}"
243 path="${tomcat.context}"
244 update="true"
245 war="file:${dist.dir}/${name}.war"/>
1b788672 »
2009-02-05 ReadOnly store batch data indexer package as contrib.
246 </target>
fbd0f95d »
2009-01-02 Initial import
247
1b788672 »
2009-02-05 ReadOnly store batch data indexer package as contrib.
248 <target name="undeploy" description="Undeploy application">
249 <undeploy url="${tomcat.manager.url}"
fbd0f95d »
2009-01-02 Initial import
250 username="${tomcat.manager.username}"
251 password="${tomcat.manager.password}"
252 path="${tomcat.context}"/>
1b788672 »
2009-02-05 ReadOnly store batch data indexer package as contrib.
253 </target>
fbd0f95d »
2009-01-02 Initial import
254
255 </project>
Something went wrong with that request. Please try again.