What you need for this book
This book is best used in conjunction with the example sources found at http://github.com/CamelCookbook/camel-cookbook-examples. You can also get a copy of the code through your account at http://www.packtpub.com.
Tip
From the start we set out with the goal that working code should back up every single recipe. As a result the supporting code base supports multiple variants of each example, all backed up by working unit tests. In fact, if you printed out all of the source code, you would end up with a book nearly four times as thick as the one you are holding!
All of the examples are driven through JUnit tests, and are collectively structured as a set of Apache Maven projects. To execute them, you will need a copy of the Java 6 or 7 JDK (http://www.oracle.com/technetwork/java/javase/downloads/index.html) and an Apache Maven 3 installation (http://maven.apache.org/). Maven will download all of the appropriate project dependencies.
Note
Maven has become the build tool of choice over the last few years within the broader Java community for a number of reasons, including:
- Standard way of laying out projects, leading to a quicker comprehension of a project layout by new developers.
- A set of standard, customizable build plugins that allow the developer to declare what build steps need to be performed at various stages of the build, without worrying about explaining the details.
- A mechanism for working with library dependencies. This has been Maven's largest success, and has become the gold standard approach for dependency management, being reused by numerous other build systems, such as Ant (via the Ivy dependency management extension), Groovy's Gradle, Scala's SBT, and others.
A full coverage of Maven is beyond the scope of this book, but interested readers should take a look at Better Builds with Maven by MaestroDev (http://www.maestrodev.com/better-builds-with-maven/about-this-guide/) for an excellent walkthrough.