Oddjob in Eclipse Setup

A failed hard drive has meant a new install of Eclipse. It’s reminded me that although the Eclipse project and classpath files and other settings are on GitHub a few tweaks to Eclipse are still necessary to work with Oddjob.

First you need EGit which you can find on the Eclipse Marketplace. Then clone and import the 10 Git Repositories that make up Oddjob’s core release. The EGit Documentation -> Tasks -> “Starting from existing Git Repositories” explains this well. The Oddjob assembly process relies on all the projects being checked out in the same directory but this is the natural thing to do anyway.

Once imported Eclipse will probably have tried to build the new projects and will be reporting some errors. To fix these you need two additional tweaks.

1. The JDK tools.jar is needed for Oddjob’s bespoke Doclet Tags. This needs adding to the JDK default libraries.

Eclipse JDK Libaries for Oddjob

2. The oj-jsf project is set up as an Eclipse Dynamic Web Module with the arooa and oddjob projects set up as part of the Web Deployment Assembly. This causes the arooa and oddjob projects to have a dependency on Tomcat. The easiest fix is just to download Tomcat 7 and add the runtime.

Eclipse Server RuntimesYou can run Oddjob from Eclipse by running the org.oddjob.Main class. To get Oddjob to load the mail/ftp/ant etc Oddballs the Oddball path must be specified explicitly (because they are not in a child oddballs directory). Here’s a screenshot of my Oddjob Runtime Configuration

Oddjob Main Runtime Configuration

And here’s that path again so that you can cut and paste:

-op ${workspace_loc:projects.oj-ant};${workspace_loc:projects.oj-examples};${workspace_loc:projects.oj-hsql};${workspace_loc:projects.oj-mail};${workspace_loc:projects.oj-net};${workspace_loc:projects.oj-spring};

Run this and Oddjob Explorer should launch.

Using this Oddjob Explorer, you can open the oj-assembly/oddjob.xml file and run it and this will build the full Oddjob distribution archives.