To build James V3 in eclipse, read http://james.apache.org/server/3/dev-build.html

A Rough Guide to James Development Using Eclipse

Follow these steps to develop James code using the Eclipse IDE. Use the Eclipse Help and Tutorials to more fully understand the Eclipse concepts and actions described here.

Download and Install Eclipse

Eclipse can be obtained from http://www.eclipse.org/. Follow the installation instructions that come with the download.

NOTE REGARDING CVS

The CVS sections are obsolete. The ASF is migrating to Subversion. We encourage anyone who uses Eclipse with SVN to update this page to provide the appropriate process.

The JAMES project is rooted at svn.apache.org/repos/asf/james. The main development branch for the server is svn.apache.org/repos/asf/james/server/trunk.

Those unfamiliar with Subversion would benefit from the Version Control with Subversion.

Download and install the Subversion plugin for Eclipse

This can be done by downloading it from http://subclipse.tigris.org/ or by adding http://subclipse.tigris.org/update_1.0.x as an update site in the Eclipse update manager (which you can find in the Help menu).

Connect to the Apache SVN repository

and click on 'Finish'.

Check Out James from the Apache SVN repository

Verify Checkout

Before attempting to configure Eclipse, verify that you have everything you need by running a build of James outside of Eclipse. This will fetch, or prompt you to fetch, any missing components.

Modularisation

JAMES trunk is a series of modules (See Modularisation). Each module should be a separate project in Eclipse. It is usually convenient to use a separate workspace for JAMES.

Start by creating a new user library containing all the jars in stage except those starting james-server-*. All projects will need to add this library. The modules use the conventional Maven 2 layout so it's best to set up the defaults for source to src/main/java -> target/classes and src/test/java -> target/test-classes.

For example module, a project needs to be created in Eclipse. This is a slighty labourous process.

Build, Test and Debug Code

As James is a server application I prefer to transfer my updated files to a remote machine, run James' Ant build script (build.bat or build.sh) on the remote machine to update the distribution and then use the Eclipse remote debugger to test. This means that the build, deployment and execution are being tested as they will be used and any changes validated. You can use another session on your local machine as the 'remote machine', the JVM is still 'remote' from the one used by Eclipse. The JVM pointed to by the JAVA_HOME environment variable for the session used to build and run James must be v1.4.0 or above. To debug remotely:

Read the Eclipse Help to understand the many facilities now at your fingertips.

Release patches

Eclipse is able to build patches against the code stored in the SVN repository. This makes patch creation very easy. Still, remember that the code in the repository may have changed since you imported it. Use the SVN Perspectives Synchronisation feature to ensure you are up-to-date before creating a patch. Eclipse offers the ability to generate a patch that includes new files. This does not work when the new file is in a new directory! It is safest to work in the more conventional manner, building a patch for changed files and submitting new files separately.

To create a patch:

You have created a patch!

EclipseNotes (last edited 2011-07-22 08:28:51 by EricCharles)