source: trunk/doc/historical/development/build.html @ 5656

Last change on this file since 5656 was 5656, checked in by Nicklas Nordborg, 12 years ago

References #1590: Documentation cleanup

Fixed "Core developer reference: Building BASE". The old documentation has now been moved to the wiki instead.

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