OpenMRS-Dev1

From Foss2Serve
Revision as of 02:57, 22 June 2016 by Tom.naps (Talk | contribs)
Jump to: navigation, search

Howard Francis, based on group work started at the September 2015 POSSE, describes a virtual machine that has the OpenMRS-core as downloaded from the OpenMRS github repo. He then installed Eclipse on the VM so that he and his students could develop for the OpenMRS-core directly within the VM. Howard's VM is described at OpenMRS-Dev.

I took a slightly different approach with the VM I describe below. I also started with the VM developed at POSSE 2015. However, feeling that development within the OpenMRS core was too complicated, I instead had my students work on developing an OpenMRS module as described at the OpenMRS Developer Guide and Using the maven archtype wizard. This meant that I only had to have my students run the VM as an OpenMRS-core JSP server with a MySQL DB on the backend. My students could compile the module they were working on using their own workstation, which was also the host machine for the VM running the OpenMRS server. Hence they could use whatever IDE they felt most comfortable with in developing that module. Once the module was built on the host machine, the resulting OMOD file could be transferred to the ~/.OpenMRS directory on the VM using SFTP as described in the CS50 appliance manual.

To see how this works, download my virtual machine from [1] (about 2.5 GB). Import and start the virtual machine. Then open a terminal and start the OpenMRS JSP server by typing:

 $ cd openmrs-code/webapp
 $ mvn jetty:run

On the VM, I've put a working version of the "Add-a-department" module described under Customize Your Module in the OpenMRS Developer Guide. You'll find the source code for this module in a directory ~/OpenMRS-module-development/Department/department on the VM. If you copy this directory to your host machine, this will be the source code that your students can compile and build to get the OMOD module file. To build the module, just type

 $ mvn clean install -Dmaven.test.skip=true

in this directory. You will find the resulting OMOD file in the file omod/target/department-1.0-SNAPSHOT.omod. This is file that you can transfer to the ~/.OpenMRS directory on the VM to install the module on the server.

Personal tools
Namespaces
Variants
Actions
Events
Learning Resources
HFOSS Projects
Evaluation
Navigation
Toolbox