Instructions for Building Crap4j

Getting Crap4j from Subversion

svn checkout http://svn.crap4j.org/crap4j/trunk crap4j

Building Crap4j with Ant

In the root directory of the checkout, you will find a build.xml. In an ideal world, just type 'ant' in your favorite shell and it should build an update site in the org.crap4j.eclipse.updatesite/build directory. You can then install your freshly built plugin in Eclipse as a local filesystem update site.

Steps

1. Get the source

2. Download and install a crap4j plugin or a junitfactory.com plugin to bootstrap the build. This will install the dependent junitfactory.com components in Eclipse that are not shipped with the src to crap4j.

3. Make sure that Ruby is installed and on your path. The ant scripts currently rewrite the plugin version numbers in the plugin manifests with little Ruby scripts. Surely somebody has written this as an ant task that doesn't require the whole Eclipse sdk. I would like to know to make it easier for anybody to build the whole distribution.

4. Edit the build.number file, which is really a properties file that includes a definition of eclipse_home which points to your current Eclipse. This is used for the necessary eclipse libraries, and for the crap4j plugins.

The main ant file just calls the ant files within each module {org.crap4j, org.crap4j.eclipse, org.crap4j.eclipse.feature, org.crap4j.eclipse.updatesite}.

You launch a build of the distribution with :

ant clean build

This will build each module.

The update site that includes the Eclipse plugins is put in

<installdir>/crap4j/org.crap4j.eclipse.updatesite/build/org.crap4j.eclipse.updatesite_X.X.X.zip.

This is the 'latest.zip' download for doing local Eclipse update site installations, and is the update site hosted on crap4j.org.

The Ant distribution gets put in

<installdir>/ org.crap4j/build/crap4j_ant_cli.jar.

This is the crap4j_ant.jar on the downloads site.

Making an Eclipse project

We recommend checking everything out with subversion, and then importing each directory's project into Eclipse in a fresh workspace. There are Eclipse project files in each module already, but your mileage may vary. Please let us know what works for you and what doesn't.