Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » ANT Script for ETL
ANT Script for ETL [message #574560] Mon, 24 August 2009 11:29
Darren  is currently offline Darren Friend
Messages: 40
Registered: September 2009
Hello all,

I've been trying to get this script (script at bottom) to work for a
couple of days and don't seem to be able to spot what is going wrong. The
error message is:

....ant-builds\ETL_DocModel.xml:63: The following error occurred while
executing this line:
....ant-builds\ETL_DocModel.xml:79: Model 'DocumentStructure' not found

[echo] ../etl/DocXML.etl,DocumentModel,DocumentStructure
[epsilon.etl - DocXML.etl] EXCEPTION: Model 'DocumentStructure' not found
[epsilon.etl - DocXML.etl] at
[epsilon.etl - DocXML.etl] at
org.eclipse.epsilon.eol.models.ModelRepository.getModelByNam e(
[epsilon.etl - DocXML.etl] at
org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.popu lateModelRepository(
[epsilon.etl - DocXML.etl] at
org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.exec uteImpl(
[epsilon.etl - DocXML.etl] at
[epsilon.etl - DocXML.etl] at ava:288)

<?xml version="1.0"?>

<!-- Source Details -->
<property name="SourceDataDir" value="../data/DocModel" />
<property name="SourceUri" value="DocumentModel" />
<property name="SourcePrefix" value="DocumentModel" />
<property name="SourceMetaModel"
value="../models/meta-models/xml/DocumentModelSchema.ecore" />
<!-- Define files here as order is important in creating the document
Therefore can not use loop of directory. -->
<filelist id="SourceFiles" dir="${SourceDataDir}"
files=" XMF_Prep_Main_Section_1.XML

<!-- Target Details -->
<property name="TargetFile" value="../models/pop.model" />
<property name="TargetUri" value="DocumentStructure" />
<property name="TargetPrefix" value="DocumentStructure" />
<property name="TargetMetaModel"
value="../models/meta-models/tdl_v3a.ecore" />

<!-- ETL Details -->
<property name="ETLFile" value="../etl/DocXML.etl" />

<!-- ANT Taskdefs for foreach loop -->
<taskdef resource="net/sf/antcontrib/"/>

<target name="main">
<!-- Register the meta-models -->
<epsilon.emf.register file="${SourceMetaModel}"/>
<epsilon.emf.register file="${TargetMetaModel}"/>
<!-- Load the target file. Note path to file defined in property
targetFile -->
<epsilon.loadModel name="${TargetPrefix}" type="EMF">
<parameter name="modelFile" file="${TargetFile}"/>
<parameter name="metamodelUri" value="${TargetUri}"/>
<parameter name="readOnLoad" value="true"/>
<parameter name="storeOnDisposal" value="true"/>

<!-- Load each model and execute the transformation -->
<foreach param="SourceFilename" target="ExecTransformation">
<filelist refid="SourceFiles" />

<target name="ExecTransformation">
<epsilon.loadModel name="${SourcePrefix}" type="XML">
<parameter name="modelFile" file="${SourceFilename}"/>
<parameter name="metamodelUri" value="${SourceUri}"/>
<parameter name="readOnLoad" value="true"/>
<parameter name="storeOnDisposal" value="false"/>

<epsilon.etl src="${ETLFile}">
<model ref="${SourcePrefix}"/>
<model ref="${TargetPrefix}"/>

Thanks for any help,

Previous Topic:[EuGENia | EGL][newbie] Standalone applications
Next Topic:Operation of includes() operation
Goto Forum:

Current Time: Tue Jun 19 14:50:29 GMT 2018

Powered by FUDForum. Page generated in 0.01874 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top