Summer is over, and it’s time to really get to work on my Sabbatical project.
I did do some work this summer – I’ve read 3 of the books on my Sabbatical Reading List (and added a few more to the list) and I’ve finally de-lurked on the OpenMRS developer mailing list and in some of the online meetings, and I’ve made a decision to convert all of my course materials to Markdown (the better to track changes on GitHub – see a future post). But, it’s all been pretty passive.
So, the Friday before the Labor Day Weekend, I decided it was time to get back to the “develop code in OpenMRS” part of the project.
Since it had been a couple of months since I had set upÂ my development environment and tried to build the OpenMRS code, I decided that starting over from scratch (mostly) would not be a bad idea. Here is what I did:
- Read OpenMRS’s Getting Started as a Developer wiki page. I had already set up my OpenMRS ID, and signed up for the developer mailing list. I already had a GitHub account, as well.
- Read Development ProcessfromOpenMRS Developersâ€™ Guide, and got the code:
- Fork openmrs-core repository.
- Clone my fork onto my computer.
- Set the OpenMRS repository as my upstream remote so that I can pull changes from the main project into my local working copy.
- Set up development environment based on Get Set Up from the OpenMRS Developers’ Guide. I chose the section on Manual Installation because Iwantto be able to develop code fortheOpenMRS core application. I followed the general outline of this section, but went about some of the software installations differently.
- Install MySQL. Because I am setting up my development environment on a Mac, I installed MySQL using Homebrew
- Install Maven using Homebrew
- Install Git using Homebrew (actually, I already had Git installed, but I made sure it was up-to-date)
- BuildtheOpenMRS code:
cd openmrs-core maven clean install
- RuntheOpenMRS web app through the jetty server:
cd webapp mvn jetty:run
- The first time you run the web app, it will take you through the Setup wizard
- Set up Eclipse. I already had Eclipse installed, but I made sure that my version was up-to-date. Eclipse had been updated to a new major version (Luna) since the last version I installed (Kepler). 1
- Git IDE Integration: Since EGit is already installed in current versions of Eclipse, and I’ve already forked and cloned the repository, I really only needed to do the To import as a Maven project section, to get the the projected into Eclipse.
- Build the OpenMRS code under Eclipse. I followed the steps in the following section:
- How to run the build
- How to run Junit
- How to Run Web Application
Now that I have a working environment that builds and runs, the next step is to choose a ticket to work on.
- In the past, I had just downloaded the newest version, and replaced what I already had installed. I figured that there must be a way to do the update without having to reinstall and reconfigure all of my plugins. It turns out that you can add the release’s repository to the Available Software Sites: http://wiki.eclipse.org/FAQ_How_do_I_upgrade_Eclipse%3F ↩