Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: various improvements, especially about eclipse 4.2

...

MySQL is the database software most people use for the OpenMRS database. You should know your MySQL root password, or have a database ready with username and password to install OpenMRS into.

Eclipse

...

4.

...

2.x (Juno)

...

Instructions

Eclipse IDE for Java EE Developers is  is the recommended Java development environment. Get the latest stable release (though OpenMRS should still function on older versions that can use Maven integration). Eclipse does not have built in 4.2.2 includes support for SVN, Git or Git, but not for Maven so these it must be added via plugins. We recommend Eclipse 3.8 Some OpenMRS modules are still in SVN instead of Git, so if you need to access them, you will want to install SVN plugins as well.  We recommend Eclipse 4.2 (Juno). However, the following installation instructions would also work on Eclipse 3.7 (Indigo) . If - just pay attention to which plugins you need with which version (and note there's a "shortcut" described below if you have a clean 3.7 install and want to just get all the additonal plugins in one go). If you are already running Eclipse 3.6 (Helios) and want to do OpenMRS development from there, see our our old instructions.

Panel
titleBGColor#AAF
titleHow to install Eclipse plugins Automatically (recommended)

This method is supposed to be used with a clean Eclipse installation (just downloaded from eclipse.org) and not a one that has some plugins already installed by you.

  1. Download this file.
  2. Extract the zip file to the eclipse/dropins directory.

 

Panel
titleBGColor#CCC
titleHow to install Eclipse plugins Manually

If the above method does not work for you, plugins can be installed manually. 

Points of Interest

  • When installing the plugins, please follow the order specified below.
  • You should restart Eclipse as prompted after installing each component.
Installing the maven plugin (needed with all versions of eclipse)
  • Navigate to Help -> Eclipse Marketplace
  • search for "maven" via the search box.
  • select Maven Integration for Eclipse by Eclipse.org, EPL from the retrieved options
  • Install with all sub-options selected
  • Install
Install the git plugin (needed if you do not have 4.2, required for checking out the core OpenMRS code. Recommended for OpenMRS module development)
  • Navigate to Help -> Eclipse Marketplace
  • search for "git" via the search box.
  • select EGit - Git Team Provider by Eclipse.org, EPL from the retrieved options
  • Install with all sub-options selected
Install the Subversive plugin (Only needed for older projects still stored on svn.openmrs.org)
  • Navigate to Help -> Eclipse Marketplace
  • search for "subversive" via the search box.
  • select Subversive - SVN Team Provider by eclipse.org, EPL from the retrieved options
  • Install with all sub-options selected
Install an Subversive connector for the Subversive plugin (Only needed if you installed the above subversive plugin)
  • Once you restart Eclipse following the installation of Subversive, you will be automatically be prompted to install an Subversive connector.
  • From the options displayed by Subversive Connector Discovery, select SVN Kit 1.3.7
  • Install
Install the scm connector plugin (Only needed if you installed the above subversive plugin)
  • Navigate to (Window ->) Preferences -> Maven -> Discovery
  • choose Open Catalog
  • search for "scm" via the search box.
  • select m2e connector for maven-scm-plugin
  • select m2e-subversive
  • Install
OpenMRS Behavior Test
Case
Generator (optional)
Panel
titleBGColor#AAF
titleInstall Eclipse plugins Automatically, if you have a clean install of 3.7 (Indigo)

This method is supposed to be used with a clean Eclipse 3.7 (Indigo) installation (just downloaded from eclipse.org) and not one that has some plugins already installed by you.

  1. Download this file.
  2. Extract the zip file to the eclipse/dropins directory.

Congratulations, if the above steps were successful, then Eclipse has been configured and is ready for use.

...

It will compile, run tests, build all artifacts and install them to your local repo.

Running OpenMRS

Go to the Be sure you have MySQL running. Also, it is highly recommended to increase the memory available by following the steps in the Maven setup, or see Troubleshooting Memory Errors. Go to the webapp directory and run:

...

If the module's source code is in Git, follow the the Using Git instructions. If the module's source code is in subversion and the module is mavenized (i.e. it has a pom.xml file) then you should follow the same process described for the core code.

...

To create a new module, we recommend recommend Using Git and  and Using the Module Maven Archetype.

...