Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Run the follow command from the command line at the root of the SVN checkout:
mvn eclipse:configure-workspace -Declipse.workspace=<path-to-eclipse-workspace>

Start Eclipse using the Configured Workspace

On starting Eclipse, select the <path-to-eclipse-workspace> used in the previous step.
If Eclipse is already started, switch the workspace by File -> Switch Workspace -> Other... and select the workspace path.

...

The Maven executable path should be entered as the Location either as the full path or as a variable.
To create the variable, select Variables... -> Edit Variables... -> New...
Enter a name with the value being the path to the Maven executable bin/mvn

...

Select the newly created variable name for the Location, and enter the path to the OpenMRS svn checkout as the Working Directory.
Enter the Arguments for the eclipse command:
eclipse:eclipse --batch-mode -DdownloadSources=true

Refresh the workspace after running the commands by selecting the Refresh tab and 'Refresh resources upon completion'

...

Apply the External Tools changes and Run. Output from the command with appear in the Console.
After running, the Maven tools are available in the External Tools dropdown.

...

Follow the same steps for adding other Maven commands.
For the build command, enter these the Arguments:
clean install --batch-mode

Generate Eclipse Projects

...

If using the command line run:
mvn eclipse:eclipse -DdownloadSources=true
If running from the command line, manually update the projects in Eclipse by selecting them all, right-clicking, and selecting Refresh.

...

A suggestion is to use the Java perspective with the Referenced Libraries node.
Change the perspective by Window -> Open Perspective -> Java

...