Build OpenEMS Backend

This chapter explains, how the OpenEMS Backend can be compiled to a JAR file that can be executed outside of an IDE.

1. Build using Eclipse IDE

  1. Inside Eclipse IDE open the io.openems.backend.application project and open the BackendApp.bndrun file.

  2. Press Export to start the Export Wizard Selection assistant.

  3. Select Executable JAR and press Next >.

  4. Select a Destination for Export to JAR.

  5. Press Finish

This creates a so called Fat-JAR-file including all bundles. It can be executed by running java -jar openems-backend.jar in a console.

2. Build using Gradle from command line

Gradle is a build tool that is used in the OpenEMS project to compile the JAR-files and to execute other tasks like building the documentation webpage using Antora and the Javadocs. To build OpenEMS Backend:

  1. Open a console and change to your repository directory.

  2. Execute gradlew buildBackend

2.1. Building only a specific project

If developing a component for the backend, it might make sense to only build the component in isolation instead of the entire backend (same applies to the Edge). This can be achieved by executing gradlew :io.openems.backend.metadata.mymetadata:build, which produces a JAR file.