Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] SideEffect example - ant build doesn't work
[ATL] SideEffect example - ant build doesn't work [message #106285] Tue, 09 June 2009 09:35 Go to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 261
Registered: July 2009
Senior Member
Hi all,

I've tried the SideEffect example from
http://www.eclipse.org/m2m/atl/basicExamples_Patterns/articl e.php?file=SideEffect/index.html

Unfortunately the ant tasks have changed in the meantime. I've adapted
the build.xml in the way as shown below.

But now on execution I obtain

....
[atl.saveModel] Saving model myTypeB to
D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi

BUILD FAILED
D:\path\to\workspace\SideEffect\Transformations\build.xml:22 : No
Resource found, unable to extract to path:
file:/D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi

If I change myTypeB to tmpTypeB it works.

Thanks,
Henrik

-------------------- build.xml ---------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="default">

<property name="project" value="../" />

<target name="default" depends="modelsLoading">
<atl.launch
path="${project}/Transformations/TypeA2TypeB_v3_firstStep.asm ">
<inModel name="a" model="myTypeA" />
<inModel name="TypeA" model="TypeA" />
<inModel name="TypeB" model="TypeB" />
<outModel name="b" model="tmpTypeB" metamodel="TypeB" />
</atl.launch>

<atl.launch
path="${project}/Transformations/TypeA2TypeB_v3_secondStep.asm ">
<inModel name="a" model="myTypeA" />
<inModel name="TypeA" model="TypeA" />
<inModel name="TypeB" model="TypeB" />
<inModel name="bIn" model="tmpTypeB" />
<outModel name="b" model="myTypeB" metamodel="TypeB" />
</atl.launch>

<atl.saveModel model="myTypeB" path="${project}/SampleModels/RootB.xmi" />

</target>

<target name="modelsLoading">
<atl.loadModel modelHandler="EMF" name="TypeA" metamodel="MOF"
path="${project}/Metamodels/TypeA.ecore" />

<atl.loadModel modelHandler="EMF" name="TypeB" metamodel="MOF"
path="${project}/Metamodels/TypeB.ecore" />

<atl.loadModel modelHandler="EMF" name="myTypeA" metamodel="TypeA"
path="${project}/SampleModels/RootA.xmi" />
</target>

</project>
Re: [ATL] SideEffect example - ant build doesn't work [message #106348 is a reply to message #106285] Tue, 09 June 2009 12:27 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Hello,

The problem comes from the way the EMFVM manages models, which seems to
not support model reuse.
Could you please report a bug about that? (twice in a day,
congratulations ;-) ).

As a workaround, you can use the RegularVM instead into the ant file. I
just updated the SideEffect example on the website.

Best regards,

William

Henrik Rentz-Reichert a écrit :
> Hi all,
>
> I've tried the SideEffect example from
> http://www.eclipse.org/m2m/atl/basicExamples_Patterns/articl e.php?file=SideEffect/index.html
>
> Unfortunately the ant tasks have changed in the meantime. I've adapted
> the build.xml in the way as shown below.
>
> But now on execution I obtain
>
> ...
> [atl.saveModel] Saving model myTypeB to
> D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi
>
> BUILD FAILED
> D:\path\to\workspace\SideEffect\Transformations\build.xml:22 : No
> Resource found, unable to extract to path:
> file:/D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi
>
> If I change myTypeB to tmpTypeB it works.
>
> Thanks,
> Henrik
>
> -------------------- build.xml ---------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="project" default="default">
>
> <property name="project" value="../" />
>
> <target name="default" depends="modelsLoading">
> <atl.launch
> path="${project}/Transformations/TypeA2TypeB_v3_firstStep.asm ">
> <inModel name="a" model="myTypeA" />
> <inModel name="TypeA" model="TypeA" />
> <inModel name="TypeB" model="TypeB" />
> <outModel name="b" model="tmpTypeB" metamodel="TypeB" />
> </atl.launch>
>
> <atl.launch
> path="${project}/Transformations/TypeA2TypeB_v3_secondStep.asm ">
> <inModel name="a" model="myTypeA" />
> <inModel name="TypeA" model="TypeA" />
> <inModel name="TypeB" model="TypeB" />
> <inModel name="bIn" model="tmpTypeB" />
> <outModel name="b" model="myTypeB" metamodel="TypeB" />
> </atl.launch>
>
> <atl.saveModel model="myTypeB" path="${project}/SampleModels/RootB.xmi" />
>
> </target>
>
> <target name="modelsLoading">
> <atl.loadModel modelHandler="EMF" name="TypeA" metamodel="MOF"
> path="${project}/Metamodels/TypeA.ecore" />
>
> <atl.loadModel modelHandler="EMF" name="TypeB" metamodel="MOF"
> path="${project}/Metamodels/TypeB.ecore" />
>
> <atl.loadModel modelHandler="EMF" name="myTypeA" metamodel="TypeA"
> path="${project}/SampleModels/RootA.xmi" />
> </target>
>
> </project>
Re: [ATL] SideEffect example - ant build doesn't work [message #106386 is a reply to message #106348] Tue, 09 June 2009 15:08 Go to previous messageGo to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 261
Registered: July 2009
Senior Member
William,

I can't see an update of the example project sources
( http://www.eclipse.org/m2m/atl/atlTransformations/SideEffect /SideEffect.zip
- maybe this is due to some latency due to caching in the system).

Also,
http://wiki.eclipse.org/AM3_Ant_Tasks#Parameters_specified_a s_attributes_2
doesn't mention an option to select a specific VM (this page needs an
overall update).

How can I pick the RegularVM?

Thanks,
Henrik

William Piers wrote:
> Hello,
>
> The problem comes from the way the EMFVM manages models, which seems to
> not support model reuse.
> Could you please report a bug about that? (twice in a day,
> congratulations ;-) ).
>
> As a workaround, you can use the RegularVM instead into the ant file. I
> just updated the SideEffect example on the website.
>
> Best regards,
>
> William
>
> Henrik Rentz-Reichert a écrit :
>> Hi all,
>>
>> I've tried the SideEffect example from
>> http://www.eclipse.org/m2m/atl/basicExamples_Patterns/articl e.php?file=SideEffect/index.html
>>
>>
>> Unfortunately the ant tasks have changed in the meantime. I've adapted
>> the build.xml in the way as shown below.
>>
>> But now on execution I obtain
>>
>> ...
>> [atl.saveModel] Saving model myTypeB to
>> D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi
>>
>> BUILD FAILED
>> D:\path\to\workspace\SideEffect\Transformations\build.xml:22 : No
>> Resource found, unable to extract to path:
>> file:/D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi
>>
>> If I change myTypeB to tmpTypeB it works.
>>
>> Thanks,
>> Henrik
>>
>> -------------------- build.xml ---------------------------------------
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project name="project" default="default">
>>
>> <property name="project" value="../" />
>>
>> <target name="default" depends="modelsLoading">
>> <atl.launch
>> path="${project}/Transformations/TypeA2TypeB_v3_firstStep.asm ">
>> <inModel name="a" model="myTypeA" />
>> <inModel name="TypeA" model="TypeA" />
>> <inModel name="TypeB" model="TypeB" />
>> <outModel name="b" model="tmpTypeB" metamodel="TypeB" />
>> </atl.launch>
>>
>> <atl.launch
>> path="${project}/Transformations/TypeA2TypeB_v3_secondStep.asm ">
>> <inModel name="a" model="myTypeA" />
>> <inModel name="TypeA" model="TypeA" />
>> <inModel name="TypeB" model="TypeB" />
>> <inModel name="bIn" model="tmpTypeB" />
>> <outModel name="b" model="myTypeB" metamodel="TypeB" />
>> </atl.launch>
>>
>> <atl.saveModel model="myTypeB"
>> path="${project}/SampleModels/RootB.xmi" />
>>
>> </target>
>>
>> <target name="modelsLoading">
>> <atl.loadModel modelHandler="EMF" name="TypeA" metamodel="MOF"
>> path="${project}/Metamodels/TypeA.ecore" />
>>
>> <atl.loadModel modelHandler="EMF" name="TypeB" metamodel="MOF"
>> path="${project}/Metamodels/TypeB.ecore" />
>>
>> <atl.loadModel modelHandler="EMF" name="myTypeA"
>> metamodel="TypeA"
>> path="${project}/SampleModels/RootA.xmi" />
>> </target>
>>
>> </project>
Re: [ATL] SideEffect example - ant build doesn't work [message #106399 is a reply to message #106386] Tue, 09 June 2009 15:15 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Strange. When I download the zip I get the updated version.

Any way, to change the VM you have to put a parameter inside of the ant
project:
<project name="project" default="default">

<property name="atl.launcher" value="Regular VM (with debugger)" />

<!-- transformation target -->

</project>

This is documented here:
http://wiki.eclipse.org/ATL/User_Guide#Launcher_configuratio n

Best regards,

William

Henrik Rentz-Reichert a écrit :
> William,
>
> I can't see an update of the example project sources
> ( http://www.eclipse.org/m2m/atl/atlTransformations/SideEffect /SideEffect.zip
> - maybe this is due to some latency due to caching in the system).
>
> Also,
> http://wiki.eclipse.org/AM3_Ant_Tasks#Parameters_specified_a s_attributes_2
> doesn't mention an option to select a specific VM (this page needs an
> overall update).
>
> How can I pick the RegularVM?
>
> Thanks,
> Henrik
>
> William Piers wrote:
>> Hello,
>>
>> The problem comes from the way the EMFVM manages models, which seems to
>> not support model reuse.
>> Could you please report a bug about that? (twice in a day,
>> congratulations ;-) ).
>>
>> As a workaround, you can use the RegularVM instead into the ant file. I
>> just updated the SideEffect example on the website.
>>
>> Best regards,
>>
>> William
>>
>> Henrik Rentz-Reichert a écrit :
>>> Hi all,
>>>
>>> I've tried the SideEffect example from
>>> http://www.eclipse.org/m2m/atl/basicExamples_Patterns/articl e.php?file=SideEffect/index.html
>>>
>>>
>>> Unfortunately the ant tasks have changed in the meantime. I've adapted
>>> the build.xml in the way as shown below.
>>>
>>> But now on execution I obtain
>>>
>>> ...
>>> [atl.saveModel] Saving model myTypeB to
>>> D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi
>>>
>>> BUILD FAILED
>>> D:\path\to\workspace\SideEffect\Transformations\build.xml:22 : No
>>> Resource found, unable to extract to path:
>>> file:/D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi
>>>
>>> If I change myTypeB to tmpTypeB it works.
>>>
>>> Thanks,
>>> Henrik
>>>
>>> -------------------- build.xml ---------------------------------------
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <project name="project" default="default">
>>>
>>> <property name="project" value="../" />
>>>
>>> <target name="default" depends="modelsLoading">
>>> <atl.launch
>>> path="${project}/Transformations/TypeA2TypeB_v3_firstStep.asm ">
>>> <inModel name="a" model="myTypeA" />
>>> <inModel name="TypeA" model="TypeA" />
>>> <inModel name="TypeB" model="TypeB" />
>>> <outModel name="b" model="tmpTypeB" metamodel="TypeB" />
>>> </atl.launch>
>>>
>>> <atl.launch
>>> path="${project}/Transformations/TypeA2TypeB_v3_secondStep.asm ">
>>> <inModel name="a" model="myTypeA" />
>>> <inModel name="TypeA" model="TypeA" />
>>> <inModel name="TypeB" model="TypeB" />
>>> <inModel name="bIn" model="tmpTypeB" />
>>> <outModel name="b" model="myTypeB" metamodel="TypeB" />
>>> </atl.launch>
>>>
>>> <atl.saveModel model="myTypeB"
>>> path="${project}/SampleModels/RootB.xmi" />
>>>
>>> </target>
>>>
>>> <target name="modelsLoading">
>>> <atl.loadModel modelHandler="EMF" name="TypeA" metamodel="MOF"
>>> path="${project}/Metamodels/TypeA.ecore" />
>>>
>>> <atl.loadModel modelHandler="EMF" name="TypeB" metamodel="MOF"
>>> path="${project}/Metamodels/TypeB.ecore" />
>>>
>>> <atl.loadModel modelHandler="EMF" name="myTypeA"
>>> metamodel="TypeA"
>>> path="${project}/SampleModels/RootA.xmi" />
>>> </target>
>>>
>>> </project>
Re: [ATL] SideEffect example - ant build doesn't work [message #106415 is a reply to message #106399] Tue, 09 June 2009 17:07 Go to previous messageGo to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 261
Registered: July 2009
Senior Member
sorry, it still doesn't work.

The VM is found, but I get an error
BUILD FAILED
D:\path\to\workspace\SideEffect\Transformations\build.xml:8: null

in the line
<atl.launch
path="${project}/Transformations/TypeA2TypeB_v3_firstStep.asm ">

Henrik

William Piers wrote:
> Strange. When I download the zip I get the updated version.
>
> Any way, to change the VM you have to put a parameter inside of the ant
> project:
> <project name="project" default="default">
>
> <property name="atl.launcher" value="Regular VM (with debugger)" />
>
> <!-- transformation target -->
>
> </project>
>
> This is documented here:
> http://wiki.eclipse.org/ATL/User_Guide#Launcher_configuratio n
>
> Best regards,
>
> William
>
> Henrik Rentz-Reichert a écrit :
>> William,
>>
>> I can't see an update of the example project sources
>> ( http://www.eclipse.org/m2m/atl/atlTransformations/SideEffect /SideEffect.zip
>>
>> - maybe this is due to some latency due to caching in the system).
>>
>> Also,
>> http://wiki.eclipse.org/AM3_Ant_Tasks#Parameters_specified_a s_attributes_2
>>
>> doesn't mention an option to select a specific VM (this page needs an
>> overall update).
>>
>> How can I pick the RegularVM?
>>
>> Thanks,
>> Henrik
>>
>> William Piers wrote:
>>> Hello,
>>>
>>> The problem comes from the way the EMFVM manages models, which seems to
>>> not support model reuse.
>>> Could you please report a bug about that? (twice in a day,
>>> congratulations ;-) ).
>>>
>>> As a workaround, you can use the RegularVM instead into the ant file. I
>>> just updated the SideEffect example on the website.
>>>
>>> Best regards,
>>>
>>> William
>>>
>>> Henrik Rentz-Reichert a écrit :
>>>> Hi all,
>>>>
>>>> I've tried the SideEffect example from
>>>> http://www.eclipse.org/m2m/atl/basicExamples_Patterns/articl e.php?file=SideEffect/index.html
>>>>
>>>>
>>>>
>>>> Unfortunately the ant tasks have changed in the meantime. I've adapted
>>>> the build.xml in the way as shown below.
>>>>
>>>> But now on execution I obtain
>>>>
>>>> ...
>>>> [atl.saveModel] Saving model myTypeB to
>>>> D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi
>>>>
>>>> BUILD FAILED
>>>> D:\path\to\workspace\SideEffect\Transformations\build.xml:22 : No
>>>> Resource found, unable to extract to path:
>>>> file:/D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi
>>>>
>>>> If I change myTypeB to tmpTypeB it works.
>>>>
>>>> Thanks,
>>>> Henrik
>>>>
>>>> -------------------- build.xml ---------------------------------------
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <project name="project" default="default">
>>>>
>>>> <property name="project" value="../" />
>>>> <target name="default" depends="modelsLoading">
>>>> <atl.launch
>>>> path="${project}/Transformations/TypeA2TypeB_v3_firstStep.asm ">
>>>> <inModel name="a" model="myTypeA" />
>>>> <inModel name="TypeA" model="TypeA" />
>>>> <inModel name="TypeB" model="TypeB" />
>>>> <outModel name="b" model="tmpTypeB" metamodel="TypeB" />
>>>> </atl.launch>
>>>> <atl.launch
>>>> path="${project}/Transformations/TypeA2TypeB_v3_secondStep.asm ">
>>>> <inModel name="a" model="myTypeA" />
>>>> <inModel name="TypeA" model="TypeA" />
>>>> <inModel name="TypeB" model="TypeB" />
>>>> <inModel name="bIn" model="tmpTypeB" />
>>>> <outModel name="b" model="myTypeB" metamodel="TypeB" />
>>>> </atl.launch>
>>>>
>>>> <atl.saveModel model="myTypeB"
>>>> path="${project}/SampleModels/RootB.xmi" />
>>>>
>>>> </target>
>>>>
>>>> <target name="modelsLoading">
>>>> <atl.loadModel modelHandler="EMF" name="TypeA" metamodel="MOF"
>>>> path="${project}/Metamodels/TypeA.ecore" />
>>>>
>>>> <atl.loadModel modelHandler="EMF" name="TypeB" metamodel="MOF"
>>>> path="${project}/Metamodels/TypeB.ecore" />
>>>>
>>>> <atl.loadModel modelHandler="EMF" name="myTypeA"
>>>> metamodel="TypeA"
>>>> path="${project}/SampleModels/RootA.xmi" /> </target>
>>>>
>>>> </project>
Re: [ATL] SideEffect example - ant build doesn't work [message #106428 is a reply to message #106348] Wed, 10 June 2009 05:55 Go to previous message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 261
Registered: July 2009
Senior Member
I filed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=279739
for this issue

William Piers wrote:
> Hello,
>
> The problem comes from the way the EMFVM manages models, which seems to
> not support model reuse.
> Could you please report a bug about that? (twice in a day,
> congratulations ;-) ).
>
> As a workaround, you can use the RegularVM instead into the ant file. I
> just updated the SideEffect example on the website.
>
> Best regards,
>
> William
>
> Henrik Rentz-Reichert a écrit :
>> Hi all,
>>
>> I've tried the SideEffect example from
>> http://www.eclipse.org/m2m/atl/basicExamples_Patterns/articl e.php?file=SideEffect/index.html
>>
>>
>> Unfortunately the ant tasks have changed in the meantime. I've adapted
>> the build.xml in the way as shown below.
>>
>> But now on execution I obtain
>>
>> ...
>> [atl.saveModel] Saving model myTypeB to
>> D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi
>>
>> BUILD FAILED
>> D:\path\to\workspace\SideEffect\Transformations\build.xml:22 : No
>> Resource found, unable to extract to path:
>> file:/D:\path\to\workspace\SideEffect\SampleModels\RootB.xmi
>>
>> If I change myTypeB to tmpTypeB it works.
>>
>> Thanks,
>> Henrik
>>
>> -------------------- build.xml ---------------------------------------
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project name="project" default="default">
>>
>> <property name="project" value="../" />
>>
>> <target name="default" depends="modelsLoading">
>> <atl.launch
>> path="${project}/Transformations/TypeA2TypeB_v3_firstStep.asm ">
>> <inModel name="a" model="myTypeA" />
>> <inModel name="TypeA" model="TypeA" />
>> <inModel name="TypeB" model="TypeB" />
>> <outModel name="b" model="tmpTypeB" metamodel="TypeB" />
>> </atl.launch>
>>
>> <atl.launch
>> path="${project}/Transformations/TypeA2TypeB_v3_secondStep.asm ">
>> <inModel name="a" model="myTypeA" />
>> <inModel name="TypeA" model="TypeA" />
>> <inModel name="TypeB" model="TypeB" />
>> <inModel name="bIn" model="tmpTypeB" />
>> <outModel name="b" model="myTypeB" metamodel="TypeB" />
>> </atl.launch>
>>
>> <atl.saveModel model="myTypeB"
>> path="${project}/SampleModels/RootB.xmi" />
>>
>> </target>
>>
>> <target name="modelsLoading">
>> <atl.loadModel modelHandler="EMF" name="TypeA" metamodel="MOF"
>> path="${project}/Metamodels/TypeA.ecore" />
>>
>> <atl.loadModel modelHandler="EMF" name="TypeB" metamodel="MOF"
>> path="${project}/Metamodels/TypeB.ecore" />
>>
>> <atl.loadModel modelHandler="EMF" name="myTypeA"
>> metamodel="TypeA"
>> path="${project}/SampleModels/RootA.xmi" />
>> </target>
>>
>> </project>
Previous Topic:[ATL] several Resources in a ResourceSet
Next Topic:[ATL] Conditional Assignment - possible?
Goto Forum:
  


Current Time: Fri Apr 26 22:23:29 GMT 2024

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

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

Back to the top