Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 291 lines (258 sloc) 10.643 kB
fbd0f95 @jkreps Initial import
jkreps authored
1 <?xml version="1.0"?>
2
3 <project name="voldemort" basedir="." default="all">
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
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 <property environment="env" />
10
11 <path id="main-classpath">
12 <fileset dir="${lib.dir}">
13 <include name="*.jar" />
14 </fileset>
15 <pathelement path="${classes.dir}" />
16 </path>
17
18 <path id="contrib-classpath">
19 <fileset dir="${dist.dir}">
20 <include name="${name}-${curr.release}.jar" />
21 </fileset>
22 <fileset dir="${contrib.root.dir}">
23 <include name="**/*.jar" />
24 </fileset>
25 <path refid="test-classpath" />
26 </path>
27
28 <path id="test-classpath">
29 <pathelement path="${env.VOLD_TEST_JARS}" />
30 <path refid="main-classpath" />
31 <pathelement path="${testclasses.dir}" />
32 </path>
33
34 <path id="contrib-test-classpath">
35 <path refid="main-classpath" />
36 <path refid="contrib-classpath" />
37 <fileset dir="${dist.dir}">
38 <include name="${name}-contrib-${curr.release}.jar" />
39 </fileset>
40 </path>
41
42 <macrodef name="replace-dir">
43 <attribute name="dir" />
44 <sequential>
45 <delete dir="@{dir}" />
46 <mkdir dir="@{dir}" />
47 </sequential>
48 </macrodef>
49
2cb9de1 @jkreps Add target to build release artifacts.
jkreps authored
50 <target name="all" depends="clean, jar, test, contrib-jar, srcjar" description="Build all artifacts." />
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
51
52 <target name="clean" description="Delete generated files.">
53 <delete dir="${dist.dir}" />
54 <replace-dir dir="${javadoc.dir}" />
55 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
56
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
57 <target name="build" description="Compile main source tree java files">
58 <replace-dir dir="${classes.dir}" />
59 <!-- copy non-java files to classes dir to load from classpath -->
60 <copy todir="${classes.dir}">
61 <fileset dir="${java.dir}">
62 <exclude name="**/*.java" />
63 <exclude name="**/*.html" />
d628362 @jkreps Merge in changes from li-918 branch.
jkreps authored
64 <exclude name="**/log4j.properties" />
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
65 </fileset>
66 </copy>
2d1b21b @jkreps Add log4j.properties to classpath for shell scripts.
jkreps authored
67 <!-- place to put log4j.properties -->
68 <replace-dir dir="${resources.dir}"/>
69 <copy file="${java.dir}/log4j.properties" todir="${resources.dir}"/>
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
70 <javac destdir="${classes.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
71 <src path="${java.dir}" />
72 <classpath refid="main-classpath" />
73 </javac>
74 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
75
189a43d @jkreps Test ant target must copy in configs.
jkreps authored
76 <target name="buildtest" description="Compile test classes">
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
77 <replace-dir dir="${testclasses.dir}" />
189a43d @jkreps Test ant target must copy in configs.
jkreps authored
78 <copy todir="${testclasses.dir}">
79 <fileset dir="${commontestsrc.dir}">
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
80 <exclude name="**/*.java" />
81 <exclude name="**/*.html" />
189a43d @jkreps Test ant target must copy in configs.
jkreps authored
82 </fileset>
83 </copy>
84 <javac destdir="${testclasses.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
85 <src path="${unittestsrc.dir}" />
86 <src path="${inttestsrc.dir}" />
87 <src path="${commontestsrc.dir}" />
88 <classpath refid="main-classpath" />
189a43d @jkreps Test ant target must copy in configs.
jkreps authored
89 </javac>
90 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
91
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
92 <target name="test" depends="build, buildtest" description="Build test jar file">
93 <jar destfile="${dist.dir}/${name}-test-${curr.release}.jar">
94 <fileset dir="${testclasses.dir}" />
95 </jar>
96 </target>
c49df1b @jkreps Add support for protocol buffers based network format. Add new client…
jkreps authored
97
98 <target name="protobuff" description="Generate source files from .proto files">
99 <path id="proto-files">
100 <fileset dir="${protobuff.dir}" />
101 </path>
102 <property name="proto.path" location="${protobuff.dir}"/>
103 <property name="javaout.path" location="${java.dir}"/>
104 <exec executable="protoc" failonerror="true">
105 <arg value="--proto_path=${proto.path}"/>
106 <arg value="--java_out=${javaout.path}"/>
107 <arg pathref="proto-files"/>
108 </exec>
109 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
110
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
111 <target name="jar" depends="build" description="Build server jar file">
112 <jar destfile="${dist.dir}/${name}-${curr.release}.jar">
113 <fileset dir="${classes.dir}">
114 <include name="**/*.*" />
115 </fileset>
116 <!-- include xsds -->
117 <fileset dir="${java.dir}">
118 <include name="**/*.xsd" />
119 </fileset>
120 </jar>
121 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
122
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
123 <target name="srcjar" description="Build source jar file">
124 <mkdir dir="${dist.dir}" />
125 <jar destfile="${dist.dir}/${name}-${curr.release}-src.jar">
126 <fileset dir="${java.dir}">
127 <include name="**/*.java" />
128 </fileset>
129 </jar>
130 </target>
c49df1b @jkreps Add support for protocol buffers based network format. Add new client…
jkreps authored
131
d2274da @jkreps Misc. read-only store improvements. Some cleanup in hadoop contrib.
jkreps authored
132 <target name="alljar" depends="build, contrib-build" description="Build a jar file that includes all contrib code.">
133 <jar destfile="${dist.dir}/${name}-${curr.release}-all.jar">
134 <fileset dir="${classes.dir}">
135 <include name="**/*.*" />
136 </fileset>
137 <fileset dir="${contrib.classes.dir}">
138 <include name="**/*.*" />
139 </fileset>
140 <!-- include xsds -->
141 <fileset dir="${java.dir}">
142 <include name="**/*.xsd" />
143 </fileset>
144 </jar>
145 </target>
146
c49df1b @jkreps Add support for protocol buffers based network format. Add new client…
jkreps authored
147 <target name="war" depends="build" description="Build server war file">
148 <war destfile="${dist.dir}/${name}.war" webxml="web.xml" basedir="${classes.dir}">
149 <classes dir="${classes.dir}"/>
150 <lib dir="${lib.dir}">
151 <exclude name="${lib.dir}/servlet-api.jar"/>
152 <exclude name="${lib.dir}/src/**"/>
153 </lib>
154 </war>
155 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
156
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
157 <target name="contrib-build" depends="build, buildtest" description="Compile contrib packages (java and test) ">
158 <replace-dir dir="${contrib.classes.dir}" />
159 <javac destdir="${contrib.classes.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
160 <src path="${contrib.root.dir}" />
161 <src path="${contrib.root.dir}" />
162 <classpath refid="main-classpath" />
163 <classpath refid="contrib-classpath" />
164 </javac>
165 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
166
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
167 <target name="contrib-jar" depends="contrib-build" description="Build contrib jar file">
168 <jar destfile="${dist.dir}/${name}-contrib-${curr.release}.jar">
169 <fileset dir="${contrib.classes.dir}">
170 <include name="**/*.*" />
171 </fileset>
172 </jar>
173 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
174
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
175 <target name="contrib-srcjar" description="Build contrib source jar file">
176 <mkdir dir="${dist.dir}" />
177 <jar destfile="${dist.dir}/${name}-contrib-${curr.release}-src.jar">
178 <fileset dir="${contrib.root.dir}/**/java">
179 <include name="**/*.java" />
180 </fileset>
181 </jar>
182 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
183
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
184 <target name="contrib-junit" depends="contrib-jar" description="Run contrib junit tests.">
185 <replace-dir dir="${contribtestreport.dir}" />
186 <replace-dir dir="${contribtesthtml.dir}" />
187 <junit printsummary="yes" maxmemory="1024m" showoutput="true" failureProperty="test.failure">
188 <classpath refid="contrib-test-classpath" />
189 <formatter type="xml" />
190 <batchtest fork="yes" todir="${contribtestreport.dir}">
191 <fileset dir="${contrib.classes.dir}">
192 <include name="**/*Test.class" />
193 <exclude name="**/*PerformanceTest.class" />
194 </fileset>
195 </batchtest>
196 </junit>
197 <junitreport todir="${contribtesthtml.dir}">
198 <fileset dir="${contribtestreport.dir}">
199 <include name="TEST-*.xml" />
200 </fileset>
201 <report todir="${contribtesthtml.dir}" format="frames" />
202 </junitreport>
203 </target>
2cb9de1 @jkreps Add target to build release artifacts.
jkreps authored
204
205 <target name="release" depends="all" description="Create a release zip file with everything pre-built.">
206 <zip destfile="${dist.dir}/${name}-${curr.release}.zip">
207 <zipfileset dir="." prefix="voldemort-${curr.release}" filemode="755" includes="bin/*"/>
208 <zipfileset dir="." prefix="voldemort-${curr.release}" includes="**">
209 <exclude name="${dist.dir}/*classes"/>
210 <exclude name="bin/*"/>
211 </zipfileset>
212 </zip>
213 <tar destfile="${dist.dir}/${name}-${curr.release}.tar.gz" compression="gzip" longfile="gnu">
214 <tarfileset dir="." prefix="voldemort-${curr.release}" filemode="755" includes="bin/*"/>
215 <tarfileset dir="." prefix="voldemort-${curr.release}" includes="**">
216 <exclude name="${dist.dir}/*classes"/>
217 <exclude name="${dist.dir}/*.zip"/>
218 <exclude name="bin/*"/>
219 </tarfileset>
220 </tar>
221 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
222
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
223 <target name="junit" depends="build, buildtest" description="Run junit tests.">
224 <replace-dir dir="${testreport.dir}" />
225 <replace-dir dir="${testhtml.dir}" />
226 <junit printsummary="yes" showoutput="true">
227 <classpath refid="test-classpath" />
228 <formatter type="xml" />
229 <batchtest fork="yes" todir="${testreport.dir}">
230 <fileset dir="${unittestsrc.dir}">
231 <include name="**/*Test.java" />
232 <exclude name="**/Abstract*.java" />
233 </fileset>
234 </batchtest>
235 </junit>
236 <junitreport todir="${testhtml.dir}">
237 <fileset dir="${testreport.dir}">
238 <include name="TEST-*.xml" />
239 </fileset>
240 <report todir="${testhtml.dir}" format="frames" />
241 </junitreport>
242 </target>
8afb67c @bbansal Fixing failing contrib tests.
bbansal authored
243
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
244 <target name="junit-all" depends="junit, contrib-junit" description="Run All junit tests including contrib.">
245 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
246
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
247 <macrodef name="make-javadocs">
248 <attribute name="dir" />
249 <attribute name="packagenames" />
c285d2e @jkreps Fix javadoc problems.
jkreps authored
250 <attribute name="javadir" />
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
251 <sequential>
252 <replace-dir dir="@{dir}" />
c285d2e @jkreps Fix javadoc problems.
jkreps authored
253 <javadoc sourcepath="@{javadir}" destdir="@{dir}" windowtitle="${display.name}" source="1.5" author="true" version="true" use="true" packagenames="@{packagenames}">
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
254 <doctitle>${display.name}</doctitle>
255 <bottom>${author}</bottom>
256 <classpath refid="main-classpath" />
257 </javadoc>
258 </sequential>
259 </macrodef>
260
261 <target name="docs" description="Create complete Javadoc documentation">
c285d2e @jkreps Fix javadoc problems.
jkreps authored
262 <make-javadocs dir="${javadoc.dir}/all" packagenames="*" javadir="${java.dir}"/>
263 <make-javadocs dir="${javadoc.dir}/client" packagenames="voldemort.versioning.*, voldemort.client.*,voldemort.serialization.*" javadir="${java.dir}"/>
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
264 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
265
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
266 <target name="redeploy" depends="war, deploy">
267 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
268
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
269 <taskdef file="tomcat-tasks.properties">
270 <classpath>
271 <path location="${lib.dir}/catalina-ant.jar" />
272 </classpath>
273 </taskdef>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
274
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
275 <target name="list" description="List Tomcat applications">
276 <list url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" />
277 </target>
fbd0f95 @jkreps Initial import
jkreps authored
278
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
279 <target name="deploy" description="Deploy application" depends="war">
280 <deploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="${tomcat.context}" update="true" war="file:${dist.dir}/${name}.war" />
281 </target>
fbd0f95 @jkreps Initial import
jkreps authored
282
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
283 <target name="undeploy" description="Undeploy application">
284 <undeploy url="${tomcat.manager.url}"
fbd0f95 @jkreps Initial import
jkreps authored
285 username="${tomcat.manager.username}"
286 password="${tomcat.manager.password}"
287 path="${tomcat.context}"/>
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
288 </target>
fbd0f95 @jkreps Initial import
jkreps authored
289
290 </project>
Something went wrong with that request. Please try again.