I would like to find out how to build a WAR file with a specified OpenMRS version (1.11.4 for example) but including a number of modules & resources (reports and forms) for distribution.
The current approach for distro that I have seen can bundle the modules into a zip file which requires a step to unzip. However if I can just distribute a WAR file with the modules in the budledModules directory of WEB-INF that would be very beneficial.
Are there any downsides to modules in the bundledModules directory?
This platform distro project does that exactly but only adds the rest webservices module, in your project you would just have to add more dependencies and artifact items for other modules in your pom file. The project actually uses the exec-maven-plugin to add the omod file to the war file inside the WEB-INF/bundledModules folder
Thanks @wyclif thats a new gem I keep finding these within the OpenMRS community
In theory, distributing your OpenMRS distro as a single artifact with the
omods in the war file should be fine.
In practice I remember that there used to be bugs if there are different
versions of the same modules in your modules folder. You’ll want to test
this out thoroughly.
@darius Thanks for the tip, I will add that check to our SOP for upgrading existing installations. The reason we are bundling the modules, followed by forms & BIRT reports is to reduce the installation steps for new installations, as well as give us greater control over updates and upgrades as deployments to new sites are ramped up.
This is now available from OpenMRS SDK 3.5.0 with the command as follows
mvn openmrs-sdk:build-distro -Dbundled=true