ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anne robert <anne.rob...@imag.fr>
Subject Problem creating a task to generate java from an EMF model
Date Thu, 26 Oct 2006 09:01:35 GMT
Hi,
I am trying to generate the java classes for an EMF model, using ant.
I ave defined the emfGen task to call emf generation. when I call this 
task, I have the following error :

BUILD FAILED
/home/arobert/workspace/CGenerator/build.xml:13: Could not create type 
emfGen du e to java.lang.InstantiationException


context:
ant -version
Apache Ant version 1.6.2 compiled on September 28 2004
eclipse 3.1.2
emf 2.1.0

my ant script :
<project name="C Generation" default="all" basedir=".">

	<property name="model.file" value="./cmodel/cmodel.ecore"/>
	<property name="genmodel.file" value="./cmodel/cmodel.genmodel"/>

	<taskdef name="emfGen"
 
classname="org.eclipse.emf.ant.taskdefs.codegen.ecore.GeneratorTask"
 
classpath="/usr/share/ant/lib;/home/arobert/tmp/essai/ant_tasks/emf.ant.tasks.jar;/import/linux/soft/eclipse/3.1.2/plugins/org.eclipse.core.runtime_3.1.2.jar"
         />
	
	<target name="genJava">
            <echo message="java generation from ecore model"/>
            <emfGen generateJavaCode="true" modelProjectFragmentPath="src" >
	   		<model file="${model.file}"/>
	   		<genModel file="${genmodel.file}"/>
		   </emfGen>


	</target>


	<target name="all" depends="genJava">
	</target>
	
</project>


the jar /home/arobert/tmp/essai/ant_tasks/emf.ant.tasks.jar is extracted 
from org.eclipse.emf.ant_2.1.0.jar

can someone help me?

Regards,
Anne Robert
-- 
------------------------------------------------------------------------
Anne Robert           | tel : (+33) (0)4 56 52 04 44
VERIMAG               | fax : (+33) (0)4 56 52 03 44
Centre Equation       |
F - 38610 Gieres      | e-mail: Anne.Robert@imag.fr
------------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message