Changes

Jump to navigation Jump to search
1,532 bytes removed ,  16:09, 29 July 2022
no edit summary
<h2>Installation</h2> This page is part of the [[Developer Section]]. It describes how to get the BaseX sources compiled and running on your system. Another article in the documentation describes how to use BaseX as a [[Integrating Eclipse|query processor in Eclipse]]. ==Prerequisites==
BaseX is developed with the Eclipse environment (other IDEs like IntelliJ IDEA can be used as well). The [https://www.eclipse.org/downloads/ Eclipse IDE for Java Developers] includes the EGit plugin (for [[Git]]) and the m2e plugin (for [[Maven]]). Other plugins we use are: {| class="wikitable" |- valign="top"! Name! Description! Update URL! Eclipse Marketplace|-| [http://eclipse-cs.sourceforge.net eclipse-cs]| Enforces Checkstyle coding standards.| <code><h3nowiki>http://eclipse-cs.sf.net/update/</nowiki></code>| [https://marketplace.eclipse.org/marketplace-client-intro?mpc_install=150 install]|-| [https://spotbugs.github.io/ SpotBugs]| Analyze project at byte code level| <code><nowiki>https://spotbugs.github.io/eclipse/</nowiki></code>| [https://marketplace.eclipse.org/marketplace-client-intro?mpc_install=3519199 install]|-| [http://www.ucdetector.org/ UCDetector]| Unnecessary code detector| <code><nowiki>http://ucdetector.sourceforge.net/update</nowiki>Eclipse Integration</h3code> | [https://marketplace.eclipse.org/marketplace-client-intro?mpc_install=661 install]|} ==Check Out==
<p>Our [[Git|Git Tutorial]] explains how BaseX is being developed with the Eclipse environment. Some styleguidelines 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 neededto check can be checked out the latest sources from our repository.Next, we recommend to use the<a href="http[https://m2eclipse.sonatypegithub.orgcom/">m2eclipse<BaseXdb/a> pluginto add Maven support to basex GitHub Repository] and embedded in Eclipsewith EGit.Some additional guidelines are defined via Checkstyle and The article also demonstrates how git can beintegrated with the <a href="http://eclipseused on command-cs.sourceforgeline.net/">eclipse-cs</a> plugin.</p> <p>To checkout BaseX, do The basex repository contains the followingsubdirectories:</p> <ol> <li>File &raquo; Import</li> <li>SVN &raquo; Check out Projects from <span class="caps">SVN</span></li> <li>Use the repository <a href="https://svn.uni-konstanz.de/dbis/# {{Code|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> core}} is the main project</li> <li><a href="https://svn.uni# {{Code|basex-konstanz.de/dbis/basex/trunk/api/">api</a> }} contains the BaseX APIs (XQJXML:DB, XMLDB and bindings in other languages)</li> and HTTP Services ([[REST]], [[RESTXQ]], [[WebDAV]]) <li><a href="https://svn.uni# {{Code|basex-konstanz.de/dbis/basex/trunk/examples/">}} includes some examples</a> demonstrates some use cases code for BaseX</li> </ol></li> # {{Code|basex-tests}} contains several unit and stress tests <li>Click Finish</li> </ol> If the "Problems" View contains errors or warnings, you may need to switch to Java 11 (''Windows'' → ''Preferences'' → ''Java'' → ''Installed JREs''). <h3>Run BaseX with ==Start in Eclipse</h3> == <ol> <li># Press ''Run &raquo; Run&'' → ''Run…''#8230;</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.BaseXWinBaseXGUI</code> for the graphical user interface)</li> <li># Launch the project via "''Run"</li> '' </ol> ==Alternative== <h3>Compile &#38; Run BaseX</h3> <p>If You may as well use 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 and 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 repositoryproject, 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> &lt;repositories&gt; &lt;repository&gt; &lt;id&gt;dbis-ukn&lt;/id&gt; &lt;name&gt;DBIS Maven Repository&lt;/name&gt; &lt;url&gt;httpother IDEs such as [https://www.infjetbrains.uni-konstanz.de/dbis/basex/maven&lt;/url&gt; &lt;com/repository&gt;&lt;idea/repositories&gt;</code> <h3>BaseX Artifact</h3> <code> &lt;dependency&gt; &lt;groupId&gt;orgIntelliJ IDEA].basex&lt;/groupId&gt; &lt;artifactId&gt;basex&lt;/artifactId&gt; &lt;version&gt;6.2.4&lt;/version&gt;&lt;/dependency&gt;</code> <h3>BaseX <span class="caps">API</span> Artifact</h3> <p>...including the <a href="http[[Category://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> &lt;dependency&gt; &lt;groupId&gt;org.basex&lt;/groupId&gt; &lt;artifactId&gt;basex-api&lt;/artifactId&gt; &lt;version&gt;6.2.4&lt;/version&gt;&lt;/dependency&gt;</code>Developer]]
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu