Developing with Eclipse

The Eclipse Classpath

Compiling, debugging, external dependencies, source code completion, searching, auto imports, all rely on a properly configured classpath. When you first create a project, a .classpath file is created in the projects root directory. With the Jetspeed source, we provide you with a ready-to-use Eclipse .classpath file. We have already configured the relative source directories for you. Eclipse provides a .classpath GUI editor from the Project->Properties menu option.

JAR files and the Maven repository

Jetspeed requires quite a few JAR files to be able to compile. The .classpath file that comes with Jetspeed is setup to get its JAR files out of a local Maven repository. You can see all the JAR file dependencies from Eclipse. Go to Project->Properties->Java Build Path->Libraries. Notice all the JAR files are configured as VARIABLE library entries. Take one example:

The Variable is portion is MAVEN_REPO. The Extension portion is /commons-lang/jars/commons-lang-2.0.jar Eclipse locates the JAR dependency from a Variable location root. In order for this classpath to work correctly, the variable root is dependent on a Maven-1 local repository file structure.

To configure the MAVEN_REPO variable, go to Window->Preferences->Java->Build Path->Classpath Variables, click on New, and define a new variable named MAVEN_REPO, pointing it out the root of your local Maven-1 repository, usually someplace like your $$HOME/.maven/repository

Debugging with Eclipse