Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

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

Documentation

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

Version 1 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 openmrs-distro.properties. 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 'webservices.rest'. We will use platform 2.0 version.  Let's name our distribution 'OWA development'.

To sum up, our openmrs-distro.properties file will look like this:

name= OWA development
version= 1.0
war.openmrs= 2.0
omod.owa=1.6.2
webservices.rest=2.17-SNAPSHOT 

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 }
omod.event.groupId=org.openmrs

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

db.h2.supported=true

Replicating environment for troubleshooting

 

  • No labels