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