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¶
- Install IntelliJ
- Create a project for your code
- Set up an OMAG Server Platform
- Create test servers
- 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.

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

Press the Create button and the new project is opened.

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

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

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.

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.

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

Select JAR Application:

Fill in the properties based on the directory where you installed egeria. The settings are:
- Path to JAR:
{install directory}/assembly/platform/omag-server-platform-{release}.jar- for example,omag-server-platform-6.2.jar - VM Options:
-Dloader.path=lib,extra - Working Directory:
{install directory}/assembly/platform

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

Press the green triangle to run the platform.

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

When you see the message OMAG server platform ready for more configuration then the platform has initialized.
Check the platform is running¶
Egeria's assembly includes collections of HTTP requests for IntelliJ's HTTP client in the {install directory}/assembly/opt/http-client-collections directory. The Egeria-platform-services.http collection calls the Platform Services and is useful to check that your platform is running correctly.
Open Egeria-platform-services.http in IntelliJ. The variables at the top of the file set the platform URL (@baseURL=https://localhost:7443) and the user that calls the platform. Run the Get OMAG Server Platform Origin request by clicking on the green triangle next to it. This request does not need a bearer token, so it is a simple check that the platform is running. The response is:
Egeria OMAG Server Platform (version {release})
The other requests in the collection need a bearer token. Run the Token (RequestBody) request at the top of the file first - it stores the token it receives in the token variable used by the later requests. For example, Get all active servers lists the servers running on the platform. At this stage there are none.
SSL errors from the HTTP client
The platform uses a self-signed certificate. If IntelliJ's HTTP client rejects it, select the Egeria environment from the dropdown at the top of the .http file and add the following to that environment in the http-client.private.env.json file in the same directory:
"SSLConfiguration": {
"verifyHostCertificate": false
}
Create test servers¶
Servers are configured through the Administration Services. The Egeria-admin-services-server-configuration.http collection in the {install directory}/assembly/opt/http-client-collections directory has a request for each configuration call.
Open Egeria-admin-services-server-configuration.http in IntelliJ and change the @server variable at the top of the file to test-metadata-store. Then run these requests in order by clicking on the green triangle next to each one:
Token (RequestBody)- obtains the bearer token used by the other requests.Set default audit log destination- sends the server's audit log messages to the console.Enable the in-memory repository- gives the server a local repository that is cleared each time the server stops, which is ideal for testing.Enable all of the access services with no topics- adds the access services that provide the metadata APIs, without needing an event bus such as Apache Kafka.
This creates the configuration document for a new Metadata Access Store called test-metadata-store. Run Get server configuration document to see the configuration document that has been built up.
The administration guide describes the other options for configuring a metadata access store.
Start and stop servers¶
Servers are started and stopped through the Platform Services. Return to the Egeria-platform-services.http collection, change the @server variable at the top of the file to test-metadata-store, and run these requests:
Start server - using stored configuration- startstest-metadata-storeusing the configuration document created in the previous step. The response lists the services that have been started, and the platform's run window shows the server's audit log messages as it starts.Get all active servers- now includestest-metadata-store.Query the status of a specific server- shows when the server started.Shutdown server- stops the server. Its configuration document is kept, so it can be started again.
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