Wiki Spaces


Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack


Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This tutorial will introduce you to OpenMRS SDK (Server Development Kit) distro feature. It assumes that you have basic understanding of OpenMRS modular architecture (you can learn about it reading Technical Overview).

To get started ensure that you have installed OpenMRS SDK. You can find instruction how to do that on OpenMRS SDK wiki pages.

In this tutorial we will walk step by step through common use cases and scenarios.

Creating new distribution

OpenMRS distribution consist of platform and set of modules. SDK distribution is specified in properties file, by convention named Minimal valid distro file contains 3 fields:

name= { name of distribution }
version= { version of distribution }
war.openmrs= { version of openmrs platform }

This is sufficient to create new instance of platform with specified version, but probably you will want to have some modules as well.

Let's create basic distribution for development of Open Web Apps  for OpenMRS. To serve OWA we need  OWA module and REST module, because most of Web Apps want to consume OpenMRS REST API. To introduce module to distro configuration, we need to add new line in format: 'omod.{module id}={module version}'. Module id by convention matches module's Maven Artifact ID. For OWA module it is simply 'owa', for REST module it is ''. We will use platform 2.0 version.  Let's name our distribution 'OWA development'.

To sum up, our file will look like this:

name= OWA development
version= 1.0
war.openmrs= 2.0

SDK automatically assumes that modules Maven Group ID is 'org.openmrs.module', but you can declare another Group ID

omod.event={ version of Event module }

You can declare if your distribution supports H2 as database by adding line:


Now, when we have our distro configuration file, you can setup server from this file with command:

mvn openmrs-sdk:setup

Replicating environment for troubleshooting

Coming soon.


  • No labels