Skip to content

Setting up IntelliJ to develop components for Egeria

This tutorial explains how to set up IntelliJ so that you can develop new connectors and clients for your organization.

For developers wishing to contribute to Egeria

Contributions to Egeria need to be made via a Pull Request (PR) from you own fork of the project. There are detailed instructions on how to do this in the Git and GitHub Tutorial

Prerequisite tasks

Tutorial tasks

  1. Install IntelliJ
  2. Create a project for your code
  3. Set up an OMAG Server Platform
  4. Create test servers
  5. Start and stop servers

Installing Intellij

Link to the download page and follow the instructions. Then start up IntelliJ and a wizard appears.

Create IntelliJ project

Either from start up wizard click on the New Project button or from IntelliJ's top From an IntelliJ window, select File->New Project from the top menu bar.

Select new project

Enter information about the project. In this example, the project is called egeria-extensions, it is written in Java and being built with Maven.

Enter project details

Press the Create button and the new project is opened.

New project window

Set up Java Level ...

Validate that the project is set up with the right level of Java - you need Java 17. Select File and then Project Structure.... When the wizard opens select Project and ensure the SDK is Java 17.

Check Java level

If the SDK is not 17, click on the dropdown and change it to 17, and click OK to save it. If Java 17 is not listed, make sure you have Java 17 installed on your machine and retry.

Correct Java Level

Ensure you have enough memory ...

Update your memory settings for IntelliJ to ensure you have at least 2GB of memory. This is the option Change Memory Settings that is under the Help menu. In some editions it is nested under Diagnostics.

Memory Settings on Help Menu

Set up OMAG Server Platform in intelliJ

The next set of instructions makes it easy to start and stop an OMAG Server Platform from IntelliJ.

Select Edit Configurations from the dropdown run menu.

edit configurations option

Click on the + sign in the top left of the wizard.

edit configurations empty wizard

Select JAR Application:

select jar application

Fill in the properties based on the directory where you installed egeria. In this example, egeria was installed in directory /Users/mandy-chessell/egeria-install/egeria-platform-4.3-distribution.tar.gz/ and so the settings are:

  • Path to JAR: {install directory}/assembly/platform/omag-server-platform-4.3.jar
  • VM Options: -Dloader.path=lib,extra
  • Working Directory: {install directory}/assembly/platform

egeria platform settings

Press OK to save the configuration and EgeriaPlatform appears in the dropdown run menu.

egeria platform in run menu

Press the green triangle to run the platform.

run egeria platform

A new panel appears in the IntelliJ window showing the platform is starting up.

platform starting

When you see the message OMAG server platform ready for more configuration then the platform has initialized.

Egeria's assembly includes a utility called EgeriaPlatformReport that queries the status of an OMAG Server Platform. It is useful to set up to check that your platform is running correctly.

Select Edit Configurations to create another JAR Application. This time call it PlatformReport. The JAR file is called {install directory}/assembly/etc/reports/egeria-platform-report.jar

location of platform report jar

Leave the Working Directory to default to your project directory. If you are using Version 4.3 of Egeria, set the VM Options to -Dstrict.ssl=false; for release V4.4 and beyond, you can leave them blank.

platform report settings

=== "V4.4" and beyond platform report settings

When you click OK, then PlatformReport appears in the dropdown run menu. Press the green triangle to run the report and a new tab appears in the panel of the IntelliJ window where the platform is running.

Run platform report

Also notice that a new markdown file called egeria-platform-report.md has appeared in your project files that includes the details of the platform report as a markdown file.

The platform report provides details of the current status of the platform. Each time you run the report, a new copy of egeria-platform-report.md is created

If you open egeria-platform-report.md you can see a formatted version of the report.

markdown version of the report

Create test servers

Egeria's assembly includes a utility for configuring servers. It is called ServerConfig. Select Edit Configurations and create another JAR Application run configuration entry for ServerConfig.

server config settings

=== "V4.4" and beyond server config settings

When you click OK, then ServerConfig appears in the dropdown run menu. Press the green triangle to run the utility and a new tab appears in the panel of the IntelliJ window where the platform is running.

ServerConfig prints out a menu of the different configuration options it supports.

server config started

Click in the ServerConfig run window and enter create-metadata-store test-metadata-store and press enter.

create test-metadata-store

This will create a new Metadata Access Store called test-metadata-store.

test-metadata-store create

You can select PlatformReport in the dropdown run menu, and click on the green triangle to re-run the PlatformReport. Notice that details of this new server are now included.

Rerun platform report

Start and stop servers

Egeria's assembly includes a utility called ServerOps that makes it easy to start and stop servers on your OMAG Server Platform. Select Edit Configurations and create another JAR Application run configuration entry for ServerOps.

server ops settings

=== "V4.4" and beyond server ops settings

When you click OK, then ServerOps appears in the dropdown run menu. Press the green triangle to run the utility and a new tab appears in the panel of the IntelliJ window where the platform is running.

ServerOps prints out a menu of the different operations it supports.

server ops started

Click in the ServerOps run window and enter start test-metadata-store and press enter.

start test-metadata-store

ServerOps returns with a list of the services that have been started.

start test-metadata-store

What next?

Now that IntelliJ is set up, you can:

  • Build a new connector.
  • Build a client that calls Egeria.

The Developer Guide provides detailed information on developing with Egeria.


Raise an issue or comment below