Changes

Jump to navigation Jump to search
1,787 bytes added ,  10:52, 29 July 2020
<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>&lt;repositories&gt; &lt;repository&gt; &lt;id&gt;basex&lt;/id&gt; &lt;name&gt;BaseX Maven Repository&lt;/name&gt; &lt;url&gt;http://filesJAR archives are created in the {{Code|target}} class directory, and all relevant libraries are created in the {{Code|lib}} directory.basexPackaging is useful if you want to use the start scripts.org/maven&lt;/url&gt; &lt;* <code>mvn install</code>: the JAR archive is installed to the local repository&gt;&lt;/, 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&gt;</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">&lt;<dependency&gt;> &lt;<groupId&gt;>org.basex&lt;</groupId&gt;> &lt;<artifactId&gt;>basex&lt;</artifactId&gt;> &lt;<version&gt;>7.6</version></dependency></syntaxhighlight> ===APIs and Services===  <p>...including APIs and the [[REST]], [[RESTXQ]] and [[WebDAV]] services:</p> <syntaxhighlight lang="xml"><dependency> <groupId>org.basex</groupId> <artifactId>basex-api</artifactId> <version>7.2&lt;6</version&gt;>&lt;</dependency&gt;></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 [[REST]], [http://sourceforgexqj.net/projectsmaven</url></repository>...<dependency> <groupId>net.xqj</xmldbgroupId> <artifactId>basex-org XML:DB]xqj</artifactId>and [http: <version>1.2.0</version></jcpdependency><dependency> <groupId>com.orgxqj2</engroupId> <artifactId>xqj2</jsrartifactId> <version>0.1.0</detail?id=225 XQJ] APIs:version></pdependency> <pre class="brush:xml"dependency>&lt;dependency&gt; &lt;<groupId&gt;org>javax.basex&lt;xml.xquery</groupId&gt;> &lt;<artifactId&gt;basex>xqj-api&lt;</artifactId&gt;> &lt;<version&gt;6>1.7&lt;0</version&gt;>&lt;</dependency&gt;></presyntaxhighlight>[[Category:Developer]]
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu