Changes

Jump to navigation Jump to search
77 bytes removed ,  16:09, 29 July 2022
no edit summary
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 being developed with the [http://www.eclipse.org Eclipse] environment. Other (other IDEs are like IntelliJ IDEA can be used as well to develop with BaseX, but are not supported by our team).* The [httphttps://subclipsewww.tigriseclipse.org Subclipse Plugin/downloads/ Eclipse IDE for Java Developers] is needed to check out includes the latest sources from EGit plugin (for [[Subversion_Repository|our repositoryGit]].* To work with packages other than the main project, ) and the [http://m2eclipse.sonatype.org m2eclipse] m2e plugin is required to add (for [[Maven]] support to Eclipse).* Additional coding guidelines Other plugins we use are defined via Checkstyle and can be integrated with the [http://eclipse-cs.sourceforge.net eclipse-cs] plugin.
{| class="wikitable" |- valign=Checkout"top"! Name! Description! Update URL! Eclipse Marketplace|-| [http://eclipse-cs.sourceforge.net eclipse-cs]| Enforces Checkstyle coding standards.| <code><nowiki>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></code>| [https://marketplace.eclipse.org/marketplace-client-intro?mpc_install=661 install]|} ==Check Out==
To checkout Our [[Git|Git Tutorial]] explains how BaseX, do the following: # ''File'' → ''Import''# ''SVN'' → ''Check can be checked out Projects from SVN''# Enter the [https://svn.uni-konstanzgithub.decom/dbisBaseXdb/basex https://svnGitHub Repository] and embedded in Eclipse with EGit.uniThe article also demonstrates how git can be used on command-konstanzline.de/dbis/ The basex/trunk] as repository# Choose contains the project you likefollowing subdirectories:<br/> ## [https://svn.uni{{Code|basex-konstanz.de/dbis/basex/trunk/basex basex] core}} is the main project## [https://svn.uni{{Code|basex-konstanz.de/dbis/basex/trunk/api api] }} contains the BaseX APIs (JAX-RXXML:DB, XQJ, XMLDB, and bindings in other languages) and HTTP Services ([[REST]], [[RESTXQ]], [[WebDAV]]) ## [https://svn.uni{{Code|basex-konstanz.de/dbis/basex/trunk/examples }} includes some examples] demonstrates some use cases code for BaseX ## [https://svn.uni-konstanz.de/dbis/{{Code|basex/trunk/jax-rx jax-rx] represents tests}} contains several unit and stress tests If the JAX-RX Interface# Click "Problems" View contains errors or warnings, you may need to switch to Java 11 (''Windows'' → ''Preferences'' → ''Java'' → ''FinishInstalled JREs'').
==Startin Eclipse==#Press ''Run'' → ''Run&#8230;''#Create a new "Java Application" launch configuration #Select "basex" as "Project" #Choose a "Main class" (e.g., <code>org.basex.BaseXGUI</code> for the graphical user interface) #Launch the project via ''Run''
==Using Maven==# Press ''Run'' → ''Run…'' # Create a new "Java Application" launch configuration If the standalone version of [http://maven# Select "basex" as "Project" # Choose a "Main class" (e.apacheg.org Maven] is installed,you can run<code> mvn compile org.basex.BaseXGUI</code>in for the graphical user interface) # Launch the project directory to compile BaseX.via ''Run''
Should you wish to create / package your own jars you can do so by running <code>mvn package</code>.By adding the flag <code>-DskipTests=true</code> you can skip running the JUnit-tests. Type in<code> java -cp target/classes/org.basex.BaseX </code>to run BaseX. You can launch the following classes, which are all placed in the<code>org.basex</code> main package:=Alternative==
;[[Startup_Options#BaseX_Standalone|BaseX]]: You may as well use the standalone mode;version of [[Startup_Options#BaseX_Server|BaseXServerMaven]]: server instanceto compile and run the project, waiting for requests;[use other IDEs such as [Startup_Options#BaseX_Client|BaseXClient]]https: client instance, interacting with the server;[[Startup_Options#BaseX_GUI|BaseXGUI]]:graphical user interface Moreover, try <code>-h</code> to have a look at the available command-line options/www.jetbrains.For example, you can evaluate XQuery expressions or process database commands withoutentering the consolecom/idea/ IntelliJ IDEA].
[[Category:Developer]]
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu