A Local Camel Context runtime profile configures how Apache Camel is
invoked to execute a route. A Local Camel Context runtime profile
stores the name of the context file in which your routes are defined, the name of the
main
to invoke, the command line options passed into the JVM,
the JRE to use, the classpath to use, any environment variables that need to be set, and
a few other pieces of information.
The runtime configuration editor for a Local Camel Context runtime profile contains the following tabs:
Camel Context File—specifies the name of the new configuration and the full path of the routing context file that contains your routes.
Main—specifies the fully qualified name of the project's base directory, a few options for locating the base directory, any goals required to execute before running the route, and the version of the Maven runtime to use.
JRE—specifies the JRE and command line arguments to use when starting the JVM.
Refresh—specifies how Maven refreshes the project's resource files after a run terminates.
Environment—specifies any environment variables that need to be set.
Common—specifies how the profile is stored and the output displayed.
The first time an Apache Camel route is run as a Local Camel Context, Red Hat Fuse IDE creates for the routing context file a default runtime profile, which should not require editing.
In Package Explorer, select the camelContext file for which you want to edit or create a custom runtime profile.
Right-click it to open the context menu, and then select Run Configurations dialog.
> to open theIn the context selection pane, select Local Camel Context, and then click at the top, left of the context
selection pane.
In the Name field, enter a new name for your runtime profile.
The Camel Context File tab has one field, Select Camel Context file.... Enter the full path to the routing context file that contains your route definitions.
The Open Resource dialog, which facilitates locating the target routing context file. This dialog is preconfigured to search for files that contain Apache Camel routes.
button accesses theBy default the only command line option passed to the JVM is:
-fa context-file
If you are using a custom main class you may need to pass in different options. To do so, on the Main tab, click the Add button to enter a parameter's name and value. You can click the Add Parameter dialog's Variables... button to display a list of variables that you can select.
To add or modify JVM-specific arguments, edit the VM arguments field on the JRE tab.
By default, the output generated from running the route is sent to the Console view. But you can redirect it to a file instead.
To redirect output to a file:
Select the Common tab.
Click the checkbox next to the File: field, and then enter the path to the file where you want to send the output.
The
, , and buttons facilitate building the path to the output file.