Using SDK to run and test changes made on openmrs core

I am trying to run openmrs-core with changes i made on a particular branch, take for example Switching from Hibernate mappings to Annotations - Person Address by mherman22 · Pull Request #4270 · openmrs/openmrs-core · GitHub.

  • option one: I have made the deployment via an application server using jetty using mvn jetty:run and an interface was brought up that however leads to no UI. My question is on how do i install the required modules to have the required UI so that i am able to view these changes.

  • option two: However, i am exploring another avenue of running mvn clean install openmrs-sdk:run -DserverId=demo against the server that i setup locally using the openmrs sdk with the latest release of refapp which is 2.13.0 which has the following openmrs-distro.properties.

Do those options help to run and test changes made on openmrs-core? or there’s a better option?

/cc: @kdaud @jwnasambu @jnsereko @dkayiwa

My thinking was that when this command is triggered in the directory of openmrs-core, it will automatically replace the .war file in my server folder which is at {HOME}/openmrs/{servername}}/ and thereafter make the change in openmrs-distro.properties file pointing to the new version of core which is 2.7.0-SNAPSHOT in this case however its not the case, the war file version in both the distro.properties file and server.properties files doesn’t change and the .war file is not replaced.

more on the same: Switching from Hibernate mappings to Annotations - Person Address by mherman22 · Pull Request #4270 · openmrs/openmrs-core · GitHub

After making the changes, go to the webapp folder and run mvn jetty:run or mvn cargo:run. In your modules folder, if you have a module like the legacyui, then its login interface will show up in the browser.

Second option should be to run openmrs-sdk:deploy before the run command, which will deploy the version of core.

Thanks @dkayiwa @ibacher , i have finally got around it with your help. After building core with the changes i made, i ran mvn openmrs-sdk:deploy -DserverId={server-name} which automatically did the following;-

  • Configured Artifact: org.openmrs.web:openmrs-webapp:2.7.0-SNAPSHOT:war
  • Copyied openmrs-webapp-2.7.0-SNAPSHOT.war to /home/mherman22/openmrs/{server-name}/openmrs-2.7.0-SNAPSHOT.war hence replacing the 2.6.0 that i had created with the server.
  • Then successfully deployed the openmrs war file.

Then i ran mvn openmrs-sdk:run -DserverId={server-name} to start the server and it worked like a charm.

2 Likes