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