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

Last change on this file since 4509 was 4509, checked in by Jari Häkkinen, 15 years ago

Addresses #1106. Missed to change reference wherefrom retrive GPLv3 license text. And some other changes.

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