This week I worked on installing the openMRS SDK along with cloning building and running the openMRS-core[0] codebase this week. To do this I needed to install mySQL and maven as prerequisites for the project.
Installing mySQL and maven were pretty simple thanks to the package installer homebrew[1]. If you are using a Mac and haven’t heard of homebrew i suggest you look into it. It makes installing maven as easy as: “brew install maven”. There is also a homebrew package for mySQL so I installed mySQL the same way. Once I had the two installed I added the variables M2_HOME and MYSQL_HOME to my .bash_profile to remember where they are.
I had issues with my Terminal only recognizing java 1.6 even though when I did a check through the Java website it said that I had version 7. What I had to do was go to the Oracle website and download and install the Java 1.7 JDK. Once I did that the terminal reflected the correct version.
After this I went to github and forked the openMRS-Core [0] then cloned it to my local. Once in my local I changed to the repository and ran “mvn clean install” this built the code to the ‘target’ directory in the project.
Next was to run the project. I ran the “mvn jetty:run” command, then went to the localhost url, and did the initial setup.
After doing the initial setup, which created the DB, I am no longer able to successfully do a “mvn jetty:run” I will have to look into this more this week.
From the blog A blog about things by TRStaake and used with permission of the author. All other rights reserved by the author.