-
Notifications
You must be signed in to change notification settings - Fork 7
Getting started
gnain edited this page Apr 11, 2012
·
14 revisions
Welcome to the kevoree-modeling-framework wiki!
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
| |-myMetaMode.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.emf.scala.gencode.mavenplugin</artifactId>
<version>1.2.0</version>
<extensions>true</extensions>
<executions>
<execution>
<id>ModelGen</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<!--Path to the ecore file-->
<ecore>metamodel/mymodel.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: Specifies the name of the RootContainer element of the MM-->
<!--
<rootXmiContainerClassName>MyRootContainer</rootXmiContainerClassName>
-->
<!--Optional: set to true if you want to generate the model code only -->
<modelOnly>false</modelOnly>
</configuration>
</execution>
</executions>
</plugin>
Add then the Scala compiler plugin
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.2</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<jvmArgs>
<jvmArg>-Xms64m</jvmArg>
<jvmArg>-Xmx1024m</jvmArg>
</jvmArgs>
</configuration>
</plugin>
A little of Scala version property:
<properties>
<scala.version>2.10.0-M2</scala.version>
</properties>
The plugin repository in the Plugin Repositories section
<pluginRepository>
<id>plugin.kevoree-github</id>
<url>http://maven.kevoree.org/release</url>
</pluginRepository>
And one dependency
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.10.0-M2</version>
</dependency>
Then cd into your project folder and just mvn install
.
You're done :-)