This is an example project illustrating how the Context Mapper DSL (CML) language can be used as standalone library outside the Eclipse IDE.
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
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.
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.
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.
Contribution is always welcome! Here are some ways how you can contribute:
ContextMapper is released under the Apache License, Version 2.0.