8 Developing Camel projects

 

This chapter covers

  • Managing Camel projects with Maven
  • Developing Camel projects in the Eclipse IDE
  • Debugging with Camel
  • Creating custom components
  • Using the API component framework
  • Creating custom data formats

At this point, you should know a thing or two about how to develop Camel routes and how to take advantage of many Camel features. But do you know how to best start a Camel project from scratch? You could take an existing example and modify it to fit your use case, but that’s not always ideal. And what if you need to integrate with a system that isn’t supported out of the box by Camel?

This chapter shows you how to build your own Camel applications. We’ll go over the Maven archetype tooling that allows you to skip the boring boilerplate project setup and create new Camel projects with a single command. We’ll also show you how to start a Camel project from Eclipse when you need the extra power that an IDE provides. We'll even show you how to debug your new Camel application.

After that, we’ll show you how to extend Camel by creating custom components. Creating custom components around large APIs isn’t easy, so we’ll also discuss Camel’s solution to this problem: the API component framework. This framework can generate a near fully functional component just from scanning an arbitrary Java API. Finally, we’ll wrap up by discussing custom data formats.

8.1 Managing projects with Maven

8.1.1 Using Camel Maven archetypes

8.1.2 Using Maven to add Camel dependencies

8.2 Using Camel in Eclipse

8.2.1 Creating a new Camel project

8.3 Debugging an issue with your new Camel project

8.4 Developing custom components

8.4.1 Setting up a new Camel component

8.4.2 Diving into the implementation

8.5 Generating components with the API component framework

8.5.1 Generating the skeleton API project

8.5.2 Configuring the camel-api-component-maven-plugin

8.5.3 Setting advanced configuration options

8.5.4 Implementing remaining functionality

8.6 Developing data formats

8.6.1 Generating the skeleton data format project

8.6.2 Writing the custom data format

8.7 Summary and best practices