You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The following instructions will enable you to get Geronimo into the Eclipse 3.2 workspace as an eclipse project. You will be able use eclipse to make code changes and run Unit tests. For purposes of this discussion the development OS is Windows. Please adjust these instructions for your environment.

Pre-requisites

Install the software required for #Building Apache Geronimo with Maven 2 and follow the instructions to build Geronimo.

Creating Eclipse Projects

You could import all the geronimo projects or subprojects in the workspace. But a more efficient way is to import only the modules that you want to work on.

Working with a single module

If you are planning to modify a single geronimo modules, you can import only that module in the workspace by runnning the following commands:

cd modules\a_module   or   cd maven-plugins\a_plugin
mvn -o eclipse:eclipse

Working with multiple modules

It is advised that the first time users import all the modules.
Generate the Eclipse projects for geronimo subprojects by invoking the following command from the top directory:

mvn -o eclipse:eclipse

Useful Information

It is possible to import only a few modules in the workspace by running the above command from each of the modules directory and editing the .classpath file. This is meant only for advanced users.

Firing up Eclipse

  • Import the project(s) to eclipse workspace using:
    File --> Import --> Existing Projects into Workspace
    
    Select project or projects depending on how you created the project in the #Creating Eclipse Projects step.
  • Set the Maven Classpath variable M2_REPO to tell Eclipse where the Maven repository is by selecting the "New" setting in
    Window --> Preferences --> New
    
    Enter M2_REPO and set it to c:\.m2\repository\
  • IF you are working on a builder module, i.e. tomcat-builder, you must add xmlbeans classes to the build path.
    Select "Add Class Folder" by doing the following:
    Project --> properties --> Java Build Path --> Libraries --> Add Class Folder
    
    Check target/clover/classes folder from the selection.
  • To prevent Eclipse from copying the .svn directories to the output folder of projects, do the following:
    Expand 'Output folder' setting using
    windows --> Preferences --> Java --> Compiler --> Building --> Output folder
    
    Append ,*.svn to the ''Filtered Resources'' field.
  • If you plan on contributing code or patches to the project, please configure eclipse to not use tabs by doing the following:
    windows --> Preferences --> Java --> Code Style --> Formatter --> Java Conventions [built-in]
    
    Click on "Show". Under Indentation select Tab policy as "space only". Enter a new name for this profile and click "ok".

Other Useful Information

If you plan on contributing code or patches to the project please configure your subversion client and follow the coding conventions described here:

  • No labels