Open MRS Distro Project for windows

Hello guys. Greetings.

I have this project that contains a shell script that helps package the core and the modules into one single installation. I wish to ask if they are such distro project that helps perform this same action on a windows platform. All I have seen so far are Linux based.

I have one of such file but I have bee struggling to convert it to a bat file so it can work on windows.

I am using windows 8.1 and I have Java 8 installed with Maven 3.5.2.

Thanks in advance.

@ssmusoke do you wanna share with him how you do this for UgandaEMR?

We use the build distro task of the OpenMRS SDK with this code

This builds a docker folder and a WAR file containing all the modules

1 Like

Hello @ssmusoke, how do I run this file?. The current script I have written in Linux does the same thing as you described. This is a paste bin for your convenience ( I will want that same functionality to be present in windows.

Please explain to me how to proceed with that link you sent. Thank you.

CC: @dkayiwa

@femencha What I described only builds a war file containing the modules. If you add the code to the omod pom.xml this will happen whenever you run mvn clean install

You can then write a Windows batch file to copy the generated war file to your webapps folder

Hello @ssmusoke, I get the big picture of what it will do based on your description. So should clone the openmrs-module-aijar module and build it? If I understand building this will create a war file. Also if i got you right, if I add references to my modules in the omod of that project it will package them as well in the generated war file?

Correct me where I missed. Thank you.

@femencha do the following:

  1. Copy this file and create it in the api/resources folder

  2. Delete any modules that you are not using. Note that the values with {xxVersion} are defined in the pom.xml of your custom module like

  3. Add this code to the omod/pom.xml

  4. Run mvn clean install which will create a omod/target/docker/web folder which contains an openmrs.war file with all the modules

The openmrs.war file is the one you copy to your webapp folder

Do let me know if you run into any challenges or any steps are not clear

Hello @ssmusoke. Thank you for the detailed response. “Delete any modules that you are not using” – from the {Application Data}/OpenMRS/modules/ folder right?

In the api/resource of which project.? Of my modules or what?

Thank you.

Of which project? or module(s)?

Thank you for the replies.

@femencha I am assuming that you are developing a custom module so all references are based on that

Nope in the file, as I doubt if you are using all the modules that the file has

I am assuming you are working in a custom module

In a custom module that you are working on

Hello @ssmusoke, sorry for disturbing again and thank you for help so far.

I have already developed a bunch of modules like 4 or 5. I don’t know if I am doing all the above in all my individual modules or what? or a custom module just meant for the packaging!

Thank you.

@femencha Consider putting this in the module that is closest to the main module with configuration

Hello @ssmusoke, I added this line in my module omob/pom 2.0.5 and I have this