10.2. Running routes using Maven


Overview

If the project containing your route is a Maven project, you can use the m2e plug-in to run your route. Using this option, you can execute any Maven goals, before the route runs.

Procedure

To run a route using Maven:
  1. In Project Explorer, select the root of the project .
  2. Right-click it to open the context menu, and then select Run As Maven build.
    • The first time you run the project using Maven the Edit Configuration and launch editor opens, so you can create a Maven runtime profile.
      To create the runtime profile:
      1. Make sure the route directory of your Apache Camel project appears in the Base directory: field.
        For example on Linux the root of your project will be similar to ~/workspace/simple-router.
      2. In the Goals: field, enter camel:run.
      3. Click Apply and then Run.
    • Subsequent Maven runs use this profile, unless you modify it between runs.

Results

The Console view displays the output from the Maven run.

Related topics

Section 10.3.2, “Editing a Maven runtime profile”
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.