1. Building the application
    1. Building manually
  2. Related links

Building the application

We provide pre-built binaries for executing the application on x86 / x86-64 / ARMv7 / AArch64 Windows / Mac / Linux systems. There is also a Docker image for easier deployment.

Building manually

In case you wish to build the latest version of the software manually, you will need the build tools for compiling the software.

Arch Debian Alpine Purpose
git git git Fetch the repository
jdk-openjdk openjdk-25-jdk openjdk25 Java runtime
maven maven maven Build tool
hidapi libhidapi-dev hidapi-dev HID bindings
liburing liburing-dev liburing-dev io_uring bindings

Previous versions (< 3.4) had the following requirements:

Arch Debian Alpine Purpose
git git git Fetch the repository
gcc build-essential gcc, libc-dev Native compilation
jdk-openjdk openjdk-21-jdk openjdk21 Java runtime
maven maven maven Build tool
hidapi libhidapi-dev hidapi-dev HID bindings
liburing liburing-dev liburing-dev io_uring bindings

Then, simply execute the following sequence of commands:

  1. First, obtain the source code from the official GitLab repository:
git clone https://gitlab.utu.fi/tech/soft/tools/power/powergoblin
  1. Unlike on many other distros, the Debian policies prevent the configuration of JAVA_HOME. Thus, the JAVA_HOME variable must be set first on Debian based distros. You can easily test this by printing the contents of the variable in a terminal:
$ export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")
  1. Next we will generate a simple jar package with:
mvn package

You can find the resulting jar file from goblin-service/target/fatjar/.

  1. A whole distribution with integrated Java VM can be built with jlink. The resulting package can be executing on the same OS / hardware combination without requiring any additional dependencies.

Don't forget the clean command! Otherwise, the classes generated in phase 3) could interfere with the process.

mvn -P jlink clean package
mvn -P jlink -pl goblin-service jlink:jlink
  1. The next step builds a local Docker image (powergoblin:latest). Docker images also allow easier deployment. See the Dockerfile included on the root directory for more details.
docker build -t powergoblin:latest .

Note that many prebuilt drivers are provided in the src directory. So, possibly only the step 4) is required to run the software locally.

We do not currently recommend starting the application with mvn exec:java, because due to some threading issues the process won't shut down properly if stopped with ctrl-c, and needs to be explicitly killed. It will also start hogging the CPU so it has to be killed quickly.

You can also share custom files using the PowerGoblin's builtin web server (create a web/ directory, copy the files there and start PowerGoblin) to share the files outside a container etc.