4,127 bytes added
, 13:56, 6 December 2010
<h2>Installation</h2>
<h3>Eclipse Integration</h3>
<p>BaseX is being developed with the Eclipse environment. Some style
guidelines are integrated in the sources of BaseX;
they are being embedded as soon as you open the project.</p>
<p>The <a href="http://subclipse.tigris.org/">Subclipse Plugin</a> is needed
to check out the latest sources from our repository.
Next, we recommend to use the
<a href="http://m2eclipse.sonatype.org/">m2eclipse</a> plugin
to add Maven support to Eclipse.
Some additional guidelines are defined via Checkstyle and can be
integrated with the <a href="http://eclipse-cs.sourceforge.net/">eclipse-cs</a>
plugin.
</p>
<p>To checkout BaseX, do the following:</p>
<ol>
<li>File » Import</li>
<li>SVN » Check out Projects from <span class="caps">SVN</span></li>
<li>Use the repository <a href="https://svn.uni-konstanz.de/dbis/basex">https://svn.uni-konstanz.de/dbis/basex</a> and click "Browse" </li>
<li>Choose the project you like:<br/>
<ol type="a">
<li><a href="https://svn.uni-konstanz.de/dbis/basex/trunk/basex/">basex</a>
is the main project</li>
<li><a href="https://svn.uni-konstanz.de/dbis/basex/trunk/api/">api</a>
contains the BaseX APIs (XQJ, XMLDB and bindings in other languages)</li>
<li><a href="https://svn.uni-konstanz.de/dbis/basex/trunk/examples/">examples</a>
demonstrates some use cases for BaseX</li>
</ol></li>
<li>Click Finish</li>
</ol>
<h3>Run BaseX with Eclipse</h3>
<ol>
<li>Press Run » Run…</li>
<li>Create a new "Java Application" launch configuration</li>
<li>Select "basex" as "Project" </li>
<li>Choose a "Main class" (e.g., <code>org.basex.BaseXWin</code> for the graphical user interface)</li>
<li>Launch the project via "Run"</li>
</ol>
<h3>Compile & Run BaseX</h3>
<p>If the standalone version of <a href="http://maven.apache.org/">Maven</a>
is installed, you can run<code> mvn compile </code>in the project directory
to compile BaseX.</p>
<p>Type in<code> java -cp target/classes/org.basex.BaseX </code>to run BaseX.</p>
<p>You can launch the following classes, which are all placed in the
<code>org.basex</code> main package:</p>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><b>BaseX</b> </td>
<td width='12'/>
<td> console mode </td>
</tr>
<tr>
<td><b>BaseXServer</b></td>
<td/>
<td> server instance, waiting for requests</td>
</tr>
<tr>
<td><b>BaseXClient</b></td>
<td/>
<td>console mode, interacting with the server</td>
</tr>
<tr>
<td><b>BaseXWin</b></td>
<td/>
<td> graphical user interface </td>
</tr>
</table>
<p>Moreover, try <code>-h</code> to have a look at the available command-line options.
For example, you can evaluate XQuery expressions or process database commands without
entering the console.</p>
<h2>Integration</h2>
<p>As BaseX is offered in a Maven repository, you can easily embed it in your own projects.
In order to use the BaseX Maven Artifacts, add the following lines to your
<code>pom.xml</code> file:</p>
<code>
<repositories>
<repository>
<id>dbis-ukn</id>
<name>DBIS Maven Repository</name>
<url>http://www.inf.uni-konstanz.de/dbis/basex/maven</url>
</repository>
</repositories>
</code>
<h3>BaseX Artifact</h3>
<code>
<dependency>
<groupId>org.basex</groupId>
<artifactId>basex</artifactId>
<version>6.2.4</version>
</dependency>
</code>
<h3>BaseX <span class="caps">API</span> Artifact</h3>
<p>...including the <a href="http://jcp.org/en/jsr/detail?id=225" title="XQJ">XQJ</a> and
<a href="http://sourceforge.net/projects/xmldb-org/">XML:DB</a> API:</p>
<code>
<dependency>
<groupId>org.basex</groupId>
<artifactId>basex-api</artifactId>
<version>6.2.4</version>
</dependency>
</code>