Skip to main content


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: 22
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: 2163
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: 22
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 146 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: 2163
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 messageGo to next message
Mohammadreza Sharbaf is currently offline Mohammadreza SharbafFriend
Messages: 22
Registered: February 2016
Junior Member

Hi Dimitris,

OK, My problem was solved.

Thanks a lot for your helps.

Best regards,
Mohammadreza
Re: Load second UML model with ANT [message #1843471 is a reply to message #1725224] Sat, 31 July 2021 14:24 Go to previous messageGo to next message
Miguel Fernandes is currently offline Miguel FernandesFriend
Messages: 7
Registered: July 2021
Junior Member
Regarding the "Run in the same JRE as the workspace" option, is there any way to specify that but programatically, when calling the build.xml from Java code? (I'm using ProjectHelper for that matter)

[Updated on: Sat, 31 July 2021 14:25]

Report message to a moderator

Re: Load second UML model with ANT [message #1843487 is a reply to message #1843471] Mon, 02 August 2021 09:31 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Miguel,

I'm not familiar with ProjectHelper I'm afraid. Have you tried using AntRunner [1]? To investigate this further, a minimal example would be useful.

Best,
Dimitris

[1] http://archive.eclipse.org/eclipse/downloads/documentation/2.0/html/plugins/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ant/core/AntRunner.html
Previous Topic:Model Validation from Java Code
Next Topic:Ant "External Tool Configurations" Programatically
Goto Forum:
  


Current Time: Fri Apr 19 20:23:56 GMT 2024

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

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

Back to the top