Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 260 lines (229 sloc) 9.484 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>
67 <javac destdir="${classes.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
68 <src path="${java.dir}" />
69 <classpath refid="main-classpath" />
70 </javac>
71 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
72
189a43d @jkreps Test ant target must copy in configs.
jkreps authored
73 <target name="buildtest" description="Compile test classes">
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
74 <replace-dir dir="${testclasses.dir}" />
189a43d @jkreps Test ant target must copy in configs.
jkreps authored
75 <copy todir="${testclasses.dir}">
76 <fileset dir="${commontestsrc.dir}">
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
77 <exclude name="**/*.java" />
78 <exclude name="**/*.html" />
189a43d @jkreps Test ant target must copy in configs.
jkreps authored
79 </fileset>
80 </copy>
81 <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
82 <src path="${unittestsrc.dir}" />
83 <src path="${inttestsrc.dir}" />
84 <src path="${commontestsrc.dir}" />
85 <classpath refid="main-classpath" />
189a43d @jkreps Test ant target must copy in configs.
jkreps authored
86 </javac>
87 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
88
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
89 <target name="test" depends="build, buildtest" description="Build test jar file">
90 <jar destfile="${dist.dir}/${name}-test-${curr.release}.jar">
91 <fileset dir="${testclasses.dir}" />
92 </jar>
93 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
94
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
95 <target name="jar" depends="build" description="Build server jar file">
96 <jar destfile="${dist.dir}/${name}-${curr.release}.jar">
97 <fileset dir="${classes.dir}">
98 <include name="**/*.*" />
99 </fileset>
100 <!-- include xsds -->
101 <fileset dir="${java.dir}">
102 <include name="**/*.xsd" />
103 </fileset>
104 </jar>
105 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
106
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
107 <target name="srcjar" description="Build source jar file">
108 <mkdir dir="${dist.dir}" />
109 <jar destfile="${dist.dir}/${name}-${curr.release}-src.jar">
110 <fileset dir="${java.dir}">
111 <include name="**/*.java" />
112 </fileset>
113 </jar>
114 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
115
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
116 <target name="contrib-build" depends="build, buildtest" description="Compile contrib packages (java and test) ">
117 <replace-dir dir="${contrib.classes.dir}" />
118 <javac destdir="${contrib.classes.dir}" target="1.5" debug="true" deprecation="true" failonerror="true">
119 <src path="${contrib.root.dir}" />
120 <src path="${contrib.root.dir}" />
121 <classpath refid="main-classpath" />
122 <classpath refid="contrib-classpath" />
123 </javac>
124 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
125
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
126 <target name="contrib-jar" depends="contrib-build" description="Build contrib jar file">
127 <jar destfile="${dist.dir}/${name}-contrib-${curr.release}.jar">
128 <fileset dir="${contrib.classes.dir}">
129 <include name="**/*.*" />
130 </fileset>
131 </jar>
132 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
133
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
134 <target name="contrib-srcjar" description="Build contrib source jar file">
135 <mkdir dir="${dist.dir}" />
136 <jar destfile="${dist.dir}/${name}-contrib-${curr.release}-src.jar">
137 <fileset dir="${contrib.root.dir}/**/java">
138 <include name="**/*.java" />
139 </fileset>
140 </jar>
141 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
142
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
143 <target name="contrib-junit" depends="contrib-jar" description="Run contrib junit tests.">
144 <replace-dir dir="${contribtestreport.dir}" />
145 <replace-dir dir="${contribtesthtml.dir}" />
146 <junit printsummary="yes" maxmemory="1024m" showoutput="true" failureProperty="test.failure">
147 <classpath refid="contrib-test-classpath" />
148 <formatter type="xml" />
149 <batchtest fork="yes" todir="${contribtestreport.dir}">
150 <fileset dir="${contrib.classes.dir}">
151 <include name="**/*Test.class" />
152 <exclude name="**/*PerformanceTest.class" />
153 </fileset>
154 </batchtest>
155 </junit>
156 <junitreport todir="${contribtesthtml.dir}">
157 <fileset dir="${contribtestreport.dir}">
158 <include name="TEST-*.xml" />
159 </fileset>
160 <report todir="${contribtesthtml.dir}" format="frames" />
161 </junitreport>
162 </target>
2cb9de1 @jkreps Add target to build release artifacts.
jkreps authored
163
164 <target name="release" depends="all" description="Create a release zip file with everything pre-built.">
165 <zip destfile="${dist.dir}/${name}-${curr.release}.zip">
166 <zipfileset dir="." prefix="voldemort-${curr.release}" filemode="755" includes="bin/*"/>
167 <zipfileset dir="." prefix="voldemort-${curr.release}" includes="**">
168 <exclude name="${dist.dir}/*classes"/>
169 <exclude name="bin/*"/>
170 </zipfileset>
171 </zip>
172 <tar destfile="${dist.dir}/${name}-${curr.release}.tar.gz" compression="gzip" longfile="gnu">
173 <tarfileset dir="." prefix="voldemort-${curr.release}" filemode="755" includes="bin/*"/>
174 <tarfileset dir="." prefix="voldemort-${curr.release}" includes="**">
175 <exclude name="${dist.dir}/*classes"/>
176 <exclude name="${dist.dir}/*.zip"/>
177 <exclude name="bin/*"/>
178 </tarfileset>
179 </tar>
180 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
181
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
182 <target name="junit" depends="build, buildtest" description="Run junit tests.">
183 <replace-dir dir="${testreport.dir}" />
184 <replace-dir dir="${testhtml.dir}" />
185 <junit printsummary="yes" showoutput="true">
186 <classpath refid="test-classpath" />
187 <formatter type="xml" />
188 <batchtest fork="yes" todir="${testreport.dir}">
189 <fileset dir="${unittestsrc.dir}">
190 <include name="**/*Test.java" />
191 <exclude name="**/Abstract*.java" />
192 </fileset>
193 </batchtest>
194 </junit>
195 <junitreport todir="${testhtml.dir}">
196 <fileset dir="${testreport.dir}">
197 <include name="TEST-*.xml" />
198 </fileset>
199 <report todir="${testhtml.dir}" format="frames" />
200 </junitreport>
201 </target>
8afb67c @bbansal Fixing failing contrib tests.
bbansal authored
202
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
203 <target name="junit-all" depends="junit, contrib-junit" description="Run All junit tests including contrib.">
204 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
205
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
206 <target name="war" depends="build" description="Build server war file">
207 <war destfile="${dist.dir}/${name}.war" webxml="web.xml" basedir="${classes.dir}">
208 <classes dir="${classes.dir}" />
209 <lib dir="${lib.dir}">
210 <exclude name="${lib.dir}/servlet-api.jar" />
211 <exclude name="${lib.dir}/src/**" />
212 </lib>
213 </war>
214 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
215
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
216 <macrodef name="make-javadocs">
217 <attribute name="dir" />
218 <attribute name="packagenames" />
c285d2e @jkreps Fix javadoc problems.
jkreps authored
219 <attribute name="javadir" />
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
220 <sequential>
221 <replace-dir dir="@{dir}" />
c285d2e @jkreps Fix javadoc problems.
jkreps authored
222 <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
223 <doctitle>${display.name}</doctitle>
224 <bottom>${author}</bottom>
225 <classpath refid="main-classpath" />
226 </javadoc>
227 </sequential>
228 </macrodef>
229
230 <target name="docs" description="Create complete Javadoc documentation">
c285d2e @jkreps Fix javadoc problems.
jkreps authored
231 <make-javadocs dir="${javadoc.dir}/all" packagenames="*" javadir="${java.dir}"/>
232 <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
233 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
234
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
235 <target name="redeploy" depends="war, deploy">
236 </target>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
237
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
238 <taskdef file="tomcat-tasks.properties">
239 <classpath>
240 <path location="${lib.dir}/catalina-ant.jar" />
241 </classpath>
242 </taskdef>
1b78867 @bbansal ReadOnly store batch data indexer package as contrib.
bbansal authored
243
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
244 <target name="list" description="List Tomcat applications">
245 <list url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" />
246 </target>
fbd0f95 @jkreps Initial import
jkreps authored
247
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
248 <target name="deploy" description="Deploy application" depends="war">
249 <deploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="${tomcat.context}" update="true" war="file:${dist.dir}/${name}.war" />
250 </target>
fbd0f95 @jkreps Initial import
jkreps authored
251
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
252 <target name="undeploy" description="Undeploy application">
253 <undeploy url="${tomcat.manager.url}"
fbd0f95 @jkreps Initial import
jkreps authored
254 username="${tomcat.manager.username}"
255 password="${tomcat.manager.password}"
256 path="${tomcat.context}"/>
11ecbeb @jkreps Add plugin mechanism for storage engines plus MongoDB plugin.
jkreps authored
257 </target>
fbd0f95 @jkreps Initial import
jkreps authored
258
259 </project>
Something went wrong with that request. Please try again.