Versions Compared

Key

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

...

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

Building a Maven Project

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

Open the window Run > Run Configurations.

Right click on Maven Build and select New.

Setup the new configuration to look like this.

Image Added

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

To execute this, select the project by left clicking on it, and then go to Run > Run Configurations, click on your configuration, and then click the Run button.

The build log should show up in the console window.

Info
titleResolving Dependencies in Eclipse

Should Eclipse be unable to resolve a project's dependencies, try right-clicking on the project in the "Project Explorer" pane and selecting Maven > Update Project OR hitting Alt + F5 while the project is selected.  This should force Eclipse to update its index against your local repository of jar files, and hopefully this will make all the red errors in your editor go away.

Project Source Code Formatting

The HPS collaboration uses a standard code formatting convention for Java based on the Java Code Conventions.

...

Warning
titleTabs are Evil

As a general rule, tabs should never be used in any files within the SVN.  Mixing tabs and spaces creates a formatting mess.  And tabs may appear differently depending on how someone has their editor configured (e.g. tab indentation could be 4 or 8 spaces).  For these reasons, we stick to a rule of spaces only in all source code.

Building a Maven Project

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

Open the window Run > Run Configurations.

Right click on Maven Build and select New.

Setup the new configuration to look like this.

Image Removed

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

To execute this, select the project by left clicking on it, and then go to Run > Run Configurations, click on your configuration, and then click the Run button.

The build log should show up in the console window.

Info
titleResolving Dependencies in Eclipse

Should Eclipse be unable to resolve a project's dependencies, try right-clicking on the project in the "Project Explorer" pane and selecting Maven > Update Project OR hitting Alt + F5 while the project is selected.  This should force Eclipse to update its index against your local repository of jar files, and hopefully this will make all the red errors in your editor go away.

Warning
titleTabs are evil

As a general rule, tabs should never be used in any files within the SVN.  Mixing tabs and spaces creates a formatting mess.  And tabs may appear differently depending on how someone has their editor configured (e.g. tab indentation could be 4 or 8 spaces).  For these reasons, we stick to a rule of spaces only in all source code.