build.html 4.0 KB
Newer Older
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
<!--
3 4 5
Copyright 2004-2008 H2 Group. Multiple-Licensed under the H2 License, Version 1.0,,
and under the Eclipse Public License, Version 1.0
(http://h2database.com/html/license.html).
6 7
Initial Developer: H2 Group
-->
8 9
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
10
Build
11
</title><link rel="stylesheet" type="text/css" href="stylesheet.css" />
12 13 14 15 16 17
<script type="text/javascript" src="navigation.js"></script>
</head><body onload="frameMe();">
<table class="content"><tr class="content"><td class="content"><div class="contentDiv">

<h1>Build</h1>
<a href="#portability">
18
    Portability</a><br />
19
<a href="#environment">
20
    Environment</a><br />
21
<a href="#building">
22
    Building the Software</a><br />
23
<a href="#maven2">
24
    Using Maven 2</a><br />
25 26
<a href="#translating">
    Translating</a><br />
27

28
<br /><a name="portability"></a>
29
<h2>Portability</h2>
30
<p>
31
This database is written in Java and therefore works on many platforms.
32
It can also be compiled to a native executable using GCJ.
33
</p>
34

35
<br /><a name="environment"></a>
36
<h2>Environment</h2>
37
<p>
38 39 40
A Java Runtime Environment (JRE) version 1.4 or higher is required to run this database.
</p>
<p>
41
To build the database executables, the following software stack was used.
42
Newer version or compatible software works too.
43
</p>
44 45
<ul>
    <li>Windows XP
46
    </li><li>Sun JDK Version 1.4
47
    </li><li>Mozilla Firefox 1.5
48
    </li><li>Eclipse Version 3.2.2
49
    </li><li>YourKit Java Profiler
50
    </li><li>Apache Ant Version 1.6.5
51
</li></ul>
52

53
<br /><a name="building"></a>
54
<h2>Building the Software</h2>
55
<p>
56
On the command line, go to the directory src and execute the following command:
57
</p>
58
<pre>
59
build -?
60
</pre>
61
<p>
62
You will get a list of targets. If you want to build the jar file, execute:
63
</p>
64
<pre>
65
build jar
66
</pre>
67
<p>
68 69
To create a jar file with the JDBC API and the classes required to connect to a server only,
use the target jarClient:
70
</p>
71
<pre>
72
build jarClient
73
</pre>
74
<p>
75
The other targets may be used as well.
76
</p>
77

78
<br /><a name="maven2"></a>
79
<h2>Using Maven 2</h2>
80
<h3>Using a Central Repository</h3>
81
<p>
82
You can include the database in your Maven 2 project as a dependency.
83
Example:
84
</p>
85 86 87 88
<pre>
&lt;dependency&gt;
    &lt;groupId&gt;com.h2database&lt;/groupId&gt;
    &lt;artifactId&gt;h2&lt;/artifactId&gt;
Thomas Mueller's avatar
Thomas Mueller committed
89
    &lt;version&gt;${version}&lt;/version&gt;
90 91
&lt;/dependency&gt;
</pre>
92
<p>
93
New versions of this database are first uploaded to http://hsql.sourceforge.net/m2-repo/ and then automatically
94 95
synchronized with the main maven repository; however after a new release it may take a few hours before
they are available there.
96
</p>
97 98

<h3>Using Snapshot Version</h3>
99
<p>
100
To build a 'snapshot' H2 .jar file and upload it the to the local Maven 2 repository, execute the following command:
101
</p>
102
<pre>
103
build mavenInstallLocal
104
</pre>
105
<p>
106
Afterwards, you can include the database in your Maven 2 project as a dependency:
107
</p>
108 109
<pre>
&lt;dependency&gt;
110
    &lt;groupId&gt;com.h2database&lt;/groupId&gt;
111 112 113 114 115
    &lt;artifactId&gt;h2&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
&lt;/dependency&gt;
</pre>

116 117 118 119 120 121 122 123 124 125 126
<br /><a name="translating"></a>
<h2>Translating</h2>
<p>
The translation of this software is split into the following parts:
</p>
<ul>
<li>H2 Console: src/main/org/h2/server/web/res/_text_*.properties
</li><li>Error messages: src/main/org/h2/res/_messages_*.properties
</li><li>Web site: src/docsrc/text/_docs_*.utf8.txt
</li></ul>
<p>
127
The conversion between UTF-8 and Java encoding (using the \u syntax), as well as the HTML entities (&amp;#..;)
128
is automated by running the tool PropertiesToUTF8. The web site translation is automated as well,
129
using <code>build docs</code>.
130 131
</p>

132
</div></td></tr></table><!-- analytics --></body></html>