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
-
Inside Eclipse IDE open the io.openems.backend.application project and open the BackendApp.bndrun file.
-
Press Export to start the Export Wizard Selection assistant.
-
Select Executable JAR and press Next >.
-
Select a Destination for Export to JAR.
-
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:
-
Open a console and change to your repository directory.
-
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.