Versions Compared

Key

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

...

You will also want to install the m2eclipse plugin for Maven support and Subversive which provides a Subversion client interface.

Before You Start

Before you start to setup Eclipse, you should follow the instructions at Installing HPS Java to install locally the HPS Java trunk, which contains the various modules that will be loaded as projects.

Installing Eclipse

The "Eclipse Standard" distribution can be downloaded from the Eclipse downloads area.

...

No Format
http://download.eclipse.org/technology/m2e/releases

Creating a New

...

Warning
titleTODO

This section needs to be re-written according to the current best practice, which is creating a New Java Project from a module in the trunk, which has already been checked out.

 

In order to import source code from SVN into Eclipse, select the menu item Window > Open Perspective > SVN Repository Exploring.

Right click in the SVN Repositories pane on the right-hand side of the screen and select New > Repository Location.

Configure the New Repository Location wizard as follows:

Image Removed

The User value should be your actual SVN account username and the Password field should be your password.

Click Finish to save this location.  

Next, expand the new repository until you find the module that should be checked out, right click on it, and select Find/Checkout Out As.

Image Removed

...

Java Project

To create a new project in Eclipse, you can select File > New > Java Project from the menu.  This will start a wizard for creating the new project.

We will create a project for the users module where miscellaneous user analysis code is located.

In the New Java Project window, you need to do the following.

  1. Type the name of the project in the Project name text box, e.g. "hps-users".
  2. Uncheck Use default location and navigate to the root directory of the module for the project using Browse.
  3. Add the project to a working set (optional).

Image Added

Then click on the Finish button and the project should now show up in the Package Explorer within the Java View

In the New Project window that comes up, select Java Project from the list (should be at the top), and click Next.

Put a name for the project under Project name, according to your preference, and then click Finish.

Switch back to the Java perspective where the project should show with the name you selected in the left-hand Project Explorer tab.

Right-click on the project and select Properties from the drop down list.  In the Properties window, click on Java Build Path and configure it to look like this.

Image Removed

First, the existing folder should be removed so that there is nothing listed in the Source folders on build path area. 

Then the two folders src/main/java and src/test/java should be added using Add Folder.

Image Removed

Click OK in both windows and the project should be reconfigured so that the correct Java packages are found successfully now.

The project, e.g. hps-java, should look something like the following now.

Image Removed

Finally, enable Maven builds for this project by right-clicking on it in the project pane and selecting Configure > Convert to Maven Project.

Building Projects in Eclipse

It is useful to create a custom build configuration for executing Maven goals on the project.

Open the window Run > Run Configurations.

...

Setup the new configuration to look like this:.

In order to use this, automatic builds must be turned off, which can be done from the menus by deselecting Project > Build Automatically.

...