Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
Note: If you get the following error while trying to check out the code, switch the SVN URL from http to https. (i.e. https://svn.openmrs.org/openmrs/trunk)
checkout http://svn.openmrs.org/openmrs/trunk -r HEAD --depth=infinity --force
RA layer request failed
svn: REPORT of '/!svn/vcc/default': Could not read status line: connection was closed by server (http://svn.openmrs.org)
There are five projects shown in the workspace: openmrs, openmrs-api, openmrs-test, openmrs-tools, openmrs-web, and openmrs-webapp. The openmrs project is a parent project. When we run any maven goal on the parent project, it will run the same goal on its children, according to the dependency order. A Maven menu item is added on the context menu, which lets you modify the pom.xml, manage dependencies and plugins, etc. Common maven goals are also added on the menu items Run As and Debug As. You can also create your own Maven Run Configurations.
To re-run the build, right click the root project to bring up the context menu, select "Run as -> Maven build." If you have multiple configurations, select the "clean install" one to run.
To manage these configurations, right click the root project to bring up the context menu, select "Run as -> Run configurations...". Select the configuration under the Maven Build section.
If you want to run all tests across modules, select Openmrs project and right click to bring context menu, select "Run As → Maven test"
If you want to run all tests in one module, select that project and right click to bring context menu, select "Run As → Maven test"
If you want to run a single test class,right click on test class and select "Run As → Junit test"
Create a run configuration by click "Run → Run Configurations", select Maven Build and click "New launch configuration", type Name "OpenMRS", select working directory to be the root of webapp project, type goal "jetty:run" and save. Now you select "OpenMRS" and run or debug it.
On the JRE tab, in the VM parameters box, you will want to put in your memory parameters, e.g.
If on running, you get error messages including this: "java.net.BindException: Address already in use", most likely the default 8080 port is in use. You may want to change to any other different port for jetty. For instance if you want to change to port 8081, then on the JRE tab, in the VM parameters box, add something like this: -Djetty.port=8081
Set up a run configuration as specified in "How to Run Web Application" but in the JRE tab, set the -agentpath VM option as specified in the YourKit docs. Common values:
(This assumes you have YourKit installed already.)
Jetty plugin can pick up any changes of static resources, so changes of jsp, property or css files don't require a restart. However changes of java class will have to restart. The following solutions could help in some situations.
Not yet documented.
Not yet documented.
Here is how you configure JRebel to work with OpenMRS
Tick "Use Step filters" and also add com.zeroturnaround.* and org.zeroturnaround.* to the filters Tick "filter synthetic fields"
When you change any java classes, just wait for eclipse auto build to finish, reload the web page, and JRebel will reload the class for you.