Skip to content

OpenMRS SDK is a toolset which facilitates OpenMRS development

License

Notifications You must be signed in to change notification settings

openmrs/openmrs-sdk

Repository files navigation

Build Status

It is a repository of OpenMRS Software Development Kit (SDK).

For more details visit the project page.

Requirements

  • Maven 3.x

Installation

In order to install the latest version of the sdk run:

mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk

Usage

All commands can be run with mvn openmrs-sdk:<command>.

Run mvn openmrs-sdk:help for the list of supported commands.

Layout

Please note that the SDK consists of numerous sub-modules that implement specific parts of the SDK. The intention is that the SDK itself is relatively modular.

The most important sub-module is found in the maven-plugin directory. This is the main SDK plugin and contains the code that is actually executed when running SDK commands.

docker-maven-plugin contains the code that interacts with Docker directly. Primarily, it is able to create and run Docker containers for OpenMRS databases.

tomcat7-maven-plugin contains the code to run OpenMRS in an embedded Tomcat 7 instance. This is used for serving SDK versions running parts of the platform prior to 2.5.0.

tomcat9-maven-plugin contains the code to run OpenMRS in an embedded Tomcat 9 instance. This is used for serving SDK versions running platform 2.5.0 or newer.

integration-tests contains the integration tests that are useful for fully testing SDK features and ensuring they work.

The various archetype-* directories contains the actual archetypes used by the create-project command.

Development

To build the plugin run:

mvn clean install

To run a SNAPSHOT version of SDK, you need to specify groupId:artifactId:version for all SDK commands, e.g.

mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:5.14.0-SNAPSHOT:setup

You can also debug commands by creating maven run configurations for the SNAPSHOT version in your IDE and starting them in the debug mode.

Releasing

Before publishing a new release, go to JIRA at https://issues.openmrs.org/plugins/servlet/project-config/SDK/versions and add a next development version. Next move the version you have just added up or down to preserve the ordering. Finally, click the gear icon next to the version you want to release and select the Release link. If there are any issues, which are not yet closed for the release, you should see a prompt asking you what to do with them. If the issues have already been committed, close them. Otherwise, move the issues to the next development version.

Releasing follows the standard release process using Bamboo. In OpenMRS Bamboo, you should find the latest green build that has completed that matches what you wish to release. https://ci.openmrs.org/browse/SDK-SDK

On the left, you will find a "Release to Maven" step. For information on this process, see the wiki: https://wiki.openmrs.org/display/docs/Releasing+a+Module+from+Bamboo

Usage statistics

OpenMRS SDK gathers anonymous usage statistics, which are shared on request. Please contact the project lead to request read-only access.