Skip to content

ContextMapper/context-mapper-standalone-example

Repository files navigation

Context Mapper

Context Mapping DSL (CML) Standalone Example Project Build License

This is an example project illustrating how the Context Mapper DSL (CML) language can be used as standalone library outside the Eclipse IDE.

Build

The Context Mapper DSL library releases are available via the Maven central repository and can therefore be integrated within your Maven or Gradle builds.

Gradle:

implementation 'org.contextmapper:context-mapper-dsl:6.10.0'

Maven:

<dependency>
  <groupId>org.contextmapper</groupId>
  <artifactId>context-mapper-dsl</artifactId>
  <version>6.10.0</version>
</dependency>

If you want to use our SNAPSHOT's built from the master branch (context-mapper-dsl) you have to use the following repository: https://oss.sonatype.org/content/repositories/snapshots

Gradle Xtext Builder Plugin

This example project is built with Gradle. Have a look at build.gradle how it is configured. With the Xtext builder plugin you ensure that your CML files are compiled at build time.

Example Model

The CML models are configured to be in the source folder src/main/cml (see build.gradle). This example project contains the insurance example model (./src/main/cml/Insurance-Example-Model.cml) which can also be found in our examples repository.

Examples how to use CML models in your code

This example project contains the following example classes written in Java which illustrate how to use CML models and our generators:

For details about the generators and the CML language please consult our online documentation (currently we have no further documentation how to use the tools on code level in standalone applications). If you have questions how to use specific features within your standalone Java application don't hesitate to create an issue or contact us.

Contributing

Contribution is always welcome! Here are some ways how you can contribute:

Licence

ContextMapper is released under the Apache License, Version 2.0.