Skip to content
CONTEXT MAPPER
  • Docs
  • Language Reference
  • Generators
  • News
  • Background
  • Get Involved
    Introduction
    • Welcome
    • Getting started
    • Create CML Project
    • Examples
    • Usage as Library
    • Frequently Asked Questions
    Language Reference (Core)
    • CML Reference - Introduction
    • Language Semantics
    • Context Map
    • Bounded Context
    • Domain and Subdomain
    • Domain Vision Statement
    • Partnership
    • Shared Kernel
    • Customer/Supplier
    • Conformist
    • Open Host Service
    • Anticorruption Layer
    • Published Language
    • Responsibility Layers
    • Knowledge Level
    • Aggregate
    • Tactic DDD Syntax
    • Application and Process Layer
    • User Requirements
    • Stakeholders
    • Value Registers
    • Imports
    Analysis and Design Transformations
    • Rapid Object-oriented Analysis and Design
    • Story Splitting (PoC)
    • Stakeholder and Value Modelling Transformations
    Architectural Refactorings (ARs)
    • Architectural Refactorings
    • AR-1: Split Aggregate by Entities
    • AR-2: Split Bounded Context by Features
    • AR-3: Split Bounded Context by Owner
    • AR-4: Extract Aggregates by Volatility
    • AR-5: Extract Aggregates by Cohesion
    • AR-6: Merge Aggregates
    • AR-7: Merge Bounded Contexts
    • AR-8: Extract Shared Kernel
    • AR-9: Suspend Partnership
    • AR-10: Change Shared Kernel to Partnership
    • AR-11: Change Partnership to Shared Kernel
    Value-Driven Analysis and Design
    • Value-Driven Analysis and Design (VDAD) Support
    Service Cutter
    • Context Map Suggestions with Service Cutter
    • Service Cutter Configuration File (.servicecutter.yml)
    Reverse Engineering
    • Context Map Discovery
    Generators
    • Generators Overview
    • Context Map Generator
    • PlantUML Generator
    • BPMN Sketch Miner Generator
    • MDSL (Micro-)Service Contracts Generator
    • Service Cutter Generators
    • Generic Generator (Templating)
    Tutorials
    • Model Event Storming Results in Context Mapper
    • Event Sourcing and CQRS Modeling in Context Mapper
    • Generate Microservices From Context Map Using JHipster
    • Systematic Service Decomposition with Context Mapper and Service Cutter
    • Validating the Implementation against the Model (with ArchUnit)
    IDE Plugins and Extensions
    • Visual Studio Code Extension
    • Online IDE (no longer supported)
    • Eclipse Plugin
    • Feature Support

    Usage as Library

    The Context Mapper DSL (CML) and its tools cannot only be used within Visual Studio Code or Eclipse, but also be integrated into other applications as a standalone library. This library allows you to parse CML files within a project, change the model programmatically, and unparse it back to CML. You can also use tools such as the Architectural Refactorings and the provided generators for graphical context maps, PlantUML, MDSL, and Freemarker templates.

    Integration

    All our releases are not only published as IDE extensions or plugins, but as updates to the standalone library as well. This library is published into the Maven Central repository and can easily be integrated into your Maven or Gradle build:

    Gradle:

    implementation 'org.contextmapper:context-mapper-dsl:{our-latest-version}'
    

    Maven:

    <dependency>
      <groupId>org.contextmapper</groupId>
      <artifactId>context-mapper-dsl</artifactId>
      <version>{our-latest-version}</version>
    </dependency>
    

    The latest release can be found here: org.contextmapper:context-mapper-dsl on Maven Central

    Example Project

    If you want to use Context Mapper as library within your application, have a look at our standalone example project: https://github.com/ContextMapper/context-mapper-standalone-example

    This project illustrates how to setup your project (with Gradle) so that your CML files are compiled at build-time as well. It further provides code examples in Java that show how to use the models within your project (for example: parse, unparse, and use generators).

    If you have further questions regarding the library usage of Context Mapper, please create an issue in our GitHub repository or feel free to get in touch with us.

    Improve this page on GitHub
    ← PreviousExamples Next →Frequently Asked Questions
    © 2026 Context Mapper contributors
    • GitHub
    • Get Involved
    • Background & Publications
    • RSS