...
Checkout Source and Create Project:
Panel |
---|
|
...
|
- Clone the repository, select a parent directory
- IntelliJ will give a prompt to configure the detected frameworks
Panel |
---|
Develop with Maven
There are three modules defined in maven project, openmrs-api,openmrs-web and openmrs-webapp. OpenMrs is a parent project. When we run any maven goal on parent project, it will run the same goal on its children according to the dependency order. Common maven goals are shown under Lifecycle node. There are also goals provided by maven plugins which are shown under Plugins node.
...
Create a run configuration by click "Run -> Edit Configuration", click + and pick "Maven", type Name "OpenMRS", select working directory to be the root of webapp module, type goal "jetty:run" and save. Now you select "OpenMRS" and run or debug it.
Current configuration of Jetty is that it will reload static resources like jsp, javascript files etc. If there is any java class change, It will require to run maven:compile goal and restart Jetty.
...
- Install JRebel plugin for Intellij IDEA and restart.
Configure JRebel plugin for Intellij IDEA.
Specify location of JRebel installation
Untick "synthetic fields"
In Settings > Debugger > Java ; Untick "Synthetic Fields"
In Settings > Debugger > Stepping ; Tick "Skip Synthetic Methods"
Tick "Skip synthetic methods" - Configure JRebel by running JRebel Configuration Wizard.
Select "Intellij 8x or later", tick "Use maven to build my application", tick "I run the server from my IDE"
Untick "Spring Framework Plugin" - Run or Debug "OpenMRS" with JRebel from "Run -> Run/Debug with JRebel"
...