Parent POM for OpenMRS modules

Helllo @raff (and others)

Is there documentation anywhere on the use the of the parent pom module:

I recently created a new module using the SDK and was running into a problem where when running tests it was pulling in the test dependencies from 1.12.2 platform, when my module was designed to be built on 1.10.4 platform.

Took me a few minutes to figure out where the 1.12.2 dependencies were coming from, because I hadn’t noticed the “parent” section in the top of the pom.

How is this supposed to work? Are we supposed to explicitly override the openmrsPlatformVersion and the openmrsPlatformToolsVersion variables in our module pom? (It’s possible the SDK set this up correctly to start, and then I changed something because I didn’t understand 100% what was going on, so not sure if this is a bug/issue or user error).

Thanks! Mark

Docs are on my TODO list, sorry about that :frowning: It should be enough to set openmrsPlatformVersion property. The parent pom is supposed to simplify modules’ poms. It also has the whole config for unit testing including proper dependencies for mockito, hamcrest, etc. Let me know if setting openmrsPlatformVersion is not working for you as expected.

This is an awesome idea, and I really appreciate you putting this together!

One thing I notice is that the maven-release-plugin is set to 2.3.2. Does this work correctly for you? Getting this plugin version wrong, which leads to the release:prepare and release:perform goals failing to work properly and all sort of tag and commit mess to clean up, has been a source of pain for me over the years :slight_smile: Upgrading this version to 2.5 always fixed this for me and made me a happier dev.

Anyway, something we should investigate and confirm.

Thanks, Mike

Thanks @mseaton for looking into that. We should update the version. I recall having issues as well. Created issue at https://issues.openmrs.org/browse/SDK-180