updating a module

Is there a quick way to view changes made to the module without re-running the server. I want to make changes to a module’s UI and view the small changes as I make them because deleting the Omod and uploading it all the time takes a lot of time.

2 Likes

Is there any reason why you are not using the new OpenMRS 3.0 Frontend framework? OpenMRS Frontend 3.0 Documentation for Developers

it is much easier @deb when you are using the sdk. It allows hot reloading (UI changes are deployed with browser refreshing). You just need to watch the module you are working with.

But, however, the above doesn’t work with backend changes. You can check out OpenMRS SDK Step By Step Tutorials - Documentation - OpenMRS Wiki

Thanks. let me try to understand the UI framework.

thanks @jnsereko

am having trouble watching the module am working on. this is how am watching the module. I cd into the module folder, then run mvn openmrs-sdk:watch. I then start the server and I upload the module, however, when I make changes to the jsp page and I refresh the browser I don’t see those changes. some body kindly help me.

What do you mean by this

Do you get a Build Success on watching? Can you please share the logs while starting the sdk.

C:\Users\DEB KARUNGI\hh>mvn openmrs-sdk:watch
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Hh                                                                 [pom]
[INFO] Hh API                                                             [jar]
[INFO] Hh OMOD                                                            [jar]
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 was not found in https://mavenrepo.openmrs.org/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of openmrs-repo has elapsed or updates are forced
[INFO]
[INFO] -----------------------< org.openmrs.module:hh >------------------------
[INFO] Building Hh 1.0.0-SNAPSHOT                                         [1/3]
[INFO] --------------------------------[ pom ]---------------------------------
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 was not found in https://mavenrepo.openmrs.org/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of openmrs-repo has elapsed or updates are forced
[INFO]
[INFO] --- openmrs-sdk-maven-plugin:4.3.0:watch (default-cli) @ hh ---
Dec 31, 2021 10:08:21 AM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

You have the following servers::
1) server6
2) server7
3) server1
4) server4
5) server

Which one do you choose? [1/2/3/4/5]: 1
[INFO] Watching C:\Users\DEB KARUNGI\hh for changes...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Hh 1.0.0-SNAPSHOT:
[INFO]
[INFO] Hh ................................................. SUCCESS [  5.474 s]
[INFO] Hh API ............................................. SKIPPED
[INFO] Hh OMOD ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.298 s
[INFO] Finished at: 2021-12-31T10:08:24+03:00
[INFO] ------------------------------------------------------------------------
1 Like

i meant on running the sdk not watching :slightly_smiling_face: Also, try to post logs at pastebin.com

PS I hope you saw @dkayiwa’s earlier response and you are not running 3.0

I have sorted it. thanks. I had created a platform module instead of a reference application module. So I was not able to watch any changes I made to the jsp. thanks a lot. I can now watch the changes I make to the gsp.

1 Like

I have started using the frontend framework. that link was very helpful thanks @dkayiwa

the username Admin and password Admin123 return an error. username or password invalid

username and password admin Admin123 returns an error

Am also on research of the same issue

Try and begin with a small letter ie => admin123

@deb @josephkagimu1 instead use;

username: admin2

password: Admin123

Hi Members, My name is Mukoova Juma. Am a fullstack Software Engineer [ React, Laravel,PHP, Nodejs]. I have been referred by my friend @hadijah315 and am happy to be here and contribute to the community.