Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ANT Task
ANT Task [message #1061532] Sun, 02 June 2013 12:53 Go to next message
samar sousou is currently offline samar sousouFriend
Messages: 63
Registered: March 2013
Member
Hello,
I want to implement atl ant task, I found these two links.
http://wiki.eclipse.org/AM3_Ant_Tasks
http://wiki.eclipse.org/ATL_Howtos#How_can_I_tune_the_XML_output_of_ATL

and my built.xml is :

<project name="xml2ss" default="LoadModels">
<target name="LoadModels">
<am3.loadModel metamodel="%EMF" name="XML" path="MetaModels/XML.ecore"/>
<am3.loadModel metamodel="%EMF" name="SS" path="MetaModels/SS.ecore"/>
<am3.loadModel metamodel="XML" name="myModel-A" path="Input_SMN/export.xml">
<injector name="xml"/>
</am3.loadModel>

<am3.atl path="Transformation/instance.atl">
<!--
the header of the executed transformation is:

module instance;
create OUT : SS from IN : XML;

uses librairie;


-->
<inmodel name="XML" model="XML"/>
<inmodel name="IN " model="myModel-A"/>
<inmodel name="SS" model="SS"/>
<outmodel name="OUT " model="myModel-B" metamodel="SS"/>
<library name="librairie" path="Transformation/librairie.atl" />
</am3.atl>

<am3.atl path="Interop/Transformation/SS2XML.atl">
<!--
the header of the executed transformation is:
module SS2XML;
create OUT : XML from IN : SS;

-->
<inmodel name="SS" model="SS"/>
<inmodel name="IN" model="myModel-B"/>
<inmodel name="XML" model="XML"/>
<outmodel name="OUT" model="myModel-C" metamodel="XML"/>
</am3.atl>

<am3.saveModel model="myModel-C" path="Outputs/output.xml" >
<extractor name="xml"/>
</am3.saveModel>
</target>

</project>

it works but the result is an empty xml file.

may be it is a problem xmlns!

I need your help

thank you

Samar.
Re: ANT Task [message #1061581 is a reply to message #1061532] Mon, 03 June 2013 06:48 Go to previous messageGo to next message
samar sousou is currently offline samar sousouFriend
Messages: 63
Registered: March 2013
Member
Hi Mr Hugo,
I need your help please,
I try to run the KM32XML project from this link:http://www.eclipse.org/atl/atlTransformations/ but the problem that the result is empty.


thank you,
Samar.
Re: ANT Task [message #1061607 is a reply to message #1061581] Mon, 03 June 2013 09:23 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

For the use of ATL ANT Tasks (latest version), please refer to the ATL User Guide section dedicated to it.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: ANT Task [message #1062126 is a reply to message #1061607] Thu, 06 June 2013 07:06 Go to previous messageGo to next message
samar sousou is currently offline samar sousouFriend
Messages: 63
Registered: March 2013
Member
thank you,

But I found another error when I do the extraction to an xml.

The error was :"C:\XML2XMLproject\build.xml:8: java.lang.RuntimeException: could not read value of org.eclipse.emf.ecore.impl.DynamicEObjectImpl@1435e59 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@116a984 (name: Attribute) (instanceClassName: null) (abstract: false, interface: false)) : org.eclipse.emf.ecore.impl.EClassImpl@116a984 (name: Attribute) (instanceClassName: null) (abstract: false, interface: false)"

Any help please!!

thank you,
Samar.

[Updated on: Thu, 06 June 2013 07:10]

Report message to a moderator

Re: ANT Task [message #1122335 is a reply to message #1061532] Tue, 01 October 2013 13:07 Go to previous messageGo to next message
kicha bicha is currently offline kicha bichaFriend
Messages: 11
Registered: October 2013
Junior Member
Hello,
For your example, You work with what version ATL, Eclipse, EMF?
I buil a same Example AM3, but I have this error:

loadModels:

BUILD FAILED
C:\Users\workspace_KeplerR_testAcccelo\Table2TabularHTML\build.xml:35: Problem: failed to create task or type am3.loadModel
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.



I need your help

thank you
Re: ANT Task [message #1148623 is a reply to message #1122335] Mon, 21 October 2013 16:36 Go to previous message
Fy Za is currently offline Fy ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Ouafae Aidi wrote on Tue, 01 October 2013 09:07
Hello,
For your example, You work with what version ATL, Eclipse, EMF?
I buil a same Example AM3, but I have this error:

loadModels:

BUILD FAILED
C:\Users\workspace_KeplerR_testAcccelo\Table2TabularHTML\build.xml:35: Problem: failed to create task or type am3.loadModel
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.



I need your help

thank you

For this error, you should do this:
build.xml =>run configurations => JRE => Run in the same JRE as the workspace
Previous Topic:ATL and heap space
Next Topic:Extract ATL transformation (.atl) from ATL Model (.xmi) with Java
Goto Forum:
  


Current Time: Thu Apr 25 01:05:15 GMT 2024

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

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

Back to the top