Looking for an example of a minimal module

Dear OpenMRS community,

I need to create an OpenMRS module without a user interface. To this end, I am looking for the source code of a minimal module compatible with recent versions of OpenMRS.

I have followed the instructions from the OpenMRS Developer Manual, but the basic project created by typing mvn openmrs-sdk:create-project looks very outdated and incompatible with OpenMRS platform 2.7.0. I indeed get the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project basicexample-omod: Compilation failure: Compilation failure: 
[ERROR] /tmp/basicexample/omod/src/main/java/org/openmrs/module/basicexample/extension/html/AdminList.java:[16,40] package org.openmrs.module.web.extension does not exist
[ERROR] /tmp/basicexample/omod/src/main/java/org/openmrs/module/basicexample/extension/html/AdminList.java:[23,32] cannot find symbol
[ERROR]   symbol: class AdministrationSectionExt
[ERROR] -> [Help 1]

In addition, this example features a Web application (which presumably causes the incompatibility problem above), while I would like a “barebone” module with no user interface.

Could someone indicate me where I could find such a sample, minimal module for the OpenMRS platform 2.7.x? Thanks in advance!

SĂ©bastien-

Hey @jodogne, Here’s a module I created that uses Platform 2.7.0: openmrs-module-auditlogui

You can check out the POM files to get an idea of how to set up a module for 2.7.0. If you need any clarification, feel free to ask!

1 Like

Excellent, thanks for your quick answer!

1 Like

Here are the commits with the changes I made to get the module running on Platform 2.7.0

1 Like