This is for BaseX version 9.1.2 if you want to test with a different version then choose one of the other branches.
Installation steps:
-
git clone https://github.com/xokomola/basex-gradle-starter.git
-
There is no step 2
That’s right. There’s just one step between cloning this and using this.
This build script provides the following tasks for running BaseX.
-
gui
-
client
-
http
Configuration is done in gradle.properties
.
gradlew http
gradlew http
gradlew gui
You can combine all the needed jar files and create a so-called fat JAR. This allows you to run BaseX as a JAR (easy to deploy). You can already do that with the BaseX core distribution but with this it also includes the optional libraries.
gradlew shadowJar
The JAR file will be created in the build/libs
directory.
Note that you will still have to deploy the data
, repo
and webapp
directories (and other resources) separately.
java -Dorg.basex.dbpath=data \
-Dorg.basex.repopath=repo \
-Dorg.basex.webpath=webapp \
-jar build/libs/basex-gradle-starter-all.jar
You can also use all the regular basex command-line arguments. For example start the HTTP server on a different port.
java -Dorg.basex.dbpath=data \
-Dorg.basex.repopath=repo \
-Dorg.basex.webpath=webapp \
-cp build/libs/basex-gradle-starter-all.jar \
org.basex.BaseXClient
java -Dorg.basex.dbpath=data \
-Dorg.basex.repopath=repo \
-Dorg.basex.webpath=webapp \
-cp build/libs/basex-gradle-starter-all.jar \
org.basex.BaseXGUI