Build OpenEMS Edge

This chapter explains, how OpenEMS Edge 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.edge.application project and open the EdgeApp.bndrun file.

    Eclipse IDE EdgeApp.bndrun
    Figure 1. Eclipse IDE EdgeApp.bndrun
  2. Press Export to start the Export Wizard Selection assistant.

  3. Select Executable JAR and press Next >.

    Eclipse Export Wizard Selection assistant
    Figure 2. Eclipse Export Wizard Selection assistant
  4. Select a Destination for Export to JAR.

    Eclipse Export Destination
    Figure 3. Eclipse Export Destination
  5. Press Finish

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

2. Build using bnd from command line

  1. Install bnd on the command line. See bnd wiki for details. (Following I assume that you download the biz.aQute.bnd.jar file to the parent directory of your repository.)

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

  3. Execute java -jar biz.aQute.bnd.jar package -o openems.jar io.openems.edge.application\EdgeApp.bndrun

  4. This creates a Fat-JAR 'openems.jar' in the base directory of the repository.