Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Call atl ant script by java
Call atl ant script by java [message #73385] Fri, 25 January 2008 18:32 Go to next message
wong is currently offline wongFriend
Messages: 54
Registered: July 2009
Member
Hello,

I use java code to call the atl ant script, but I got this error:

java.lang.Exception: 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.

How can I fix this.

I have read the post for how to run the transformation programmatically.
But I want call the ant script which is much easier.

Thanks,

Wong.
Re: Call atl ant script by java [message #73407 is a reply to message #73385] Sat, 26 January 2008 15:18 Go to previous messageGo to next message
Daniel van 't Oever is currently offline Daniel van 't OeverFriend
Messages: 6
Registered: July 2009
Junior Member
make sure you are running the ant script from within the same VM as
Eclipse is running (via Run as... -> runtime environment )

wong wrote:
> Hello,
>
> I use java code to call the atl ant script, but I got this error:
>
> java.lang.Exception: 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.
>
> How can I fix this.
>
> I have read the post for how to run the transformation programmatically.
> But I want call the ant script which is much easier.
>
> Thanks,
>
> Wong.
>
Re: Call atl ant script by java [message #73518 is a reply to message #73407] Mon, 28 January 2008 10:40 Go to previous messageGo to next message
wong is currently offline wongFriend
Messages: 54
Registered: July 2009
Member
Hello,

I had the setting you said. I have no problem with running the ant script
manually. The problem comes when I use a java code to call the ant script.

Thanks,

Wong.
Re: [AM3] Call atl ant script by java [message #74508 is a reply to message #73518] Tue, 05 February 2008 16:37 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

Because the question is more related to AM3 than to M2M, I am putting
the GMT newsgroup in copy.

> I had the setting you said. I have no problem with running the ant
> script manually. The problem comes when I use a java code to call the
> ant script.

You can find an example in:
http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt /AM3/org.eclipse.am3.ui/src/org/eclipse/am3/ui/action/Action ANTAction.java?view=markup


Regards,

Frédéric Jouault
Previous Topic:[ATL] Called Rules Parameter Passing
Next Topic:[ATL] AtlLaunch
Goto Forum:
  


Current Time: Tue May 18 18:32:03 GMT 2021

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

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

Back to the top