Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » ANT Script for ETL
ANT Script for ETL [message #481799] Mon, 24 August 2009 07:29 Go to next message
Eclipse User
Originally posted by: d.clowes.lboro.ac.uk

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:

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


ExecTransformation:
[echo] ../etl/DocXML.etl,DocumentModel,DocumentStructure
[epsilon.etl - DocXML.etl] EXCEPTION: Model 'DocumentStructure' not found
[epsilon.etl - DocXML.etl] at
org.eclipse.epsilon.eol.models.ModelGroup.<init>(ModelGroup.java:40)
[epsilon.etl - DocXML.etl] at
org.eclipse.epsilon.eol.models.ModelRepository.getModelByNam e(ModelRepository.java:68)
[epsilon.etl - DocXML.etl] at
org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.popu lateModelRepository(ExecutableModuleTask.java:177)
[epsilon.etl - DocXML.etl] at
org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.exec uteImpl(ExecutableModuleTask.java:106)
[epsilon.etl - DocXML.etl] at
org.eclipse.epsilon.workflow.tasks.EpsilonTask.execute(Epsil onTask.java:41)
[epsilon.etl - DocXML.etl] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)

<?xml version="1.0"?>
<project>

<!-- 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
XMF_Prep_Main_Section_2.XML
XMF_Prep_Main_Section_3.XML
XMF_Prep_Main_Section_4.XML
XMF_Prep_Appendix_Z.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/antcontrib.properties"/>

<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"/>
</epsilon.loadModel>

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

<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.loadModel>

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

Thanks for any help,

Darren
Re: ANT Script for ETL [message #481807 is a reply to message #481799] Mon, 24 August 2009 07:47 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Darren,

The error comes from

> <model ref="${TargetPrefix}"/>

which means that there is no DocumentStructure model in the project
repository. I've had a look at your ANT file but can't figure out what
might be going wrong. Could you please try to put together a minimal
example that reproduces the problem (and that you can share) so that I
can have a closer look?

Cheers,
Dimitris

Darren Clowes wrote:
> 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:
>
> BUILD FAILED
> ...ant-builds\ETL_DocModel.xml:63: The following error occurred while
> executing this line:
> ...ant-builds\ETL_DocModel.xml:79: Model 'DocumentStructure' not found
>
>
> ExecTransformation:
> [echo] ../etl/DocXML.etl,DocumentModel,DocumentStructure
> [epsilon.etl - DocXML.etl] EXCEPTION: Model 'DocumentStructure' not found
> [epsilon.etl - DocXML.etl] at
> org.eclipse.epsilon.eol.models.ModelGroup.<init>(ModelGroup.java:40)
> [epsilon.etl - DocXML.etl] at
> org.eclipse.epsilon.eol.models.ModelRepository.getModelByNam e(ModelRepository.java:68)
>
> [epsilon.etl - DocXML.etl] at
> org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.popu lateModelRepository(ExecutableModuleTask.java:177)
>
> [epsilon.etl - DocXML.etl] at
> org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.exec uteImpl(ExecutableModuleTask.java:106)
>
> [epsilon.etl - DocXML.etl] at
> org.eclipse.epsilon.workflow.tasks.EpsilonTask.execute(Epsil onTask.java:41)
> [epsilon.etl - DocXML.etl] at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
>
> <?xml version="1.0"?>
> <project>
>
> <!-- 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
> XMF_Prep_Main_Section_2.XML
> XMF_Prep_Main_Section_3.XML
> XMF_Prep_Main_Section_4.XML
> XMF_Prep_Appendix_Z.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/antcontrib.properties"/>
> <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"/>
> </epsilon.loadModel>
>
> <!-- Load each model and execute the transformation -->
> <foreach param="SourceFilename" target="ExecTransformation">
> <path>
> <filelist refid="SourceFiles" />
> </path>
> </foreach>
> </target>
>
> <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.loadModel>
>
> <echo>${ETLFile},${SourcePrefix},${TargetPrefix}</echo>
> <epsilon.etl src="${ETLFile}">
> <model ref="${SourcePrefix}"/>
> <model ref="${TargetPrefix}"/>
> </epsilon.etl>
> </target>
> </project>
>
> Thanks for any help,
>
> Darren
>
Re: ANT Script for ETL [message #481808 is a reply to message #481807] Mon, 24 August 2009 07:56 Go to previous messageGo to next message
Eclipse User
Originally posted by: d.clowes.lboro.ac.uk

This is a cut down version with all the non-essential properties replaced
by their direct text. Is that what you required?

Darren

<?xml version="1.0"?>
<project>

<!-- Source Details -->
<property name="SourceDataDir" value="../data/DocModel" />
<!-- 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"/>

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

<target name="main">
<!-- Register the meta-models -->
<epsilon.emf.register
file="../models/meta-models/xml/DocumentModelSchema.ecore"/ >
<epsilon.emf.register file="../models/meta-models/tdl_v3a.ecore"/>
<!-- Load the target file. Note path to file defined in property
targetFile -->
<epsilon.loadModel name="DocumentStructure" type="EMF">
<parameter name="modelFile" file="../models/pop.model"/>
<parameter name="metamodelUri" value="DocumentStructure"/>
<parameter name="readOnLoad" value="true"/>
<parameter name="storeOnDisposal" value="true"/>
</epsilon.loadModel>

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

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

<epsilon.etl src="../etl/DocXML.etl">
<model ref="DocumentModel"/>
<model ref="DocumentStructure"/>
</epsilon.etl>
</target>
</project>
Re: ANT Script for ETL [message #481809 is a reply to message #481808] Mon, 24 August 2009 07:58 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Darren,

I was actually hoping for a complete project that I can run and
reproduce the problem. If that's too much of a hassle no worries; I'll
try to reproduce this on my own later on today.

Cheers,
Dimitris

Darren Clowes wrote:
> This is a cut down version with all the non-essential properties
> replaced by their direct text. Is that what you required?
>
> Darren
>
> <?xml version="1.0"?>
> <project>
>
> <!-- Source Details -->
> <property name="SourceDataDir" value="../data/DocModel" />
> <!-- 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"/>
>
> <!-- ANT Taskdefs for foreach loop -->
> <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
> <target name="main">
> <!-- Register the meta-models -->
> <epsilon.emf.register
> file="../models/meta-models/xml/DocumentModelSchema.ecore"/ >
> <epsilon.emf.register file="../models/meta-models/tdl_v3a.ecore"/>
> <!-- Load the target file. Note path to file defined in property
> targetFile -->
> <epsilon.loadModel name="DocumentStructure" type="EMF">
> <parameter name="modelFile" file="../models/pop.model"/>
> <parameter name="metamodelUri" value="DocumentStructure"/>
> <parameter name="readOnLoad" value="true"/>
> <parameter name="storeOnDisposal" value="true"/>
> </epsilon.loadModel>
>
> <!-- Load each model and execute the transformation -->
> <foreach param="SourceFilename" target="ExecTransformation">
> <path>
> <filelist refid="SourceFiles" />
> </path>
> </foreach>
> </target>
>
> <target name="ExecTransformation">
> <epsilon.loadModel name="DocumentModel" type="XML">
> <parameter name="modelFile" file="${SourceFilename}"/>
> <parameter name="metamodelUri" value="DocumentModel"/>
> <parameter name="readOnLoad" value="true"/>
> <parameter name="storeOnDisposal" value="false"/>
> </epsilon.loadModel>
>
> <epsilon.etl src="../etl/DocXML.etl">
> <model ref="DocumentModel"/>
> <model ref="DocumentStructure"/>
> </epsilon.etl>
> </target>
> </project>
>
Re: ANT Script for ETL [message #481813 is a reply to message #481809] Mon, 24 August 2009 08:05 Go to previous messageGo to next message
Eclipse User
Originally posted by: d.clowes.lboro.ac.uk

I'll email you a project after lunch.

Darren
Re: ANT Script for ETL [message #481825 is a reply to message #481809] Mon, 24 August 2009 08:55 Go to previous messageGo to next message
Eclipse User
Originally posted by: d.clowes.lboro.ac.uk

I have emailed you acut down project that reproduces the problem.

Darren
Re: ANT Script for ETL [message #481828 is a reply to message #481825] Mon, 24 August 2009 09:06 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Great! Thanks. I'll have a look and get back to you shortly.

Cheers,
Dimitris

Darren Clowes wrote:
> I have emailed you acut down project that reproduces the problem.
>
> Darren
>
Re: ANT Script for ETL [message #481845 is a reply to message #481828] Mon, 24 August 2009 10:25 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Darren,

Setting the inheritrefs attribute of the foreach task to "true" (as per
http://ant-contrib.sourceforge.net/tasks/tasks/foreach.html) seems to be
doing the job.

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Great! Thanks. I'll have a look and get back to you shortly.
>
> Cheers,
> Dimitris
>
> Darren Clowes wrote:
>> I have emailed you acut down project that reproduces the problem.
>>
>> Darren
>>
Re: ANT Script for ETL [message #482021 is a reply to message #481845] Tue, 25 August 2009 03:28 Go to previous message
Eclipse User
Originally posted by: d.clowes.lboro.ac.uk

Wonderful. Well spotted Dimitris and thank you very much.

Darren
Re: ANT Script for ETL [message #574595 is a reply to message #481799] Mon, 24 August 2009 07:47 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Darren,

The error comes from

> <model ref="${TargetPrefix}"/>

which means that there is no DocumentStructure model in the project
repository. I've had a look at your ANT file but can't figure out what
might be going wrong. Could you please try to put together a minimal
example that reproduces the problem (and that you can share) so that I
can have a closer look?

Cheers,
Dimitris

Darren Clowes wrote:
> 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:
>
> BUILD FAILED
> ...ant-builds\ETL_DocModel.xml:63: The following error occurred while
> executing this line:
> ...ant-builds\ETL_DocModel.xml:79: Model 'DocumentStructure' not found
>
>
> ExecTransformation:
> [echo] ../etl/DocXML.etl,DocumentModel,DocumentStructure
> [epsilon.etl - DocXML.etl] EXCEPTION: Model 'DocumentStructure' not found
> [epsilon.etl - DocXML.etl] at
> org.eclipse.epsilon.eol.models.ModelGroup.<init>(ModelGroup.java:40)
> [epsilon.etl - DocXML.etl] at
> org.eclipse.epsilon.eol.models.ModelRepository.getModelByNam e(ModelRepository.java:68)
>
> [epsilon.etl - DocXML.etl] at
> org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.popu lateModelRepository(ExecutableModuleTask.java:177)
>
> [epsilon.etl - DocXML.etl] at
> org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask.exec uteImpl(ExecutableModuleTask.java:106)
>
> [epsilon.etl - DocXML.etl] at
> org.eclipse.epsilon.workflow.tasks.EpsilonTask.execute(Epsil onTask.java:41)
> [epsilon.etl - DocXML.etl] at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
>
> <?xml version="1.0"?>
> <project>
>
> <!-- 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
> XMF_Prep_Main_Section_2.XML
> XMF_Prep_Main_Section_3.XML
> XMF_Prep_Main_Section_4.XML
> XMF_Prep_Appendix_Z.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/antcontrib.properties"/>
> <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"/>
> </epsilon.loadModel>
>
> <!-- Load each model and execute the transformation -->
> <foreach param="SourceFilename" target="ExecTransformation">
> <path>
> <filelist refid="SourceFiles" />
> </path>
> </foreach>
> </target>
>
> <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.loadModel>
>
> <echo>${ETLFile},${SourcePrefix},${TargetPrefix}</echo>
> <epsilon.etl src="${ETLFile}">
> <model ref="${SourcePrefix}"/>
> <model ref="${TargetPrefix}"/>
> </epsilon.etl>
> </target>
> </project>
>
> Thanks for any help,
>
> Darren
>
Re: ANT Script for ETL [message #574617 is a reply to message #481807] Mon, 24 August 2009 07:56 Go to previous message
Darren  is currently offline Darren
Messages: 40
Registered: September 2009
Member
This is a cut down version with all the non-essential properties replaced
by their direct text. Is that what you required?

Darren

<?xml version="1.0"?>
<project>

<!-- Source Details -->
<property name="SourceDataDir" value="../data/DocModel" />
<!-- 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"/>

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

<target name="main">
<!-- Register the meta-models -->
<epsilon.emf.register
file="../models/meta-models/xml/DocumentModelSchema.ecore"/ >
<epsilon.emf.register file="../models/meta-models/tdl_v3a.ecore"/>
<!-- Load the target file. Note path to file defined in property
targetFile -->
<epsilon.loadModel name="DocumentStructure" type="EMF">
<parameter name="modelFile" file="../models/pop.model"/>
<parameter name="metamodelUri" value="DocumentStructure"/>
<parameter name="readOnLoad" value="true"/>
<parameter name="storeOnDisposal" value="true"/>
</epsilon.loadModel>

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

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

<epsilon.etl src="../etl/DocXML.etl">
<model ref="DocumentModel"/>
<model ref="DocumentStructure"/>
</epsilon.etl>
</target>
</project>
Re: ANT Script for ETL [message #574633 is a reply to message #481808] Mon, 24 August 2009 07:58 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Darren,

I was actually hoping for a complete project that I can run and
reproduce the problem. If that's too much of a hassle no worries; I'll
try to reproduce this on my own later on today.

Cheers,
Dimitris

Darren Clowes wrote:
> This is a cut down version with all the non-essential properties
> replaced by their direct text. Is that what you required?
>
> Darren
>
> <?xml version="1.0"?>
> <project>
>
> <!-- Source Details -->
> <property name="SourceDataDir" value="../data/DocModel" />
> <!-- 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"/>
>
> <!-- ANT Taskdefs for foreach loop -->
> <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
> <target name="main">
> <!-- Register the meta-models -->
> <epsilon.emf.register
> file="../models/meta-models/xml/DocumentModelSchema.ecore"/ >
> <epsilon.emf.register file="../models/meta-models/tdl_v3a.ecore"/>
> <!-- Load the target file. Note path to file defined in property
> targetFile -->
> <epsilon.loadModel name="DocumentStructure" type="EMF">
> <parameter name="modelFile" file="../models/pop.model"/>
> <parameter name="metamodelUri" value="DocumentStructure"/>
> <parameter name="readOnLoad" value="true"/>
> <parameter name="storeOnDisposal" value="true"/>
> </epsilon.loadModel>
>
> <!-- Load each model and execute the transformation -->
> <foreach param="SourceFilename" target="ExecTransformation">
> <path>
> <filelist refid="SourceFiles" />
> </path>
> </foreach>
> </target>
>
> <target name="ExecTransformation">
> <epsilon.loadModel name="DocumentModel" type="XML">
> <parameter name="modelFile" file="${SourceFilename}"/>
> <parameter name="metamodelUri" value="DocumentModel"/>
> <parameter name="readOnLoad" value="true"/>
> <parameter name="storeOnDisposal" value="false"/>
> </epsilon.loadModel>
>
> <epsilon.etl src="../etl/DocXML.etl">
> <model ref="DocumentModel"/>
> <model ref="DocumentStructure"/>
> </epsilon.etl>
> </target>
> </project>
>
Re: ANT Script for ETL [message #574667 is a reply to message #481809] Mon, 24 August 2009 08:05 Go to previous message
Darren  is currently offline Darren
Messages: 40
Registered: September 2009
Member
I'll email you a project after lunch.

Darren
Re: ANT Script for ETL [message #574680 is a reply to message #481809] Mon, 24 August 2009 08:55 Go to previous message
Darren  is currently offline Darren
Messages: 40
Registered: September 2009
Member
I have emailed you acut down project that reproduces the problem.

Darren
Re: ANT Script for ETL [message #574705 is a reply to message #481825] Mon, 24 August 2009 09:06 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Great! Thanks. I'll have a look and get back to you shortly.

Cheers,
Dimitris

Darren Clowes wrote:
> I have emailed you acut down project that reproduces the problem.
>
> Darren
>
Re: ANT Script for ETL [message #574724 is a reply to message #481828] Mon, 24 August 2009 10:25 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Darren,

Setting the inheritrefs attribute of the foreach task to "true" (as per
http://ant-contrib.sourceforge.net/tasks/tasks/foreach.html) seems to be
doing the job.

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Great! Thanks. I'll have a look and get back to you shortly.
>
> Cheers,
> Dimitris
>
> Darren Clowes wrote:
>> I have emailed you acut down project that reproduces the problem.
>>
>> Darren
>>
Re: ANT Script for ETL [message #574819 is a reply to message #481845] Tue, 25 August 2009 03:28 Go to previous message
Darren  is currently offline Darren
Messages: 40
Registered: September 2009
Member
Wonderful. Well spotted Dimitris and thank you very much.

Darren
Previous Topic:Operation of includes() operation
Next Topic:Accessing a "guard" field in a model
Goto Forum:
  


Current Time: Mon Jul 28 00:31:10 EDT 2014

Powered by FUDForum. Page generated in 0.30654 seconds