Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you prefer to use an IDE then you can auto-generate the IDE's project files using maven plugins. e.g.

IntelliJ

Code Block
mvn eclipse:eclipse
idea:idea

Eclipse

There are several ways to import the projects into Eclipse.

m2e

At this point, usage of the m2e plugins to import Camel into Eclipse is untested and unsupported. Patches, notes, etc... to help get this supported would be more than welcome.

maven-eclipse-plugin

The maven-eclipse-plugin can be used to generate the .classpath/.project/.settings file that Eclipse need. To do this, run:or

Code Block
mvn idea:idea

...

process-test-sources eclipse:eclipse

or

Code Block
mvn -Psetup.eclipse -Declipse.workspace.dir=/path/to/your/workspace

You can also find some helpful notes on usage here.

Importing into Eclipse

...

The latter is recommended as it would completely setup the workspace for you as well as provide options to wire in other projects also found in your workspace.

After running the above command, from within Eclipse, do "File -> Import -> Existing Projects into Workspace", select the root camel checkout location and Eclipse should find all the projects.

Adding Camel Eclipse templates to your workspace

The above mentioned setup.eclipse profile does a few additional things to your workspace:

  1. Adds the Camel code templates (see here)
  1. Sets the M2_REPO variable in the workspace that points to your local Maven repository (i.e., ~/.m2/repository on Unix and c:\Documents and Settings\<user>\.m2\repository on Windows) which allows the jars to be resolved.
Hint: specify the workspace location in your .m2/settings.xml

You can also get Maven to do this for you:can add a profile to your .m2/settings.xml to specify your eclipse workspace location so you can avoid having to type that each time you need to update the projects.

Code Block
xml
xml

<profiles>
    <profile>
        <id>setup.eclipse</id>
        <properties>
            <eclipse.workspace>/path/to/your/workspace</eclipse.workspace>
        </properties>
    </profile>
</profiles>
Code Block

mvn eclipse:configure-workspace -Declipse.workspace=/path/to/the/workspace/ 

Building with checkstyle

To enable source style checking with checkstyle, build Camel with the -Psourcecheck parameter

...