Hi there,
I am generating the model,edit, editor source code using the following
EMF ant task that I have defined:
<project name="Ecore2Java Generation" default="GenerateJava" basedir=".">
<property name="model" value="./model/product.ecore"/>
<property name="genmodel" value="./model/product.genmodel"/>
<taskdef name="emfGen"
classname="org.eclipse.emf.importer.ecore.taskdefs.EcoreGeneratorTask"/>
<target name="GenerateJava">
<echo message="Generate the model,edit and editor Java code
from the ecore model"/>
<emf.Ecore2Java model="${model}"
genModel="${genmodel}"
reconcileGenModel="reload"
generateJavaCode="true"
generateModelProject="true"
generateEditProject="true"
generateEditorProject="true"
modelProject="bt.com.ccm.product"
modelProjectFragmentPath="src">
<arg line="-editProject bt.com.ccm.product.edit src"/>
<arg line="-editorProject bt.com.ccm.product.editor src"/>
</emf.Ecore2Java>
</target>
</project>
The problem is that for the model project generated is not an EMF
project and subsequently does not include the necessary EMF plug-in
dependencies. These results in errors since EMF specific classes
cannot be resolved.
Actually the output messages displayed onto the console when running
the task indicate that for the edit and editor projects the ant tasks
creates first an EMF project prior to generating the code; while for
the model project this does not occur.
Does anyone has any idea about this problem?
Thanks,
Achilleas