Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Introducing IDE support for Apache Camel K Modeline

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

Share:

    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

    • Why some agentic AI developers are moving code from Python to Rust

    • Confidential VMs: The core of confidential containers

    • Benchmarking with GuideLLM in air-gapped OpenShift clusters

    • Run Qwen3-Next on vLLM with Red Hat AI: A step-by-step guide

    • How to implement observability with Python and Llama Stack

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    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
    © 2025 Red Hat

    Red Hat legal and privacy links

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

    Report a website issue