Hamcrest GWT

Abstract: The largest parts of the Hamcrest library can be compiled in GWT. Just the IsInstanceOf class needs a bit of tweaking (as well as some other classes depending on reflection). The following provides a brief overview of some of the steps required to compile Hamcrest with GWT.

  1. 1. Download the Hamcrest GWT SVN Branch (Hamcrest GWT subversion branch) and import to eclipse


  1. 2. Clean up the build path (remove the generated folders and remove all other source folders but core, library and gwt)
  2. 3. Copy the classes from the gwt folder into the respective packages in the core folder

4. Import a generated CoreMatchers.java from some distribution (eg from hamcrest-all.jar)


Issue 50: Hamcrest GWT support
Hamcrest GWT subversion branch
Google Group Discussion on Hamcrest GWT version

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s