-
Notifications
You must be signed in to change notification settings - Fork 7
Getting started
Fouquet François edited this page Sep 3, 2013
·
14 revisions
Welcome to the kevoree-modeling-framework wiki!
Last version : see http://kevoree.org/kmf
The Kevoree Modeling Framework (KMF) is an alternate solution to the Eclipse Modeling Framework.
To get started with KMF, you just have to create a Maven project folder in which you will place the pom and your EcoreMM.
myProject
|-metamodel
| |-myMetaModel.ecore
|-pom.xml
Then add this in your POM:
The plugin in the Build/Plugins section:
<plugin>
<groupId>org.kevoree.modeling</groupId>
<artifactId>org.kevoree.modeling.kotlin.generator.mavenplugin</artifactId>
<version>1.5.1</version>
<extensions>true</extensions>
<executions>
<execution>
<id>ModelGen</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<!--Path to the ecore file or to a directory of ecore files-->
<ecore>metamodel/myMetaModel.ecore</ecore>
<!--Optional: if you want to add a package before the root package of your EcoreMM.
Must be specified in dotted notation-->
<!--
<packagePrefix>org.myPrefix</packagePrefix>
-->
<!--Optional: If true, generates XMI loader and serializer -->
<xmi>false</xmi>
<!--Optional: If true, generates the modeling framework for JavaScript platform -->
<js>false</js>
<!--Optional: If true, generates the modeling framework for JavaScript with ECMA5 compatibility -->
<ecma5>false</ecma5>
<!--Optional: If true, generates the modeling framework with Events compatibility -->
<events>false</events>
<!--Optional: If true, generates `findByQuery` methods. Only available for Java generation (no JavaScript) -->
<selector>false</selector>
</configuration>
</execution>
</executions>
</plugin>
A little of Kotlin version property:
<properties>
<kotlin.version>0.5.998</kotlin.version>
</properties>
The Kotlin library as a dependency
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
Optional : you can also add the KMF MicroFramework dependency (auto generated if not present during compile time). This MicroFramework aims at offering an homogenous API for all KMF generated metamodels.
<dependency>
<groupId>org.kevoree.modeling</groupId>
<artifactId>org.kevoree.modeling.microframework</artifactId>
<version>${kmf.version}</version>
</dependency>
Then cd into your project folder and just mvn clean install
.
You're done :-)