commit | author | age
|
5fe7df
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
f6b200
|
2 |
<project name="gitblit" default="compile" xmlns:mx="antlib:org.moxie">
|
5fe7df
|
3 |
|
ff3015
|
4 |
<!--
|
JM |
5 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
f6b200
|
6 |
Retrieve Moxie Toolkit
|
f38c90
|
7 |
|
JM |
8 |
documentation @ http://gitblit.github.io/moxie
|
ff3015
|
9 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
10 |
-->
|
f5427c
|
11 |
<property name="moxie.version" value="0.7.2" />
|
a4c680
|
12 |
<property name="moxie.url" value="http://gitblit.github.io/moxie/maven" />
|
f6b200
|
13 |
<property name="moxie.jar" value="moxie-toolkit-${moxie.version}.jar" />
|
JM |
14 |
<property name="moxie.dir" value="${user.home}/.moxie" />
|
5450d0
|
15 |
|
f6b200
|
16 |
<!-- Download Moxie from it's Maven repository to user.home -->
|
8e2b99
|
17 |
<mkdir dir="${moxie.dir}" />
|
f6b200
|
18 |
<get src="${moxie.url}/org/moxie/moxie-toolkit/${moxie.version}/${moxie.jar}"
|
JM |
19 |
dest="${moxie.dir}" skipexisting="true" verbose="true" />
|
|
20 |
|
|
21 |
<!-- Register Moxie tasks -->
|
|
22 |
<taskdef uri="antlib:org.moxie">
|
|
23 |
<classpath location="${moxie.dir}/${moxie.jar}" />
|
|
24 |
</taskdef>
|
|
25 |
|
|
26 |
<!-- Project directories -->
|
|
27 |
<property name="project.src.dir" value="${basedir}/src/main/java" />
|
|
28 |
<property name="project.resources.dir" value="${basedir}/src/main/resources" />
|
|
29 |
<property name="project.distrib.dir" value="${basedir}/src/main/distrib" />
|
85c2e6
|
30 |
|
JM |
31 |
<!--
|
|
32 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
f6b200
|
33 |
Initialize Moxie and setup build properties
|
85c2e6
|
34 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
35 |
-->
|
f6b200
|
36 |
<target name="prepare">
|
5450d0
|
37 |
|
f6b200
|
38 |
<!-- Setup Ant build from build.moxie and resolve dependencies.
|
JM |
39 |
if it exists, build.properties is automatically loaded -->
|
|
40 |
<mx:init verbose="no" />
|
|
41 |
|
|
42 |
<!-- Set Ant project properties -->
|
|
43 |
<property name="distribution.zipfile" value="gitblit-${project.version}.zip" />
|
|
44 |
<property name="distribution.tgzfile" value="gitblit-${project.version}.tar.gz" />
|
|
45 |
<property name="distribution.warfile" value="gitblit-${project.version}.war" />
|
|
46 |
<property name="fedclient.zipfile" value="fedclient-${project.version}.zip" />
|
|
47 |
<property name="manager.zipfile" value="manager-${project.version}.zip" />
|
|
48 |
<property name="authority.zipfile" value="authority-${project.version}.zip" />
|
|
49 |
<property name="gbapi.zipfile" value="gbapi-${project.version}.zip" />
|
|
50 |
<property name="express.zipfile" value="express-${project.version}.zip" />
|
93d506
|
51 |
|
f6b200
|
52 |
<!-- Download links -->
|
JM |
53 |
<property name="gc.url" value="http://code.google.com/p/gitblit/downloads/detail?name=" />
|
|
54 |
</target>
|
|
55 |
|
|
56 |
|
|
57 |
<!--
|
|
58 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
59 |
Cleanup all build artifacts and directories
|
|
60 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
61 |
-->
|
|
62 |
<target name="clean" depends="prepare" description="Cleanup all build artifacts and directories">
|
|
63 |
<!-- cleanup legacy build structure -->
|
|
64 |
<!-- this can be eliminated after 1.3.0 release -->
|
93d506
|
65 |
<delete>
|
JM |
66 |
<fileset dir="${basedir}">
|
|
67 |
<include name="*.zip" />
|
|
68 |
<include name="*.war" />
|
|
69 |
<include name="*.jar" />
|
|
70 |
</fileset>
|
|
71 |
</delete>
|
f6b200
|
72 |
<delete dir="${basedir}/deploy" failonerror="false" />
|
JM |
73 |
<delete dir="${basedir}/express" failonerror="false" />
|
|
74 |
<delete dir="${basedir}/jar" failonerror="false" />
|
|
75 |
<delete dir="${basedir}/javadoc" failonerror="false" />
|
|
76 |
<delete dir="${basedir}/site" failonerror="false" />
|
|
77 |
<delete dir="${basedir}/temp" failonerror="false" />
|
|
78 |
<delete dir="${basedir}/war" failonerror="false" />
|
93d506
|
79 |
|
f6b200
|
80 |
<!-- Clean build and target directories -->
|
JM |
81 |
<mx:clean />
|
|
82 |
|
|
83 |
</target>
|
|
84 |
|
|
85 |
|
|
86 |
<!--
|
|
87 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
88 |
Setup
|
|
89 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
90 |
-->
|
|
91 |
<target name="setup" depends="prepare" description="Setup up project">
|
|
92 |
|
|
93 |
<!-- copy distrib/data to project data directory -->
|
93d506
|
94 |
<mkdir dir="${basedir}/data" />
|
JM |
95 |
<copy todir="${basedir}/data" overwrite="false">
|
f6b200
|
96 |
<fileset dir="${project.distrib.dir}/data" />
|
f98825
|
97 |
</copy>
|
d8a0f1
|
98 |
|
b9afce
|
99 |
<!-- copy gitblit.properties to the source directory.
|
f6b200
|
100 |
this file is only used for parsing setting descriptions. -->
|
b9afce
|
101 |
<copy tofile="${project.src.dir}/reference.properties" overwrite="true"
|
f6b200
|
102 |
file="${project.distrib.dir}/data/gitblit.properties" />
|
93d506
|
103 |
|
f6b200
|
104 |
<!--
|
JM |
105 |
upgrade existing workspace to data directory
|
|
106 |
this code can be eliminated after 1.3.0 release
|
|
107 |
-->
|
93d506
|
108 |
<move todir="${basedir}/data" overwrite="true" failonerror="false">
|
JM |
109 |
<fileset dir="${basedir}">
|
|
110 |
<include name="users.conf" />
|
|
111 |
<include name="projects.conf" />
|
|
112 |
<include name="gitblit.properties" />
|
|
113 |
<include name="serverKeyStore.jks" />
|
|
114 |
<include name="serverTrustStore.jks" />
|
|
115 |
</fileset>
|
|
116 |
</move>
|
|
117 |
<move todir="${basedir}/data/certs" overwrite="true" failonerror="false">
|
|
118 |
<fileset dir="${basedir}/certs" />
|
|
119 |
</move>
|
|
120 |
<move todir="${basedir}/data/git" overwrite="true" failonerror="false">
|
|
121 |
<fileset dir="${basedir}/git" />
|
|
122 |
</move>
|
|
123 |
<move todir="${basedir}/data/proposals" overwrite="true" failonerror="false">
|
|
124 |
<fileset dir="${basedir}/proposals" />
|
|
125 |
</move>
|
85c2e6
|
126 |
</target>
|
JM |
127 |
|
f6b200
|
128 |
|
JM |
129 |
<!--
|
|
130 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
131 |
Compile
|
|
132 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
133 |
-->
|
|
134 |
<target name="compile" depends="setup" description="compiles Gitblit from source">
|
|
135 |
|
|
136 |
<!-- Generate the Keys class from the properties file -->
|
|
137 |
<mx:keys propertiesfile="${project.distrib.dir}/data/gitblit.properties"
|
|
138 |
outputclass="com.gitblit.Keys"
|
|
139 |
todir="${project.src.dir}" />
|
|
140 |
|
|
141 |
<!-- Compile project incrementally -->
|
|
142 |
<mx:javac scope="compile" clean="false" />
|
|
143 |
|
|
144 |
</target>
|
|
145 |
|
|
146 |
|
|
147 |
<!--
|
|
148 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
149 |
Report the compile dependencies on the console
|
|
150 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
151 |
-->
|
|
152 |
<target name="report" depends="prepare" description="generate dependency report">
|
|
153 |
|
|
154 |
<!-- Report compile dependencies to the console -->
|
|
155 |
<mx:report scope="compile" destfile="${project.targetDirectory}/dependencies.txt" />
|
|
156 |
|
|
157 |
</target>
|
|
158 |
|
|
159 |
|
|
160 |
<!--
|
|
161 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
162 |
Test
|
|
163 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
164 |
-->
|
|
165 |
<target name="test" depends="compile" description="compiles Gitblit from source and runs unit tests">
|
|
166 |
|
|
167 |
<!-- Compile unit tests -->
|
|
168 |
<mx:javac scope="test" />
|
|
169 |
|
|
170 |
<!-- Run unit tests -->
|
|
171 |
<mx:test failonerror="true" />
|
|
172 |
|
|
173 |
</target>
|
|
174 |
|
|
175 |
|
|
176 |
<!--
|
|
177 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
178 |
Run Gitblit GO
|
|
179 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
180 |
-->
|
|
181 |
<target name="run" depends="compile" description="Run Gitblit GO">
|
|
182 |
|
|
183 |
<!-- run the mainclass in a separate JVM -->
|
|
184 |
<mx:run fork="true" />
|
|
185 |
|
|
186 |
</target>
|
|
187 |
|
85c2e6
|
188 |
|
JM |
189 |
<!--
|
|
190 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
191 |
Build Gitblit GO
|
|
192 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
193 |
-->
|
f6b200
|
194 |
<target name="buildGO" depends="compile" description="Build Gitblit GO distribution">
|
85c2e6
|
195 |
|
f6b200
|
196 |
<echo>Building Gitblit GO ${project.version}</echo>
|
85c2e6
|
197 |
|
f6b200
|
198 |
<local name="go.dir" />
|
JM |
199 |
<property name="go.dir" value="${project.outputDirectory}/go" />
|
|
200 |
<delete dir="${go.dir}" />
|
85c2e6
|
201 |
|
f6b200
|
202 |
<prepareDataDirectory toDir="${go.dir}/data" />
|
JM |
203 |
|
|
204 |
<!-- Build jar -->
|
|
205 |
<mx:jar destfile="${go.dir}/gitblit.jar" includeresources="true">
|
|
206 |
<mainclass name="com.gitblit.GitBlitServer" />
|
|
207 |
<launcher paths="ext" />
|
|
208 |
</mx:jar>
|
|
209 |
|
|
210 |
<!-- Generate the docs for the GO build -->
|
|
211 |
<generateDocs toDir="${go.dir}/docs" />
|
|
212 |
|
|
213 |
<!-- Create GO Windows Zip deployment -->
|
|
214 |
<mx:zip basedir="${go.dir}">
|
|
215 |
<!-- LICENSE and NOTICE -->
|
|
216 |
<fileset dir="${basedir}" >
|
7c643b
|
217 |
<include name="LICENSE" />
|
JM |
218 |
<include name="NOTICE" />
|
93d506
|
219 |
</fileset>
|
dbf594
|
220 |
<!-- Windows distrib files -->
|
f6b200
|
221 |
<zipfileset dir="${project.distrib.dir}/win" />
|
dbf594
|
222 |
<!-- Gitblit Authority data -->
|
JM |
223 |
<zipfileset dir="${project.distrib.dir}/data/certs" prefix="data/certs" />
|
f6b200
|
224 |
<!-- include all dependencies -->
|
JM |
225 |
<dependencies prefix="ext" />
|
|
226 |
</mx:zip>
|
5fe7df
|
227 |
|
f6b200
|
228 |
<!-- Create GO Linux/OSX tar.gz deployment -->
|
JM |
229 |
<mx:tar basedir="${go.dir}" longfile="gnu" compression="gzip">
|
|
230 |
<!-- LICENSE and NOTICE -->
|
|
231 |
<fileset dir="${basedir}" >
|
|
232 |
<include name="LICENSE" />
|
|
233 |
<include name="NOTICE" />
|
9be337
|
234 |
</fileset>
|
dbf594
|
235 |
<!-- Linux/OSX distrib files -->
|
f6b200
|
236 |
<tarfileset dir="${project.distrib.dir}/linux" filemode="755" />
|
dbf594
|
237 |
<!-- Gitblit Authority data -->
|
JM |
238 |
<zipfileset dir="${project.distrib.dir}/data/certs" prefix="data/certs" />
|
f6b200
|
239 |
<!-- include all dependencies -->
|
JM |
240 |
<dependencies prefix="ext" />
|
|
241 |
</mx:tar>
|
85c2e6
|
242 |
|
JM |
243 |
</target>
|
|
244 |
|
|
245 |
|
|
246 |
<!--
|
|
247 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
248 |
Build Gitblit WAR
|
|
249 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
250 |
-->
|
|
251 |
<target name="buildWAR" depends="compile" description="Build Gitblit WAR">
|
|
252 |
|
f6b200
|
253 |
<echo>Building Gitblit WAR ${project.version}</echo>
|
85c2e6
|
254 |
|
f6b200
|
255 |
<local name="war.dir" />
|
JM |
256 |
<property name="war.dir" value="${project.outputDirectory}/war" />
|
|
257 |
<delete dir="${war.dir}" />
|
85c2e6
|
258 |
|
f6b200
|
259 |
<local name="webinf" />
|
JM |
260 |
<property name="webinf" value="${war.dir}/WEB-INF" />
|
fa54be
|
261 |
|
f6b200
|
262 |
<!-- Generate the docs for the WAR build -->
|
JM |
263 |
<generateDocs toDir="${webinf}/docs" />
|
93d506
|
264 |
|
f6b200
|
265 |
<!-- Prepare the data directory -->
|
JM |
266 |
<prepareDataDirectory toDir="${webinf}/data" />
|
fa54be
|
267 |
|
f6b200
|
268 |
<!-- Build the WAR web.xml from the prototype web.xml -->
|
JM |
269 |
<mx:webxml sourcefile="${project.src.dir}/WEB-INF/web.xml" destfile="${webinf}/web.xml" />
|
85c2e6
|
270 |
|
b9afce
|
271 |
<!-- Gitblit jar -->
|
JM |
272 |
<mx:genjar destfile="${webinf}/lib/gitblit.jar" includeresources="false" excludeclasspathjars="true">
|
|
273 |
<!-- Specify all web.xml servlets and filters -->
|
|
274 |
<class name="com.gitblit.GitBlit" />
|
|
275 |
<class name="com.gitblit.DownloadZipFilter" />
|
|
276 |
<class name="com.gitblit.DownloadZipServlet" />
|
|
277 |
<class name="com.gitblit.EnforceAuthenticationFilter" />
|
|
278 |
<class name="com.gitblit.FederationServlet" />
|
|
279 |
<class name="com.gitblit.GitFilter" />
|
e32979
|
280 |
<class name="com.gitblit.git.GitServlet" />
|
b9afce
|
281 |
<class name="com.gitblit.PagesFilter" />
|
JM |
282 |
<class name="com.gitblit.PagesServlet" />
|
|
283 |
<class name="com.gitblit.RobotsTxtServlet" />
|
|
284 |
<class name="com.gitblit.RpcFilter" />
|
|
285 |
<class name="com.gitblit.RpcServlet" />
|
|
286 |
<class name="com.gitblit.SyndicationFilter" />
|
|
287 |
<class name="com.gitblit.SyndicationServlet" />
|
|
288 |
<class name="com.gitblit.wicket.GitBlitWebApp" />
|
|
289 |
</mx:genjar>
|
|
290 |
|
85c2e6
|
291 |
<!-- Build the WAR file -->
|
f6b200
|
292 |
<mx:zip basedir="${war.dir}" destfile="${project.targetDirectory}/${distribution.warfile}" compress="true" >
|
JM |
293 |
<!-- Resources in root -->
|
6534b7
|
294 |
<fileset dir="${project.resources.dir}">
|
LM |
295 |
<exclude name="thumbs.db" />
|
f6b200
|
296 |
<exclude name="*.mkd" />
|
6534b7
|
297 |
</fileset>
|
f6b200
|
298 |
<!-- WEB-INF directory -->
|
JM |
299 |
<zipfileset prefix="WEB-INF" dir="${basedir}" >
|
|
300 |
<include name="LICENSE" />
|
|
301 |
<include name="NOTICE" />
|
|
302 |
</zipfileset>
|
d9c9fe
|
303 |
<zipfileset prefix="WEB-INF" file="${project.compileOutputDirectory}/WEB-INF/weblogic.xml" />
|
f6b200
|
304 |
<!-- include "war" tagged dependencies -->
|
JM |
305 |
<dependencies prefix="WEB-INF/lib" tag="war" />
|
|
306 |
</mx:zip>
|
85f639
|
307 |
</target>
|
LM |
308 |
|
|
309 |
|
f6740d
|
310 |
<!--
|
JM |
311 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
312 |
Build the stand-alone, command-line Gitblit Federation Client
|
|
313 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
314 |
-->
|
|
315 |
<target name="buildFederationClient" depends="compile" description="Builds the stand-alone Gitblit federation client">
|
f6b200
|
316 |
<echo>Building Gitblit Federation Client ${project.version}</echo>
|
f6740d
|
317 |
|
f6b200
|
318 |
<!-- generate jar by traversing the class hierarchy of the specified
|
JM |
319 |
classes, exclude any classes in classpath jars -->
|
b9afce
|
320 |
<mx:genjar tag="" includeresources="false" excludeClasspathJars="true"
|
f6b200
|
321 |
destfile="${project.targetDirectory}/fedclient.jar">
|
JM |
322 |
<mainclass name="com.gitblit.FederationClient" />
|
|
323 |
<launcher paths="ext" />
|
|
324 |
<resource file="${project.compileOutputDirectory}/log4j.properties" />
|
|
325 |
</mx:genjar>
|
f6740d
|
326 |
|
JM |
327 |
<!-- Build the federation client zip file -->
|
f6b200
|
328 |
<mx:zip destfile="${project.targetDirectory}/${fedclient.zipfile}">
|
f6740d
|
329 |
<fileset dir="${basedir}">
|
d65f71
|
330 |
<include name="LICENSE" />
|
JM |
331 |
<include name="NOTICE" />
|
93d506
|
332 |
</fileset>
|
f6b200
|
333 |
<fileset dir="${project.targetDirectory}">
|
93d506
|
334 |
<include name="fedclient.jar" />
|
f6740d
|
335 |
</fileset>
|
f6b200
|
336 |
<fileset dir="${project.distrib.dir}">
|
773bb6
|
337 |
<include name="federation.properties" />
|
f6740d
|
338 |
</fileset>
|
f6b200
|
339 |
<!-- include "fedclient" tagged dependencies -->
|
JM |
340 |
<dependencies prefix="ext" tag="fedclient" />
|
|
341 |
</mx:zip>
|
93d506
|
342 |
|
JM |
343 |
<!-- Cleanup -->
|
f6b200
|
344 |
<delete file="${project.targetDirectory}/fedclient.jar" />
|
JM |
345 |
|
f6740d
|
346 |
</target>
|
JM |
347 |
|
841651
|
348 |
|
JM |
349 |
<!--
|
|
350 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
f6b200
|
351 |
Build a Gitblit filesystem for deployment to RedHat OpenShift Express
|
b774de
|
352 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
353 |
-->
|
9be337
|
354 |
<target name="buildExpress" depends="compile" description="Build exploded WAR file suitable for deployment to OpenShift Express">
|
f6b200
|
355 |
<echo>Building Gitblit Express for RedHat OpenShift ${project.version}</echo>
|
b774de
|
356 |
|
f6b200
|
357 |
<local name="express.dir" />
|
JM |
358 |
<property name="express.dir" value="${project.outputDirectory}/express" />
|
|
359 |
<delete dir="${express.dir}" />
|
b774de
|
360 |
|
JM |
361 |
<!-- Create the OpenShift filesystem -->
|
f6b200
|
362 |
<local name="deployments.root" />
|
JM |
363 |
<property name="deployments.root" value="${express.dir}/deployments/ROOT.war"/>
|
b774de
|
364 |
<mkdir dir="${deployments.root}" />
|
f6b200
|
365 |
<touch file="${express.dir}/deployments/ROOT.war.dodeploy" />
|
b774de
|
366 |
|
f6b200
|
367 |
<local name="webinf" />
|
JM |
368 |
<property name="webinf" value="${deployments.root}/WEB-INF" />
|
b774de
|
369 |
|
f6b200
|
370 |
<!-- Prepare the data directory -->
|
JM |
371 |
<prepareDataDirectory toDir="${webinf}/data" />
|
93d506
|
372 |
|
f6b200
|
373 |
<!-- Build the Express web.xml from the prototype web.xml and gitblit.properties -->
|
b774de
|
374 |
<!-- THIS FILE IS NOT OVERRIDDEN ONCE IT IS BUILT!!! -->
|
f6b200
|
375 |
<mx:webxml sourcefile="${project.src.dir}/WEB-INF/web.xml" destfile="${webinf}/web.xml"
|
JM |
376 |
propertiesFile="${project.distrib.dir}/data/gitblit.properties"
|
|
377 |
skip="server.*" />
|
b774de
|
378 |
|
JM |
379 |
<!-- Gitblit classes -->
|
b9afce
|
380 |
<mx:genjar destfile="${webinf}/lib/gitblit.jar" includeresources="false" excludeclasspathjars="true">
|
5a7680
|
381 |
<!-- Specify all web.xml servlets and filters -->
|
JM |
382 |
<class name="com.gitblit.GitBlit" />
|
|
383 |
<class name="com.gitblit.DownloadZipFilter" />
|
|
384 |
<class name="com.gitblit.DownloadZipServlet" />
|
|
385 |
<class name="com.gitblit.EnforceAuthenticationFilter" />
|
|
386 |
<class name="com.gitblit.FederationServlet" />
|
|
387 |
<class name="com.gitblit.GitFilter" />
|
e32979
|
388 |
<class name="com.gitblit.git.GitServlet" />
|
5a7680
|
389 |
<class name="com.gitblit.PagesFilter" />
|
JM |
390 |
<class name="com.gitblit.PagesServlet" />
|
|
391 |
<class name="com.gitblit.RobotsTxtServlet" />
|
|
392 |
<class name="com.gitblit.RpcFilter" />
|
|
393 |
<class name="com.gitblit.RpcServlet" />
|
|
394 |
<class name="com.gitblit.SyndicationFilter" />
|
|
395 |
<class name="com.gitblit.SyndicationServlet" />
|
|
396 |
<class name="com.gitblit.wicket.GitBlitWebApp" />
|
|
397 |
</mx:genjar>
|
b774de
|
398 |
|
JM |
399 |
<!-- Build Express Zip file -->
|
f6b200
|
400 |
<mx:zip basedir="${express.dir}" destfile="${project.targetDirectory}/${express.zipfile}">
|
JM |
401 |
<fileset dir="${basedir}">
|
|
402 |
<include name="LICENSE" />
|
|
403 |
<include name="NOTICE" />
|
|
404 |
</fileset>
|
|
405 |
<!-- README -->
|
|
406 |
<zipfileset fullpath="README.gitblit" file="${project.siteSourceDirectory}/openshift.mkd" />
|
|
407 |
<!-- resources -->
|
|
408 |
<zipfileset prefix="deployments/ROOT.war" dir="${project.resources.dir}">
|
|
409 |
<exclude name="thumbs.db" />
|
|
410 |
<exclude name="*.mkd" />
|
|
411 |
</zipfileset>
|
|
412 |
<!-- include "war" tagged dependencies -->
|
|
413 |
<dependencies prefix="deployments/ROOT.war/WEB-INF/lib" tag="war" />
|
|
414 |
</mx:zip>
|
b774de
|
415 |
|
JM |
416 |
</target>
|
|
417 |
|
|
418 |
|
|
419 |
<!--
|
|
420 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
a7a9f7
|
421 |
Build the stand-alone, Gitblit Manager
|
841651
|
422 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
423 |
-->
|
a7a9f7
|
424 |
<target name="buildManager" depends="compile" description="Builds the stand-alone Gitblit Manager">
|
f6b200
|
425 |
<echo>Building Gitblit Manager ${project.version}</echo>
|
b774de
|
426 |
|
f6b200
|
427 |
<!-- generate jar by traversing the class hierarchy of the specified
|
JM |
428 |
classes, exclude any classes in classpath jars -->
|
b9afce
|
429 |
<mx:genjar tag="" includeResources="false" excludeClasspathJars="true"
|
f6b200
|
430 |
destfile="${project.targetDirectory}/manager.jar">
|
JM |
431 |
<resource file="${project.src.dir}/com/gitblit/client/splash.png" />
|
|
432 |
<resource file="${project.resources.dir}/gitblt-favicon.png" />
|
|
433 |
<resource file="${project.resources.dir}/gitweb-favicon.png" />
|
|
434 |
<resource file="${project.resources.dir}/git-orange-16x16.png" />
|
|
435 |
<resource file="${project.resources.dir}/user_16x16.png" />
|
|
436 |
<resource file="${project.resources.dir}/users_16x16.png" />
|
|
437 |
<resource file="${project.resources.dir}/settings_16x16.png" />
|
|
438 |
<resource file="${project.resources.dir}/lock_go_16x16.png" />
|
|
439 |
<resource file="${project.resources.dir}/lock_pull_16x16.png" />
|
|
440 |
<resource file="${project.resources.dir}/shield_16x16.png" />
|
|
441 |
<resource file="${project.resources.dir}/federated_16x16.png" />
|
|
442 |
<resource file="${project.resources.dir}/cold_16x16.png" />
|
|
443 |
<resource file="${project.resources.dir}/book_16x16.png" />
|
|
444 |
<resource file="${project.resources.dir}/bug_16x16.png" />
|
|
445 |
<resource file="${project.resources.dir}/health_16x16.png" />
|
|
446 |
<resource file="${project.resources.dir}/feed_16x16.png" />
|
|
447 |
<resource file="${project.resources.dir}/bullet_feed.png" />
|
|
448 |
<resource file="${project.resources.dir}/search-icon.png" />
|
|
449 |
<resource file="${project.resources.dir}/commit_changes_16x16.png" />
|
|
450 |
<resource file="${project.resources.dir}/commit_merge_16x16.png" />
|
|
451 |
<resource file="${project.resources.dir}/commit_divide_16x16.png" />
|
|
452 |
<resource file="${project.resources.dir}/star_16x16.png" />
|
|
453 |
<resource file="${project.resources.dir}/blank.png" />
|
|
454 |
<resource file="${project.src.dir}/log4j.properties" />
|
|
455 |
<resource>
|
|
456 |
<!-- inlcude all translations -->
|
|
457 |
<fileset dir="${project.src.dir}/com/gitblit/wicket">
|
|
458 |
<include name="*.properties" />
|
|
459 |
</fileset>
|
|
460 |
</resource>
|
b774de
|
461 |
|
f6b200
|
462 |
<mainclass name="com.gitblit.client.GitblitManagerLauncher" />
|
841651
|
463 |
<manifest>
|
JM |
464 |
<attribute name="SplashScreen-Image" value="splash.png" />
|
|
465 |
</manifest>
|
f6b200
|
466 |
</mx:genjar>
|
b774de
|
467 |
|
d65f71
|
468 |
<!-- Build Manager Zip file -->
|
f6b200
|
469 |
<mx:zip destfile="${project.targetDirectory}/${manager.zipfile}">
|
d65f71
|
470 |
<fileset dir="${basedir}">
|
JM |
471 |
<include name="LICENSE" />
|
|
472 |
<include name="NOTICE" />
|
|
473 |
</fileset>
|
f6b200
|
474 |
<fileset dir="${project.targetDirectory}">
|
JM |
475 |
<include name="manager.jar" />
|
93d506
|
476 |
</fileset>
|
f6b200
|
477 |
<!-- include "manager" tagged dependencies -->
|
JM |
478 |
<dependencies prefix="ext" tag="manager" />
|
|
479 |
</mx:zip>
|
93d506
|
480 |
|
JM |
481 |
<!-- Cleanup -->
|
f6b200
|
482 |
<delete file="${project.targetDirectory}/manager.jar" />
|
841651
|
483 |
</target>
|
773bb6
|
484 |
|
4ad1eb
|
485 |
|
773bb6
|
486 |
<!--
|
4ad1eb
|
487 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
488 |
Build the stand-alone, Gitblit Authority
|
|
489 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
490 |
-->
|
|
491 |
<target name="buildAuthority" depends="compile" description="Builds the stand-alone Gitblit Authority">
|
f6b200
|
492 |
<echo>Building Gitblit Authority ${project.version}</echo>
|
4ad1eb
|
493 |
|
f6b200
|
494 |
<!-- generate jar by traversing the class hierarchy of the specified
|
JM |
495 |
classes, exclude any classes in "authority" classpath jars -->
|
|
496 |
<mx:genjar tag="authority" excludeClasspathJars="true"
|
|
497 |
destfile="${project.targetDirectory}/authority.jar">
|
|
498 |
<resource file="${project.src.dir}/com/gitblit/client/splash.png" />
|
|
499 |
<resource file="${project.resources.dir}/gitblt-favicon.png" />
|
|
500 |
<resource file="${project.resources.dir}/user_16x16.png" />
|
|
501 |
<resource file="${project.resources.dir}/users_16x16.png" />
|
|
502 |
<resource file="${project.resources.dir}/rosette_16x16.png" />
|
|
503 |
<resource file="${project.resources.dir}/rosette_32x32.png" />
|
|
504 |
<resource file="${project.resources.dir}/vcard_16x16.png" />
|
|
505 |
<resource file="${project.resources.dir}/settings_16x16.png" />
|
|
506 |
<resource file="${project.resources.dir}/settings_32x32.png" />
|
|
507 |
<resource file="${project.resources.dir}/search-icon.png" />
|
|
508 |
<resource file="${project.resources.dir}/mail_16x16.png" />
|
|
509 |
<resource file="${project.resources.dir}/script_16x16.png" />
|
|
510 |
<resource file="${project.resources.dir}/blank.png" />
|
|
511 |
<resource file="${project.resources.dir}/bullet_green.png" />
|
|
512 |
<resource file="${project.resources.dir}/bullet_orange.png" />
|
|
513 |
<resource file="${project.resources.dir}/bullet_red.png" />
|
|
514 |
<resource file="${project.resources.dir}/bullet_white.png" />
|
|
515 |
<resource file="${project.resources.dir}/bullet_delete.png" />
|
|
516 |
<resource file="${project.resources.dir}/bullet_key.png" />
|
|
517 |
<resource file="${project.src.dir}/log4j.properties" />
|
|
518 |
<resource>
|
|
519 |
<!-- inlcude all translations -->
|
|
520 |
<fileset dir="${project.src.dir}/com/gitblit/wicket">
|
|
521 |
<include name="*.properties" />
|
|
522 |
</fileset>
|
|
523 |
</resource>
|
4ad1eb
|
524 |
|
f6b200
|
525 |
<mainclass name="com.gitblit.authority.Launcher" />
|
4ad1eb
|
526 |
<manifest>
|
JM |
527 |
<attribute name="SplashScreen-Image" value="splash.png" />
|
|
528 |
</manifest>
|
f6b200
|
529 |
</mx:genjar>
|
4ad1eb
|
530 |
|
JM |
531 |
<!-- Build Authority Zip file -->
|
f6b200
|
532 |
<mx:zip destfile="${project.targetDirectory}/${authority.zipfile}">
|
4ad1eb
|
533 |
<fileset dir="${basedir}">
|
JM |
534 |
<include name="LICENSE" />
|
|
535 |
<include name="NOTICE" />
|
|
536 |
</fileset>
|
f6b200
|
537 |
<fileset dir="${project.targetDirectory}">
|
JM |
538 |
<include name="authority.jar" />
|
93d506
|
539 |
</fileset>
|
f6b200
|
540 |
<zipfileset dir="${project.distrib.dir}/data" prefix="data">
|
JM |
541 |
<include name="users.conf" />
|
|
542 |
<include name="gitblit.properties" />
|
|
543 |
</zipfileset>
|
dbf594
|
544 |
<!-- Gitblit Authority data -->
|
JM |
545 |
<zipfileset dir="${project.distrib.dir}/data/certs" prefix="data/certs" />
|
f6b200
|
546 |
<!-- include "authority" tagged dependencies -->
|
JM |
547 |
<dependencies prefix="ext" tag="authority" />
|
|
548 |
</mx:zip>
|
|
549 |
|
|
550 |
<!-- Cleanup -->
|
|
551 |
<delete file="${project.targetDirectory}/authority.jar" />
|
4ad1eb
|
552 |
</target>
|
JM |
553 |
|
|
554 |
<!--
|
|
555 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
556 |
Build the Gitblit API client library
|
|
557 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
558 |
-->
|
|
559 |
<target name="buildApiLibrary" depends="compile" description="Builds the Gitblit RPC client library">
|
f6b200
|
560 |
<echo>Building Gitblit API Library ${project.version}</echo>
|
4ad1eb
|
561 |
|
f6b200
|
562 |
<local name="javadoc.dir" />
|
JM |
563 |
<property name="javadoc.dir" value="${project.outputDirectory}/javadoc" />
|
|
564 |
<delete dir="${javadoc.dir}" />
|
|
565 |
|
4ad1eb
|
566 |
<!-- Build API Library jar -->
|
b9afce
|
567 |
<mx:genjar tag="" includeResources="false" excludeClasspathJars="true"
|
f6b200
|
568 |
destfile="${project.targetDirectory}/gbapi-${project.version}.jar">
|
4ad1eb
|
569 |
<class name="com.gitblit.Keys" />
|
JM |
570 |
<class name="com.gitblit.client.GitblitClient" />
|
4bef08
|
571 |
<class name="com.gitblit.models.FederationModel" />
|
JM |
572 |
<class name="com.gitblit.models.FederationProposal" />
|
|
573 |
<class name="com.gitblit.models.FederationSet" />
|
f6b200
|
574 |
</mx:genjar>
|
773bb6
|
575 |
|
4ad1eb
|
576 |
<!-- Build API sources jar -->
|
f6b200
|
577 |
<zip destfile="${project.targetDirectory}/gbapi-${project.version}-sources.jar">
|
JM |
578 |
<fileset dir="${project.src.dir}" defaultexcludes="yes">
|
4ad1eb
|
579 |
<include name="com/gitblit/Constants.java"/>
|
JM |
580 |
<include name="com/gitblit/GitBlitException.java"/>
|
|
581 |
<include name="com/gitblit/Keys.java"/>
|
|
582 |
<include name="com/gitblit/client/**/*.java"/>
|
|
583 |
<include name="com/gitblit/models/**/*.java"/>
|
|
584 |
<include name="com/gitblit/utils/**/*.java"/>
|
|
585 |
</fileset>
|
|
586 |
</zip>
|
|
587 |
|
|
588 |
<!-- Build API JavaDoc jar -->
|
f6b200
|
589 |
<mx:javadoc destdir="${javadoc.dir}" redirect="true">
|
JM |
590 |
<fileset dir="${project.src.dir}" defaultexcludes="yes">
|
4ad1eb
|
591 |
<include name="com/gitblit/Constants.java"/>
|
JM |
592 |
<include name="com/gitblit/GitBlitException.java"/>
|
|
593 |
<include name="com/gitblit/Keys.java"/>
|
|
594 |
<include name="com/gitblit/client/**/*.java"/>
|
|
595 |
<include name="com/gitblit/models/**/*.java"/>
|
|
596 |
<include name="com/gitblit/utils/**/*.java"/>
|
|
597 |
</fileset>
|
f6b200
|
598 |
</mx:javadoc>
|
JM |
599 |
|
|
600 |
<zip destfile="${project.targetDirectory}/gbapi-${project.version}-javadoc.jar">
|
|
601 |
<fileset dir="${javadoc.dir}" />
|
4ad1eb
|
602 |
</zip>
|
JM |
603 |
|
|
604 |
<!-- Build the API library zip file -->
|
f6b200
|
605 |
<mx:zip destfile="${project.targetDirectory}/${gbapi.zipfile}">
|
4ad1eb
|
606 |
<fileset dir="${basedir}">
|
93d506
|
607 |
<include name="LICENSE" />
|
JM |
608 |
<include name="NOTICE" />
|
|
609 |
</fileset>
|
f6b200
|
610 |
<fileset dir="${project.targetDirectory}">
|
JM |
611 |
<include name="gbapi-${project.version}.jar" />
|
|
612 |
<include name="gbapi-${project.version}-sources.jar" />
|
|
613 |
<include name="gbapi-${project.version}-javadoc.jar" />
|
4ad1eb
|
614 |
</fileset>
|
f6b200
|
615 |
<!-- include "api" tagged dependencies -->
|
JM |
616 |
<dependencies prefix="ext" tag="api" />
|
|
617 |
</mx:zip>
|
93d506
|
618 |
|
JM |
619 |
<!-- Cleanup -->
|
|
620 |
<delete>
|
f6b200
|
621 |
<fileset dir="${project.targetDirectory}">
|
93d506
|
622 |
<include name="javadoc/**" />
|
f6b200
|
623 |
<include name="gbapi-${project.version}.jar" />
|
JM |
624 |
<include name="gbapi-${project.version}-sources.jar" />
|
|
625 |
<include name="gbapi-${project.version}-javadoc.jar" />
|
93d506
|
626 |
</fileset>
|
JM |
627 |
</delete>
|
4ad1eb
|
628 |
</target>
|
841651
|
629 |
|
f6740d
|
630 |
|
85c2e6
|
631 |
<!--
|
JM |
632 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
633 |
Build the Gitblit Website
|
|
634 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
635 |
-->
|
f6b200
|
636 |
<target name="buildSite" depends="prepare" description="Build the Gitblit website">
|
85c2e6
|
637 |
|
f6b200
|
638 |
<echo>Building Gitblit Website ${project.version}</echo>
|
JM |
639 |
|
|
640 |
<property name="releaselog" value="${basedir}/releases.moxie" />
|
85c2e6
|
641 |
|
dd7961
|
642 |
<!-- Build Site -->
|
f6b200
|
643 |
<mx:doc googleplusid="114464678392593421684" googleanalyticsid="UA-24377072-1"
|
JM |
644 |
googlePlusOne="true" minify="true" customless="custom.less">
|
|
645 |
<structure>
|
|
646 |
<menu name="about">
|
|
647 |
<page name="overview" src="siteindex.mkd" out="index.html" headerLinks="false" />
|
|
648 |
<page name="features" src="features.mkd" />
|
|
649 |
<page name="screenshots" src="screenshots.mkd" />
|
|
650 |
</menu>
|
|
651 |
<menu name="documentation">
|
|
652 |
<page name="setup" src="setup.mkd" />
|
|
653 |
<page name="federation" src="federation.mkd" />
|
|
654 |
<divider />
|
|
655 |
<page name="settings" src="properties.mkd" />
|
|
656 |
<page name="faq" src="faq.mkd" />
|
|
657 |
<divider />
|
|
658 |
<page name="design" src="design.mkd" />
|
|
659 |
<page name="rpc" src="rpc.mkd" />
|
|
660 |
</menu>
|
|
661 |
|
|
662 |
<menu name="releases">
|
|
663 |
<page name="release notes" out="releasenotes.html">
|
|
664 |
<template src="releasecurrent.ftl" data="${releaselog}" />
|
|
665 |
</page>
|
|
666 |
<page name="release history" out="releases.html">
|
|
667 |
<template src="releasehistory.ftl" data="${releaselog}" />
|
|
668 |
</page>
|
|
669 |
<divider />
|
|
670 |
<page name="roadmap" src="roadmap.mkd" />
|
|
671 |
</menu>
|
|
672 |
|
|
673 |
<menu name="downloads">
|
|
674 |
<link name="Gitblit GO (Windows)" src="${gc.url}gitblit-${project.releaseVersion}.zip" />
|
|
675 |
<link name="Gitblit GO (Linux/OSX)" src="${gc.url}gitblit-${project.releaseVersion}.tar.gz" />
|
|
676 |
<link name="Gitblit WAR" src="${gc.url}gitblit-${project.releaseVersion}.war" />
|
|
677 |
<link name="Gitblit Express" src="${gc.url}express-${project.releaseVersion}.zip" />
|
|
678 |
<divider />
|
|
679 |
<link name="Gitblit Manager" src="${gc.url}manager-${project.releaseVersion}.zip" />
|
|
680 |
<link name="Federation Client" src="${gc.url}fedclient-${project.releaseVersion}.zip" />
|
|
681 |
<divider />
|
|
682 |
<link name="API Library" src="${gc.url}gbapi-${project.releaseVersion}.zip" />
|
|
683 |
</menu>
|
|
684 |
|
|
685 |
<menu name="links">
|
|
686 |
<link name="Demo" src="https://demo-gitblit.rhcloud.com" />
|
|
687 |
<divider />
|
|
688 |
<link name="Github" src="${project.scmUrl}" />
|
|
689 |
<link name="Issues" src="${project.issuesUrl}" />
|
|
690 |
<link name="Discussion" src="${project.forumUrl}" />
|
|
691 |
<link name="Google+" src="${project.socialNetworkUrl}" />
|
|
692 |
<link name="Ohloh" src="http://www.ohloh.net/p/gitblit" />
|
|
693 |
</menu>
|
|
694 |
<divider />
|
|
695 |
</structure>
|
|
696 |
|
|
697 |
<replace token="%GCURL%" value="${gc.url}" />
|
|
698 |
|
|
699 |
<properties token="%PROPERTIES%" file="${project.distrib.dir}/data/gitblit.properties" />
|
|
700 |
|
|
701 |
<regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>" />
|
|
702 |
|
|
703 |
<!-- Set the logo from the mx:doc resources -->
|
|
704 |
<logo file="${project.resources.dir}/gitblt_25_white.png" />
|
|
705 |
<favicon file="${project.resources.dir}/gitblt-favicon.png" />
|
|
706 |
|
|
707 |
<resource>
|
|
708 |
<fileset dir="${project.resources.dir}">
|
|
709 |
<include name="lock_go_16x16.png" />
|
|
710 |
<include name="lock_pull_16x16.png" />
|
|
711 |
<include name="shield_16x16.png" />
|
|
712 |
<include name="cold_16x16.png" />
|
|
713 |
<include name="bug_16x16.png" />
|
|
714 |
<include name="book_16x16.png" />
|
|
715 |
<include name="blank.png" />
|
|
716 |
<include name="federated_16x16.png" />
|
|
717 |
<include name="arrow_page.png" />
|
|
718 |
</fileset>
|
|
719 |
</resource>
|
|
720 |
</mx:doc>
|
a4d249
|
721 |
|
f90dc6
|
722 |
<!-- Copy Fancybox -->
|
f6b200
|
723 |
<mkdir dir="${project.siteTargetDirectory}/fancybox" />
|
JM |
724 |
<copy todir="${project.siteTargetDirectory}/fancybox">
|
|
725 |
<fileset dir="${project.siteSourceDirectory}/fancybox">
|
230632
|
726 |
<exclude name="thumbs.db" />
|
JM |
727 |
</fileset>
|
|
728 |
</copy>
|
|
729 |
|
24d08f
|
730 |
<!-- Generate thumbnails of screenshots -->
|
f6b200
|
731 |
<mx:thumbs input="png" output="png" maximumDimension="250"
|
JM |
732 |
sourceDir="${project.siteSourceDirectory}/screenshots"
|
|
733 |
destDir="${project.siteTargetDirectory}/thumbs" />
|
a4d249
|
734 |
|
f90dc6
|
735 |
<!-- Copy screenshots -->
|
f6b200
|
736 |
<mkdir dir="${project.siteTargetDirectory}/screenshots" />
|
JM |
737 |
<copy todir="${project.siteTargetDirectory}/screenshots">
|
|
738 |
<fileset dir="${project.siteSourceDirectory}/screenshots">
|
f90dc6
|
739 |
<include name="*.png" />
|
JM |
740 |
</fileset>
|
|
741 |
</copy>
|
|
742 |
|
85c2e6
|
743 |
</target>
|
b774de
|
744 |
|
424fe1
|
745 |
|
85c2e6
|
746 |
<!--
|
JM |
747 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
f6b200
|
748 |
Build all binaries and site
|
85c2e6
|
749 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
JM |
750 |
-->
|
f6b200
|
751 |
<target name="buildAll" depends="buildAuthority,buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary,buildSite" />
|
b774de
|
752 |
|
746aaf
|
753 |
|
JM |
754 |
<!--
|
|
755 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
756 |
Update the gh-pages branch with the current site
|
|
757 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
758 |
-->
|
|
759 |
<target name="updateGhPages" depends="buildSite">
|
|
760 |
<!-- Build gh-pages branch -->
|
f6b200
|
761 |
<mx:ghpages repositorydir="${basedir}" obliterate="true" />
|
746aaf
|
762 |
</target>
|
JM |
763 |
|
b774de
|
764 |
|
85c2e6
|
765 |
<!--
|
JM |
766 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
767 |
Publish binaries to Google Code
|
|
768 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
769 |
-->
|
f6b200
|
770 |
<target name="publishBinaries" depends="clean,buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary" description="Publish the Gitblit binaries to Google Code">
|
b774de
|
771 |
|
f6b200
|
772 |
<echo>Uploading Gitblit ${project.version} binaries</echo>
|
b774de
|
773 |
|
f6b200
|
774 |
<!-- Upload Gitblit GO Windows ZIP file -->
|
JM |
775 |
<mx:gcupload
|
|
776 |
sourceFile="${distribution.zipfile}"
|
|
777 |
targetFile="gitblit-${project.version}.zip"
|
|
778 |
description="Gitblit GO v${project.version} (standalone, integrated Gitblit server for Windows)" />
|
|
779 |
|
|
780 |
<!-- Upload Gitblit GO Linux/Unix tar.gz file -->
|
|
781 |
<mx:gcupload
|
|
782 |
sourceFile="${distribution.tgzfile}"
|
|
783 |
targetFile="gitblit-${project.version}.tar.gz"
|
|
784 |
description="Gitblit GO v${project.version} (standalone, integrated Gitblit server for Linux/Unix)" />
|
b774de
|
785 |
|
773bb6
|
786 |
<!-- Upload Gitblit WAR file -->
|
f6b200
|
787 |
<mx:gcupload
|
JM |
788 |
sourceFile="${distribution.warfile}"
|
|
789 |
targetFile="gitblit-${project.version}.war"
|
|
790 |
description="Gitblit WAR v${project.version} (standard WAR webapp for servlet containers)" />
|
b774de
|
791 |
|
773bb6
|
792 |
<!-- Upload Gitblit FedClient -->
|
f6b200
|
793 |
<mx:gcupload
|
JM |
794 |
sourceFile="${fedclient.zipfile}"
|
|
795 |
targetFile="fedclient-${project.version}.zip"
|
|
796 |
description="Gitblit Federation Client v${project.version} (command-line tool to clone data from federated Gitblit instances)" />
|
841651
|
797 |
|
773bb6
|
798 |
<!-- Upload Gitblit Manager -->
|
f6b200
|
799 |
<mx:gcupload
|
JM |
800 |
sourceFile="${manager.zipfile}"
|
|
801 |
targetFile="manager-${project.version}.zip"
|
|
802 |
description="Gitblit Manager v${project.version} (Swing tool to remotely administer a Gitblit server)" />
|
4ad1eb
|
803 |
|
773bb6
|
804 |
<!-- Upload Gitblit API Library -->
|
f6b200
|
805 |
<mx:gcupload
|
JM |
806 |
sourceFile="${gbapi.zipfile}"
|
|
807 |
targetFile="gbapi-${project.version}.zip"
|
|
808 |
description="Gitblit API Library v${project.version} (JSON RPC library to integrate with your software)" />
|
b774de
|
809 |
|
JM |
810 |
<!-- Upload Gitblit Express for RedHat OpenShift -->
|
f6b200
|
811 |
<mx:gcupload
|
JM |
812 |
sourceFile="${express.zipfile}"
|
|
813 |
targetFile="express-${project.version}.zip"
|
|
814 |
description="Gitblit Express v${project.version} (run Gitblit on RedHat's OpenShift cloud)" />
|
b774de
|
815 |
|
5450d0
|
816 |
</target>
|
JM |
817 |
|
b774de
|
818 |
|
85c2e6
|
819 |
<!--
|
JM |
820 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
b774de
|
821 |
Publish site to site hosting service
|
85c2e6
|
822 |
You must add ext/commons-net-1.4.0.jar to your ANT classpath.
|
JM |
823 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
824 |
-->
|
f6b200
|
825 |
<target name="publishSite" depends="clean,buildSite,updateGhPages" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)" >
|
b774de
|
826 |
|
f6b200
|
827 |
<echo>Uploading Gitblit ${project.version} website</echo>
|
b774de
|
828 |
|
81f881
|
829 |
<ftp server="${ftp.server}"
|
JM |
830 |
userid="${ftp.user}"
|
|
831 |
password="${ftp.password}"
|
|
832 |
remotedir="${ftp.dir}"
|
|
833 |
passive="true"
|
|
834 |
verbose="yes">
|
f6b200
|
835 |
<fileset dir="${project.siteTargetDirectory}" />
|
81f881
|
836 |
</ftp>
|
JM |
837 |
</target>
|
85c2e6
|
838 |
|
b774de
|
839 |
|
85c2e6
|
840 |
<!--
|
JM |
841 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
842 |
Compile from source, publish binaries, and build & deploy site
|
|
843 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
844 |
-->
|
f6b200
|
845 |
<target name="publishAll" depends="publishBinaries,publishSite" />
|
JM |
846 |
|
|
847 |
|
|
848 |
<!--
|
|
849 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
850 |
Tag a new version and prepare for the next development cycle.
|
|
851 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
852 |
-->
|
|
853 |
<target name="tagRelease" depends="prepare">
|
|
854 |
<!-- release -->
|
|
855 |
<property name="dryrun" value="false" />
|
|
856 |
<mx:version stage="release" dryrun="${dryrun}" />
|
|
857 |
<!-- commit build.moxie & releases.moxie (automatic) -->
|
|
858 |
<mx:commit showtitle="no">
|
|
859 |
<message>Prepare ${project.version} release</message>
|
|
860 |
<tag name="v${project.version}">
|
|
861 |
<message>${project.name} ${project.version} release</message>
|
|
862 |
</tag>
|
|
863 |
</mx:commit>
|
|
864 |
|
|
865 |
<!-- next cycle -->
|
|
866 |
<mx:version stage="snapshot" incrementNumber="incremental" dryrun="${dryrun}" />
|
|
867 |
<mx:commit showtitle="no">
|
|
868 |
<message>Reset build identifiers for next development cycle</message>
|
|
869 |
</mx:commit>
|
85c2e6
|
870 |
</target>
|
f6b200
|
871 |
|
JM |
872 |
|
|
873 |
<!--
|
|
874 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
875 |
Build Gitblit Docs
|
|
876 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
877 |
-->
|
|
878 |
<macrodef name="generateDocs">
|
|
879 |
<attribute name="toDir"/>
|
|
880 |
<sequential>
|
|
881 |
<mx:doc toDir="@{toDir}" minify="true" customless="custom.less">
|
|
882 |
<structure>
|
|
883 |
<menu name="about">
|
|
884 |
<page name="overview" src="siteindex.mkd" out="index.html" headerLinks="false" />
|
|
885 |
<page name="features" src="features.mkd" />
|
|
886 |
</menu>
|
|
887 |
<menu name="documentation">
|
|
888 |
<page name="setup" src="setup.mkd" />
|
|
889 |
<page name="federation" src="federation.mkd" />
|
|
890 |
<divider />
|
|
891 |
<page name="faq" src="faq.mkd" />
|
|
892 |
<page name="settings" src="properties.mkd" />
|
|
893 |
<divider />
|
|
894 |
<page name="design" src="design.mkd" />
|
|
895 |
<page name="rpc" src="rpc.mkd" />
|
|
896 |
</menu>
|
|
897 |
<menu name="changelog">
|
|
898 |
<page name="current release" src="releasecurrent.mkd" />
|
|
899 |
<page name="older releases" src="releasehistory.mkd" />
|
|
900 |
</menu>
|
|
901 |
<menu name="links">
|
|
902 |
<link name="Demo" src="https://demo-gitblit.rhcloud.com" />
|
|
903 |
<divider />
|
|
904 |
<link name="Github" src="${project.scmUrl}" />
|
|
905 |
<link name="Issues" src="${project.issuesUrl}" />
|
|
906 |
<link name="Discussion" src="${project.forumUrl}" />
|
|
907 |
<link name="Google+" src="${project.socialNetworkUrl}" />
|
|
908 |
<link name="Ohloh" src="http://www.ohloh.net/p/gitblit" />
|
|
909 |
</menu>
|
|
910 |
</structure>
|
|
911 |
|
|
912 |
<properties token="%PROPERTIES%" file="${project.distrib.dir}/data/gitblit.properties" />
|
|
913 |
|
|
914 |
<regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>" />
|
|
915 |
|
|
916 |
<!-- Set the logo from the mx:doc resources -->
|
|
917 |
<logo file="${project.resources.dir}/gitblt_25_white.png" />
|
|
918 |
<favicon file="${project.resources.dir}/gitblt-favicon.png" />
|
|
919 |
|
|
920 |
<resource>
|
|
921 |
<fileset dir="${project.resources.dir}">
|
|
922 |
<include name="lock_go_16x16.png" />
|
|
923 |
<include name="lock_pull_16x16.png" />
|
|
924 |
<include name="shield_16x16.png" />
|
|
925 |
<include name="cold_16x16.png" />
|
|
926 |
<include name="bug_16x16.png" />
|
|
927 |
<include name="book_16x16.png" />
|
|
928 |
<include name="blank.png" />
|
|
929 |
<include name="federated_16x16.png" />
|
|
930 |
<include name="arrow_page.png" />
|
|
931 |
</fileset>
|
|
932 |
</resource>
|
|
933 |
</mx:doc>
|
|
934 |
</sequential>
|
|
935 |
</macrodef>
|
|
936 |
|
|
937 |
<!--
|
|
938 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
939 |
Macro to create a pristine data directory for the target build
|
|
940 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
941 |
-->
|
|
942 |
<macrodef name="prepareDataDirectory">
|
|
943 |
<attribute name="toDir"/>
|
|
944 |
<sequential>
|
|
945 |
<mkdir dir="@{toDir}" />
|
|
946 |
<copy todir="@{toDir}" overwrite="false">
|
|
947 |
<fileset dir="${project.distrib.dir}/data">
|
|
948 |
<include name="users.conf" />
|
|
949 |
<include name="projects.conf" />
|
|
950 |
<include name="gitblit.properties" />
|
|
951 |
</fileset>
|
|
952 |
</copy>
|
|
953 |
<mkdir dir="@{toDir}/groovy" />
|
|
954 |
<copy todir="@{toDir}/groovy">
|
|
955 |
<fileset dir="${project.distrib.dir}/data/groovy">
|
|
956 |
<include name="sendmail.groovy" />
|
|
957 |
<include name="sendmail-html.groovy" />
|
|
958 |
<include name="jenkins.groovy" />
|
|
959 |
<include name="protect-refs.groovy" />
|
|
960 |
<include name="fogbugz.groovy" />
|
|
961 |
<include name="thebuggenie.groovy" />
|
|
962 |
</fileset>
|
|
963 |
</copy>
|
|
964 |
</sequential>
|
|
965 |
</macrodef>
|
|
966 |
|
|
967 |
<!--
|
|
968 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
969 |
Macro to upload binaries to GoogleCode
|
|
970 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
971 |
-->
|
|
972 |
<macrodef name="googleUpload">
|
|
973 |
<attribute name="sourceFile"/>
|
|
974 |
<attribute name="targetFile"/>
|
|
975 |
<attribute name="description"/>
|
|
976 |
<sequential>
|
|
977 |
<gcupload
|
|
978 |
username="${googlecode.user}"
|
|
979 |
password="${googlecode.password}"
|
|
980 |
projectname="gitblit"
|
|
981 |
filename="${project.targetDirectory}/@{sourceFile}"
|
|
982 |
targetfilename="@{targetFile}"
|
|
983 |
summary="@{description}"
|
|
984 |
labels="Featured, Type-Package, OpSys-All" />
|
|
985 |
</sequential>
|
|
986 |
</macrodef>
|
|
987 |
|
|
988 |
|
|
989 |
<!--
|
|
990 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
991 |
Install Gitblit JAR for usage as Maven module
|
|
992 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
993 |
-->
|
|
994 |
<target name="installMaven" depends="compile" description="Install Gitblit JAR as Maven module">
|
|
995 |
<local name="project.jar" />
|
|
996 |
<property name="project.jar" value="${project.outputDirectory}/gitblit.jar" />
|
bffa64
|
997 |
<property name="resourceFolderPrefix" value="" /> |
JM |
998 |
<mx:jar destfile="${project.jar}" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" /> |
f6b200
|
999 |
|
JM |
1000 |
<exec executable="mvn">
|
|
1001 |
<arg value="install:install-file" />
|
|
1002 |
<arg value="-Dfile=${project.jar}" />
|
|
1003 |
<arg value="-DpomFile=${basedir}/pom.xml" />
|
|
1004 |
<arg value="-DcreateChecksum=true" />
|
|
1005 |
</exec>
|
|
1006 |
</target>
|
|
1007 |
|
|
1008 |
<!--
|
|
1009 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
1010 |
Upload Gitblit JAR to remote Maven repository
|
|
1011 |
|
|
1012 |
build.properties:
|
|
1013 |
project.maven.repo.url = http://whatever.com/maven2
|
|
1014 |
project.maven.repo.id = whateverId
|
|
1015 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
1016 |
-->
|
|
1017 |
<target name="uploadMaven" depends="compile" description="Upload Gitblit JAR to remote Maven repository">
|
|
1018 |
<local name="project.jar" />
|
|
1019 |
<property name="project.jar" value="${project.outputDirectory}/gitblit.jar" />
|
|
1020 |
<mx:jar destfile="${project.jar}" includeresources="true" />
|
|
1021 |
|
|
1022 |
<exec executable="mvn">
|
|
1023 |
<arg value="deploy:deploy-file" />
|
|
1024 |
<arg value="-Dfile=${project.jar}" />
|
|
1025 |
<arg value="-DpomFile=${basedir}/pom.xml" />
|
|
1026 |
<arg value="-Durl=${project.maven.repo.url}" />
|
|
1027 |
<arg value="-DrepositoryId=${project.maven.repo.id}" />
|
|
1028 |
<arg value="-DcreateChecksum=true" />
|
|
1029 |
</exec>
|
|
1030 |
</target>
|
764d94
|
1031 |
</project>
|