There are two ways of adding dependencies to your project, as discussed in chapter 4. You can manually add dependencies or you can add the dependency to the POM file (then it will be automatically downloaded).
If you decide to manually add the dependency to the project, then you have to download the library from the following location: http://code.google.com/p/hamcrest/downloads/list
How to do it
Add manual the Hamcrest dependency to the project:
- Download the Java bindings, since we are using Java to create our scripts. \ (Url: http://code.google.com/p/hamcrest/downloads/list)
- Create a (new) folder under the just created project and give it a meaningful name, like
libs(as it will contain the project libraries). Right-click project -> new -> Folder
- Copy hamcrest-all.jar to libs.
- Select the hamcrest dependency in libs, right-click on them, and select Build Path > Add to Build Path. Now, the dependencies are added to Referenced Libraries.
Use maven to manage the Hamcrest dependency
Another option is to put it directly in the
- Right-click on the project and select
Add Dependency. A popup window will appear.
hamcrest-allin the searchfield.
- Select the latest version of
hamcrest-alland click on
Just put the follow snippet between the
<dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-all</artifactId> <version>1.3</version> </dependency>