source: trunk/doc/development/build.html @ 3156

Last change on this file since 3156 was 3156, checked in by Nicklas Nordborg, 16 years ago

Added info about how to build the docbook documentation.
Clean up files before building documentation.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 7.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--
3  $Id: build.html 3156 2007-03-05 12:47:18Z nicklas $
4
5  Copyright (C) 2005-2006 Jari Häkkinen, Nicklas Nordborg
6
7  This file is part of BASE - BioArray Software Environment.
8  Available at http://base.thep.lu.se/
9
10  BASE is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public License
12  as published by the Free Software Foundation; either version 2
13  of the License, or (at your option) any later version.
14
15  BASE is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  GNU General Public License for more details.
19
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 59 Temple Place - Suite 330,
23  Boston, MA  02111-1307, USA.
24-->
25<html>
26  <head>
27    <title>BASE - Development information</title>
28  <link rel=stylesheet type="text/css" href="../styles.css">
29  </head>
30<body>
31
32<div class="navigation">
33  <a href="../index.html">BASE</a>
34  <img src="../next.gif">
35  <a href="index.html">Development information</a>
36  <img src="../next.gif">
37  Building BASE
38 
39</div>
40
41  <h1>Building BASE</h1>
42
43  <div class="abstract">
44    <p>
45      This documentation describes how to build BASE from a local
46      working copy of the subversion checkout.
47    </p>
48   
49    <b>Contents</b><br>
50    <ol>
51    <li><a href="#checkout">Checking out the source code</a></li>
52    <li><a href="#localconfig">Create a local configuration</a></li>
53    <li><a href="#ant">Ant</a>
54      <ol>
55      <li><a href="#maintargets">Main build targets</a></li>
56      <li><a href="#othertargets">Other build targets</a></li>
57      </ol>
58      </li>
59    <li><a href="#running">Running BASE from the local installation</a></li>
60    </ol>
61   
62    <b>See also</b>
63    <ul>
64    <li><a href="../installation.html">Installation instructions</a></li>
65    </ul>
66   
67    <p class="authors">
68    <b>Last updated:</b> $Date: 2007-03-05 12:47:18 +0000 (Mon, 05 Mar 2007) $
69    </p>
70  </div>
71
72 
73  <a name="checkout">
74  <h2>1. Checking out the source code</h2>
75  </a>
76 
77  <p>
78    The BASE source code lives in a <a href="http://subversion.tigris.org/">Subversion</a>
79    server. It is a versioning system that enables us to keep track of all changes
80    made to the code. You will need a client for subversion to be able to get the
81    source code. If you are using <a href="http://www.eclipse.org/">Eclipse</a>
82    there is an excellent <a href="http://subclipse.tigris.org/">subversion plugin</a>.
83  </p>
84 
85  <p>
86    Check out the source code with the command:
87  </p>
88  <pre class="code">
89svn checkout http://lev.thep.lu.se/repository/base/trunk/ base
90</pre>
91
92  <p>
93    This will create a sub-directory base with all source files. Anonymous checkouts are allowed,
94    but write permission is only granted to developers. The trunk version is the head
95    of the development and should be used for testing purposes only.
96    For information about how to get other version, including specific releases and bugfix
97    branches, read the information on the
98    <a href="http://base.thep.lu.se/wiki/DownloadPage">BASE download page</a>
99    or check the <a href="http://base.thep.lu.se/browser">subversion source repository</a>
100    directly.
101  </p>
102
103  <a name="localconfig">
104  <h2>2. Create a local configuration</h2>
105  </a>
106 
107  <p>
108    The configuration files included with a binary distribution are located
109    in the <code>config/dist</code> directory. You should never modify these files
110    directly for your local setup. Instead, place a copy of files that you need to
111    modify in the <code>config/local</code> directory. When building BASE all targets
112    exception the 'dist' target will first check the local configuration files.
113  </p>
114 
115  <p>
116    Note that the build process usually copies the configuration files to the
117    <code>www/WEB-INF/classes</code> directory. The reason is that Tomcat
118    can't read file outside the <code>WEB-INF</code> directory and this makes
119    the subversion working copy identical to a binary distribution.
120  </p>
121 
122  <ul>
123  <li>
124    All utility programs, such as the installation program and the job agent,
125    read the configuration file from <code>www/WEB-INF/classes</code>.
126  </li>
127 
128  <li>
129    The only exception is the test programs. They will read the configuration from
130    <code>config/local</code> and <code>config/dist</code> directories.
131  </li>
132 
133  <li>
134    <code>ant clean</code> will remove the copied configuration files.
135  </li>
136  </ul>
137 
138  <a name="ant">
139  <h2>3. Ant</h2>
140  </a>
141 
142  <p>
143    We use <a href="http://ant.apache.org/">Ant</a> to compile BASE. You will need
144    at least version 1.6. All build instructions are in the <code>build.xml</code>
145    file.
146  </p>
147 
148  <p>
149    A build is started with the command:
150  </p>
151 
152<pre class="code">
153ant &lt;target&gt;
154</pre>
155  <p>
156    where &lt;target&gt; is one of the named targets defined in the build file.
157    You may specify multiple targets:
158  </p>
159 
160<pre class="code">
161ant web jobagent
162</pre>
163
164  <a name="maintargets">
165  <h3>3.1 Main build targets</h3>
166  </a>
167 
168  <p>
169    These targets works on the entire BASE source code. They may take some
170    time to finish, but everything will be checked and recompiled if needed.
171  </p>
172 
173  <dl>
174  <dt>ant dev</dt>
175  <dd>
176    Build everything for local use. This targets compiles the core, plugins, web
177    application, job agent, etc. for local use. It doesn't generate javadoc documentation.
178  </dd>
179 
180  <dt>ant dist</dt>
181  <dd>
182    Build everything for distribution. This target compiles everything, generates the
183    javadoc documentation, etc. Everything is placed in the <code>dist</code> subdirectory.
184  </dd>
185 
186  <dt>ant package</dt>
187  <dd>
188    Create compressed tar files of the distribution.
189  </dd>
190 
191  <dt>ant clean</dt>
192  <dd>
193    Remove all generated files.
194  </dd>
195 
196  </dl>
197 
198  <a name="othertargets">
199  <h3>3.2 Other build targets</h3>
200  </a>
201 
202  <p>
203    These targets are quicker to use if you know that you have only made
204    changes to a specific module.
205  </p>
206 
207  <dl>
208  <dt>ant core</dt>
209  <dd>
210    Compile the core for local use.
211  </dd>
212 
213  <dt>ant coreplugins</dt>
214  <dd>
215    Compile the core plugins for local use.
216  </dd>
217
218  <dt>ant web</dt>
219  <dd>
220    Compile the web client application for local use.
221  </dd>
222 
223  <dt>ant installprg</dt>
224  <dd>
225    Compile the installation programs for local use.
226  </dd>
227 
228  <dt>ant jobagent</dt>
229  <dd>
230    Compile the job agent for local use.
231  </dd>
232 
233  <dt>ant migrate</dt>
234  <dd>
235    Compile the migration program for local use.
236  </dd>
237 
238  <dt>ant test</dt>
239  <dd>
240    Compile the test programs for local use.
241  </dd>
242 
243  <dt>ant doc</dt>
244  <dd>
245    Generate documentation for local use.
246  </dd>
247 
248  <dt>ant docbook</dt>
249  <dd>
250    Temporary target for generating the docbook-based user documentation.
251    In the future this will be included in the 'ant doc' target. Note!
252    Docbook will work with pure Java but performance is a lot better if
253    <a href="http://xmlsoft.org/XSLT/">XSLTPROC</a> is installed. The
254    documentation is generated in the directory 'doc/docbook'.
255  </dd>
256  </dl>
257
258  <a name="running">
259  <h2>4. Running BASE from the local installation</h2>
260  </a>
261
262  <p>
263    If you have followed the instructions so far the subversion working copy
264    installation is compatible with a binary distribution. You will the
265    installation programs, web application and all other things in the same
266    places as for a binary installation. Read the <a href="../installation.html">
267    BASE 2 installation instructions</a> document for more information.
268  </p>
269
270</body>
271</html>
Note: See TracBrowser for help on using the repository browser.