build.html 3.2 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
Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html). 
4 5
Initial Developer: H2 Group
-->
6 7
<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>
8
Build
9
</title><link rel="stylesheet" type="text/css" href="stylesheet.css" />
10 11 12 13 14 15
<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">
16
    Portability</a><br />
17
<a href="#environment">
18
    Environment</a><br />
19
<a href="#building">
20
    Building the Software</a><br />
21
<a href="#maven2">
22
    Using Maven 2</a><br />
23

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

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

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

68
<br /><a name="maven2"></a>
69
<h2>Using Maven 2</h2>
70
<h3>Using a Central Repository</h3>
71
<p>
72
You can include the database in your Maven 2 project as a dependency. 
73
Example:
74
</p>
75 76 77 78
<pre>
&lt;dependency&gt;
    &lt;groupId&gt;com.h2database&lt;/groupId&gt;
    &lt;artifactId&gt;h2&lt;/artifactId&gt;
79
    &lt;version&gt;1.0.61&lt;/version&gt;
80 81
&lt;/dependency&gt;
</pre>
82 83 84 85
<p>
New versions of this database are first uploaded to http://hsql.sourceforge.net/m2-repo/ and then automatically 
synchronized with the main maven repository; however after a new release it may take a few hours before
they are available there.
86
</p>
87 88

<h3>Using Snapshot Version</h3>
89
<p>
90
To build a 'snapshot' H2 .jar file and upload it the to the local Maven 2 repository, execute the following command:
91
<pre>
92
ant mavenInstallLocal
93 94 95 96
</pre>
Afterwards, you can include the database in your Maven 2 project as a dependency:
<pre>
&lt;dependency&gt;
97
    &lt;groupId&gt;com.h2database&lt;/groupId&gt;
98 99 100 101
    &lt;artifactId&gt;h2&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
&lt;/dependency&gt;
</pre>
102
</p>
103 104

</div></td></tr></table></body></html>