ETL ANT Script help [message #629170] |
Mon, 27 September 2010 08:17  |
Eclipse User |
|
|
|
I am new to Epsilon and have begun to write an ETL file.
I have previously written EMFText parsers for both my source and target langauges and the packages are available within the current Eclipse environment and are working correctly (i.e. I can open one of the source langauge files and I can see a model structure of the file along side the DSL syntax).
I have been fumbling in the dark somewhat with this and so far I have looked at the ETL example ant file and have tried to alter this for my etl file and to work with the EMFText file types, however I get the error message:
etl.ant:17: java.lang.NullPointerException
my ant file reads:
<?xml version="1.0" ?>
<project default="main">
<target name="loadModels">
<epsilon.emf.register file="../metamodels/vhdl.ecore" />
<epsilon.emf.register file="../metamodels/csp.ecore" />
<epsilon.loadModel name="vhdl" type="EMF">
<parameter name="modelFile" file="../concrete_syntax/vhdl/vending_machine.vhdl" />
<parameter name="metamodelUri" value="vhdl" />
<parameter name="readOnLoad" value="true" />
<parameter name="storeOnDisposal" value="false" />
</epsilon.loadModel>
<epsilon.loadModel name="csp" type="EMF">
<parameter name="modelFile" file="../concrete_syntax/gen-csp/vending_machine.csp" />
<parameter name="metamodelUri" value="csp" />
<parameter name="readOnLoad" value="false" />
<parameter name="storeOnDisposal" value="true" />
</epsilon.loadModel>
</target>
<target name="main" depends="loadModels">
<epsilon.etl src="vhdl2csp.etl">
<model ref="vhdl" />
<model ref="csp" />
</epsilon.etl>
</target>
</project>
Any help in getting the etl script to fire would be greatly appreciated.
Many Thanks,
James
|
|
|
|
Re: ETL ANT Script help [message #629190 is a reply to message #629170] |
Mon, 27 September 2010 08:56  |
Eclipse User |
|
|
|
Hi,
I cannot quite check the line numbers on your code snippet, but could it
be that you get the NullpointerException from the loadModel task? I have
had similar problems just recently, and it seems that internally
getProject() always returns NULL for the loadModel implementation. (Not
sure why this is, though).
Cheers,
Steffen
On 27/09/2010 13:17, James Sharp wrote:
> I am new to Epsilon and have begun to write an ETL file.
>
> I have previously written EMFText parsers for both my source and
> target langauges and the packages are available within the current
> Eclipse environment and are working correctly (i.e. I can open one of
> the source langauge files and I can see a model structure of the file
> along side the DSL syntax).
>
> I have been fumbling in the dark somewhat with this and so far I have
> looked at the ETL example ant file and have tried to alter this for my
> etl file and to work with the EMFText file types, however I get the
> error message:
> etl.ant:17: java.lang.NullPointerException
>
> my ant file reads:
>
> <?xml version="1.0" ?> <project default="main">
> <target name="loadModels">
> <epsilon.emf.register file="../metamodels/vhdl.ecore" />
> <epsilon.emf.register file="../metamodels/csp.ecore" />
> <epsilon.loadModel name="vhdl" type="EMF">
> <parameter name="modelFile"
> file="../concrete_syntax/vhdl/vending_machine.vhdl" /> <parameter
> name="metamodelUri" value="vhdl" /> <parameter name="readOnLoad"
> value="true" /> <parameter name="storeOnDisposal" value="false" />
> </epsilon.loadModel>
> <epsilon.loadModel name="csp" type="EMF">
> <parameter name="modelFile"
> file="../concrete_syntax/gen-csp/vending_machine.csp" /> <parameter
> name="metamodelUri" value="csp" /> <parameter name="readOnLoad"
> value="false" /> <parameter name="storeOnDisposal" value="true" />
> </epsilon.loadModel>
> </target>
> <target name="main" depends="loadModels">
> <epsilon.etl src="vhdl2csp.etl">
> <model ref="vhdl" /> <model ref="csp" /> </epsilon.etl>
> </target>
> </project>
>
>
> Any help in getting the etl script to fire would be greatly appreciated.
>
> Many Thanks,
>
> James
|
|
|
Powered by
FUDForum. Page generated in 0.06853 seconds