Changes

Jump to navigation Jump to search
53 bytes added ,  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 Eclipse environment (other IDEs like IntelliJ IDEA can be used as well). The [httphttps://www.eclipse.org /downloads/ EclipseIDE for Java Developers] environmentincludes the EGit plugin (for [[Git]]) and the m2e plugin (for [[Maven]]). Other IDEs plugins we use are used as well in our community, but are not supported by our team.: {| class="wikitable" |- valign="top"! Name! Description! Update URL! Eclipse Marketplace|-* The | [http://wwweclipse-cs.sourceforge.net eclipse-cs]| Enforces Checkstyle coding standards.org| <code><nowiki>http:/egit/ EGit] plugin is needed to check out the latest sources from our repository within Eclipseeclipse-cs.sf.net/update/</nowiki></code>* For additional comfort and to work with packages other than the main project, the | [httphttps://m2eclipsemarketplace.sonatypeeclipse.org m2eclipse/marketplace-client-intro?mpc_install=150 install] plugin is required, which adds |-| [[Mavenhttps://spotbugs.github.io/ SpotBugs]] support to Eclipse| Analyze project at byte code level| <code><nowiki>https://spotbugs.github.io/eclipse/</nowiki></code>* Additional coding guidelines are defined via Checkstyle and can be integrated with the | [httphttps://marketplace.eclipse.org/marketplace-client-csintro?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-csintro?mpc_install=661 install] plugin.|}
==Check Out==
To check Our [[Git|Git Tutorial]] explains how BaseX can be checked out BaseX and its sub projects from the [https://github.com/basexdb, please have a look at our [[GIT|GIT Tutorial]BaseXdb/basex GitHub Repository]and embedded in Eclipse with EGit. The article also demonstrates how git can be used on command-line. # Choose The basex repository contains the project you likefollowing subdirectories:<br/> ## [https://github.com/basexdb/{{Code|basex basex] -core}} is the main project## [https://github.com/basexdb/{{Code|basex-api basex-api] }} contains the BaseX APIs (JAX-RX, XQJ, XMLDBXML:DB, and bindings in other languages) and HTTP Services ([[REST]], [[RESTXQ]], [[WebDAV]]) ## [https://github.com/basexdb/{{Code|basex-examples basex-}} includes some examples] demonstrates some use cases code for BaseX ## [https://github.com/basexdb/jax-rx jax{{Code|basex-rx] tests}} contains several unit and stress tests If the JAX-RX Interface# Click on "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