Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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).

...

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
omod.webservices.rest=2.17-SNAPSHOT 

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

...

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

db.h2.supported=true

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

Code Block
mvn openmrs-sdk:setup

Replicating environment for troubleshooting

Coming soon.

  Filter by label (Content by label)showLabelsfalsemax5spacesdocssortmodifiedshowSpacefalsereversetruetypepagelabelsSDK

Page Properties
hiddentrue
Related issues