<p>As BaseX This page is offered in a Maven repository, you can easily embed and part of the [[Integrate|integrateDeveloper Section]]. It demonstrates how [https://maven.apache.org Maven] is used to compile and run BaseX, and embed it into your own other projects.To use the BaseX ==Using Maven== If you have [[Git|cloned our repository]] and installed Maven Artifactson your machine, add you can run the following lines to yourcommands from all local repository directories: * <code>pom.xmlmvn compile</code> file:the BaseX source files are compiled.* </pcode> mvn package<pre class="brush:xml"/code><repositories> <repository> <id>dbis-ukn</id> <name>DBIS Maven Repository</name> <url>http://wwwJAR archives are created in the {{Code|target}} class directory, and all relevant libraries are created in the {{Code|lib}} directory.inf.uni-konstanzPackaging is useful if you want to use the start scripts.de/dbis/basex/maven</url> <* <code>mvn install</code>: the JAR archive is installed to the local repository></, and made available to other Maven projects. This is particularly useful if you are compiling a beta version of BaseX, for which no archives exist in the repositories></pre> .
By adding the flag <code>-DskipTests</code> you can skip the JUnit tests and speed up packaging. You may as well use [[Developing with Eclipse|Eclipse and m2eclipse]] to compile the BaseX sources. There are several alternatives for starting BaseX: * type in {{Code|java -cp target/classes org.basex.BaseX}} in the {{Code|basex-core}} directory to start BaseX on the command-line mode,* type in {{Code|mvn jetty:run}} in the {{Code|basex-api}} directory to start BaseX with Jetty and the HTTP servers,* run one of the [[Start Scripts]] contained in the {{Code|etc}} directory ==Artifacts== You can easily embed BaseX into your own Maven projects by adding the following XML snippets to your {{Code|pom.xml}} file: <syntaxhighlight lang="xml"><repositories> <repository> <id>basex</id> <name>BaseX Maven Repository</name> <url>http://files.basex.org/maven</url> </repository></repositories></syntaxhighlight> ===BaseX ArtifactMain Package=== <pre classsyntaxhighlight lang="brush:xml"><<dependency>> <<groupId>>org.basex<</groupId>> <<artifactId>>basex<</artifactId>> <<version>>7.6</version></dependency></syntaxhighlight> ===APIs and Services=== <p>..3.4<including APIs and the [[REST]], [[RESTXQ]] and [[WebDAV]] services:</p> <syntaxhighlight lang="xml"><dependency> <groupId>org.basex</groupId> <artifactId>basex-api</artifactId> <version>7.6</version>><</dependency>></presyntaxhighlight> ===XQJ API===
===BaseX <p>The XQJ API Artifact==is hosted at http://xqj.net:</p> <syntaxhighlight lang= "xml"><repository> <id>xqj</id> <name>XQJ Maven Repository</name> <purl>...including the [[JAX-RX]], [http://sourceforgexqj.net/projectsmaven</url></repository>...<dependency> <groupId>net.xqj</xmldbgroupId> <artifactId>basex-org XML:DB]xqj</artifactId>[http: <version>1.2.0</version></jcpdependency><dependency> <groupId>com.orgxqj2</engroupId> <artifactId>xqj2</jsrartifactId> <version>0.1.0</detail?id=225 XQJ] and API:version></pdependency> <pre class="brush:xml"dependency><dependency> <<groupId>org>javax.xml.basex<xquery</groupId>> <<artifactId>basex>xqj-api<</artifactId>> <<version>6>1.3.4<0</version>><</dependency>></presyntaxhighlight>[[Category:Developer]]