Versions Compared

Key

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

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

To get started ensure , make sure that you have installed the latest version of OpenMRS SDK and Oracle JDK 8. 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 step by step.

Table of Contents

Why use the SDK

...

The SDK is the tool for setting up multiple self contained servers that can be run independently , at times at the same time by running . You can run each available server on a different port specifying the -Dport variable. You can even mix the servers, having those running JDK 1.7 for 1.11.x and JDK 1.8 2.x alongside each other.

...

We will walk through these steps and create an environment to develop and debug REST module on top of OpenMRS 2.0.0 platform.

...

If you want to enable remote debugging by default when running the server,
specify the port number here (e.g. 1044). Leave blank to disable debugging.
(Do not do this on a production server) (default: 'no debugging'): 

Type default value '1044' and push enter. Specifying debug port is essential to setup remote debugging configuration. You will be asked what database you want to use:

...

Now, when server is created you need to get the source of REST module. To do that, in your workspace directory run: 

...

Now it's time to create debugging configuration in IDE. Recommended The recommended way is to create remote debugging configuration on adress address 'localhost:1044' (1044 is debug port you specified during server creation). This way, you can run instance from command line:

...

Remote debugging has important advantage over running server from IDE - you can debug multiple projects with a single server run running (but only one at the same time), and run debugging only when you need to.

...

Steps to create debugging configuration depend on the IDE you are using, but it should be quite easy to find.

...

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

name= OWA development
version= 1.0
war.openmrs= 2.0.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

...

Page Properties
hiddentrue


Related issues