Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Load second UML model with ANT
Load second UML model with ANT [message #1725170] Tue, 01 March 2016 11:04 Go to next message
Mohammadreza Sharbaf is currently offline Mohammadreza SharbafFriend
Messages: 17
Registered: February 2016
Junior Member

Hi all,

I'm beginner in Epsilon. I need to load 2 or 3 UML models for comparison but when I use epsilon.loadmodel in ANT, this has BUILD FAILED for second UML model and can't create task or type epslion.loadmodel. however first UML model is loaded.

///////////////////////////////////////////////////////////////////////////////////////////
This is my build.xml:

<project default="compare">

<target name="loadModels">

<epsilon.eol>
"TESTMODEL".println();
</epsilon.eol>

<epsilon.loadModel name="V1" type="UML" impl="org.eclipse.epsilon.emc.uml.UmlModel">
<parameter name="modelFile" value="/ANTPro/V1.uml"/>
<parameter name="readOnLoad" value="true"/>
</epsilon.loadModel>

<epsilon.eol>
<model ref="V1"/>
Class.all.size().println();
</epsilon.eol>

<epsilon.emf.loadmodel name="V2" impl="org.eclipse.epsilon.emc.uml.UmlModel">
<parameter name="modelFile" value="/ANTPro/V2.uml"/>
<parameter name="readOnLoad" value="true"/>
</epsilon.emf.loadmodel>

<epsilon.eol>
<model ref="V2"/>
Class.all.size().println();
</epsilon.eol>

</target>

<target name="compare" depends="loadModels">
<epsilon.ecl src="CompareUML.ecl"
exportmatchtrace="matchTrace1">

<model ref="V1" alias="Source"/>
<model ref="V2" alias="Source"/>
</epsilon.ecl>
</target>

</project>
//////////////////////////////////////////////////////////////////////////////////////
Ant the console output is:


Buildfile: E:\eclipse-epsilon-1.2-win32-x86_64\workspace\ANTPro\build.xml

loadModels:
[epsilon.eol] TESTMODEL
[epsilon.eol] 2

BUILD FAILED
E:\eclipse-epsilon-1.2-win32-x86_64\workspace\ANTPro\build.xml:19: Problem: failed to create task or type epsilon.emf.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.


Total time: 508 milliseconds
///////////////////////////////////////////////////////////////////////////////////////////////
My Epsilon version is 1.2 and my eclipse is Luna 4.4.0

Can someone help me?
Thanks ...
Re: Load second UML model with ANT [message #1725224 is a reply to message #1725170] Tue, 01 March 2016 20:55 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1483
Registered: July 2009
Location: York, UK
Senior Member

Hi,

As stated in [1], "when running an ANT workflow that involves Epsilon tasks, please make sure you select the Run in the same JRE as the workspace option under the JRE tab of your launch configuration.".

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/workflow/
Re: Load second UML model with ANT [message #1725271 is a reply to message #1725224] Wed, 02 March 2016 08:45 Go to previous messageGo to next message
Mohammadreza Sharbaf is currently offline Mohammadreza SharbafFriend
Messages: 17
Registered: February 2016
Junior Member

Hi Dimitris,

Yes, I selected the "Run in the same JRE as the workspace" option under the JRE tab of my launch configuration.

I think, it's problem of epsilon loadmodel for loading more than one UML models.

Can you test it?

A sample project is attached.

Best regards,
Mohammadreza
  • Attachment: ANTPro.zip
    (Size: 20.02KB, Downloaded 35 times)
Re: Load second UML model with ANT [message #1725297 is a reply to message #1725271] Wed, 02 March 2016 10:21 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 1483
Registered: July 2009
Location: York, UK
Senior Member

Hi,

There seems to be a typo in line 19 of build.xml. "epsilon.loadmodel" should be "epsilon.loadModel" instead (ANT is case-sensitive).

Cheers,
Dimitris
Re: Load second UML model with ANT [message #1725303 is a reply to message #1725297] Wed, 02 March 2016 11:34 Go to previous message
Mohammadreza Sharbaf is currently offline Mohammadreza SharbafFriend
Messages: 17
Registered: February 2016
Junior Member

Hi Dimitris,

OK, My problem was solved.

Thanks a lot for your helps.

Best regards,
Mohammadreza
Previous Topic:ETL Transformations repository
Next Topic:union 2 collection
Goto Forum:
  


Current Time: Sat Nov 18 19:52:58 GMT 2017

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

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