Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Introducing IDE support for Apache Camel K Modeline

August 31, 2020
Aurélien Pupier
Related topics:
JavaMicroservicesServerlessKubernetes

    Apache Camel K is a lightweight integration framework built on Apache Camel that runs natively on Kubernetes. Camel K is designed explicitly for serverless and microservices architectures and allows you to run an integration written in Camel DSL on your cloud.

    Since Apache Camel K 1.0.0, it has been possible to specify the configuration options for starting an integration route using Apache Camel K Modeline. Just place a single comment line, // camel-k:, at the top of your config file. Using this method allows you to specify a relatively complex integration project in a single file.

    Until now, you could only access these configuration options through the command line. In this article, I introduce the new IDE support for Apache Camel K's Modeline configuration.

    IDE support for Camel K Modeline

    Thanks to the Apache Camel Language Server, you can now use an extension to add Camel K Modeline support to Visual Studio Code (VS Code), Eclipse desktop IDEs, and Eclipse Che.

    The most useful Modeline options are available as completions. As shown in Figure 1, you can use the hover feature to view the completions and documentation for these features in VS Code.

    A screenshot of the completion for a Modeline option name.
    Figure 1: Use the hover feature to view Modeline completions in your IDE.

    Let's take a look at the completions and definitions for three key options available with the Modeline configuration: trait, dependency, and property.

    Trait

    The trait option proposes a completion for trait definition names and trait property names. Hovering over a trait name or property name displays its documentation. Figure 2 shows all of the trait completion options and a definition for one of them.

    Completion trait definition name
    Figure 2: Trait completion options and a definition.

    Figure 3 shows the completion options and a definition for a trait property.

    Completion trait property name
    Figure 3: Trait property completion options.

    Dependency

    The dependency option suggests Camel artifact IDs and a template for other Maven-specified dependencies, as shown in Figure 4.

    Completion dependency
    Figure 4: The completion options for Camel and Maven dependencies.

    Property

    The property option offers completions for Camel components and properties. You can use the hover feature to view the documentation for any selected element. Figure 5 shows the completion options for Camel components.

    Completion Camel component name
    Figure 5: Hover over a component to view its definition.

    Even an integration that requires specific configurations can be contained in one file.

    Figure 6 shows the completion options for a Camel property.

    Completion Camel component property
    Figure 6: Hover over a property to view its definition.

    Overriding configuration options during development

    Modeline's configuration includes the production configuration, which is a useful feature. During development, you can use additional or different parameters. You can manually launch the integration from the command line with the additional parameters. Doing this avoids modifying the source code.

    If you want to launch the same configuration multiple times or share a specific configuration in development with colleagues, you can use VS Code tasks for this purpose. To do this, create a file in your project named tasks.json and place it in a vscode folder. You should then be able to use completions to access VS Code tasks that are specific to Camel K.

    Here's an example:

    {
      "version": "2.0.0",
      "tasks": [
        {
        "label": "Start in dev mode Camel K integration opened in active editor",
        "type": "camel-k",
        "dev": true,
        "file": "${file}",
        "problemMatcher": []
        }
      ]
    }
    

    If you enter the Camel K options that you need, completions provide the available options. When you call the "Start Apache Camel K integration" command, you can set the "use predefined task" option to launch your task with the configuration that you require.

    Last updated: August 27, 2020

    Recent Posts

    • Protect data offloaded to GPU-accelerated environments with OpenShift sandboxed containers

    • Case study: Measuring energy efficiency on the x64 platform

    • How to prevent AI inference stack silent failures

    • Preventing GPU waste: A guide to JIT checkpointing with Kubeflow Trainer on OpenShift AI

    • How to manage TLS certificates used by OpenShift GitOps operator

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.