How do I begin modifying code after installing the OpenMRS SDK?


(John Adeniran) #1

Application Name: OpenMRS SDK; platform

Version Number: OpenMRS SDK 3.13.2

Question: Hi! I’ve been following along with the steps listed here on the wiki (https://wiki.openmrs.org/display/docs/OpenMRS+SDK) to install the OpenMRS platform. I then created a server to run the platform and create a module. For this I went through the section titled, “Basic Usage.” Currently, I’m not sure where I should be going next. So, I’m wondering:

  • How can I edit code to see the changes reflected when I launch the module? Should I be using my Eclipse IDE for this? If so, how can this be done?

Thank you so much for any help; it is much appreciated!


(Nathan Ruhanga) #2

yes and here is an example


(shalinee batri) #3

Hi , did you get it working? I have the same question , I want to make some changes and test them.

Thanks.


(Aleksander W) #4

If you want to start making changes in any of the modules and test them with SDK, please fork the module you want to modify from Github and after that execute mvn openmrs-sdk:watch command in the base folder of the module you want to work on.

After that the wizard will ask you which instance of openmrs sdk you want to watch the module with, and since then every time you run the sdk - the module is rebuilt and installed automatically using your source.

PS: If you remember the server ID of the instance of openmrs sdk you want to watch the module with, you might aswell use mvn openmrs-sdk:watch -DserverId=xxx command too, so the wizard will not ask you to select the server from the list again.

Reference: https://wiki.openmrs.org/display/docs/OpenMRS+SDK#OpenMRSSDK-Watchingprojects


(Briona Davis) #5

Hi, I’m a new developer on the project and I’m working on something similar to @jaden85 as well.

I’m in the process of familiarizing myself with the project and the code. I’m looking for a file where I can make a cosmetic change that’ll reflect on the web page after running it. What file would you suggest we look into to achieve this?


(Nathan Ruhanga) #6

https://wiki.openmrs.org/display/docs/Getting+Started+as+a+Developer

The link above is quite helpful when carefully followed and perhaps by stating where you are facing challenges in the guide, help will easily come your way.


(John Adeniran) #7

Hey, I’m actually still trying to figure it out; I’m not having any trouble with cloning the repository and making changes in that regard but I still cannot figure out how to make changes to the source code in my module, which will be reflected when the SDK is launched. I’ll definitely update you if I have any luck!


(shalinee batri) #8

@jaden85 , Hii - Okay. I am also trying that out. I have done OpenMRS SDK setup and ran distribitution module per the wiki instructions.

Will keep you posted for any success.


(shalinee batri) #9

@jaden85 - Hello John. I kind of figured out , how to make changes. Here are step that I followed 1- Download/clone the source code of that module. I changes the same version that was already installed with sdk for tha tmodule. 2- make your changes and build the module 3- It will generate .omod file. Upload this file from the UI. Admin->Manage Module-> upgrade module. 4- Restart the server (not sure if it requires each time you upgrade ,but I do it )

Hope this helps.