Skip to content

theapsgroup/basex-gradle-starter

Repository files navigation

basex-gradle-starter

Table of Contents

A simple build script template for using BaseX from a Gradle buildscript (also adds Saxon HE).

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:

That’s right. There’s just one step between cloning this and using this.

Usage

This build script provides the following tasks for running BaseX.

  • gui

  • client

  • http

Configuration is done in gradle.properties.

BaseX HTTP server
gradlew http
BaseX client console
gradlew http
BaseX GUI
gradlew gui

Using a standalone JAR

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.

Build fat JAR
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.

HTTP server
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.

BaseX client console
java -Dorg.basex.dbpath=data \
     -Dorg.basex.repopath=repo \
     -Dorg.basex.webpath=webapp \
     -cp build/libs/basex-gradle-starter-all.jar \
     org.basex.BaseXClient
BaseX GUI
java -Dorg.basex.dbpath=data \
     -Dorg.basex.repopath=repo \
     -Dorg.basex.webpath=webapp \
     -cp build/libs/basex-gradle-starter-all.jar \
     org.basex.BaseXGUI

About

Simple Gradle template for BaseX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published