Develop with Eclipse

These steps assume that the '~/workspaces/hippo-adapter' directory is your eclipse workspace directory.

For the time being this project should remain jdk1.4 compliant: Install the latest jdk1.4 distribution, and set it as the default JRE in the "Window, Preferences, Java, Installed JREs" dialog, also set the 'compiler compliance level' to 1.4 in the "Window, Preferences, Java, Compiler" dialog. That will take care that eclipse will build 1.4 compliant classes.

Start eclipse, create a 'simple project' for each main directory using the 'new project wizard'.

Tell eclipse where to find maven by defining an eclipse 'classpath variable' using the "Window, Preferences, Java, Build path, Classpath variables" dialog: Name = MAVEN_REPO, value = the directory location of your local maven repository

Generate eclipse .project and .classpath files for all projects by running the 'maven eclipse-project' command. Before you can run this command the projects need to be installed in your local maven repository.

~/workspaces/hippo-adapter/build> maven install
~/workspaces/hippo-adapter/build> maven eclipse-project
      

Go back to eclipse and refresh all projects.

Tell eclipse what the internal project dependencies are: the three implementation projects are dependent on the 'hippo-repository-adapter-api' project and the 'test' project is dependent on all other java projects. So for each project, except for 'build' and 'hippo-repository-adapter-api' do the following:

  • Open the "Project, Properties, Java build path" dialog.
  • On the 'libraries' tab, remove all 'MAVEN_REPO/hippo/*' entries
  • On the 'projects' tab, add the corresponding projects.

The integration tests in the test project can be run from eclipse as any 'ordinary' unit test in the projects themselves provided you have configured them correctly as described in the section about testing.