Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF.ECORE2JAVA run ant from java(EMF.ECORE2JAVA run ant from java)
EMF.ECORE2JAVA run ant from java [message #1225695] Mon, 30 December 2013 14:32 Go to next message
javs javs is currently offline javs javsFriend
Messages: 27
Registered: November 2013
Junior Member
Hello friends

I'm trying to run an ant task from java emf for the generation of code and I get the following error

Exception: _C: \ ....... \ build.xml: 37: The following error occurred while executing this line:
C: \ ................ \ build.xml: 29: Problem: failed to create task or type emf.Ecore2Java
Cause: The name is undefined.
Action: Check the spelling.
Action: Check That any custom tasks / types Have Been Declared.
Action: Check That <presetdef> any / declarations have taken place <macrodef>.


Can you help me with this?

thanks

  • Attachment: probleam.png
    (Size: 34.75KB, Downloaded 170 times)
Re: EMF.ECORE2JAVA run ant from java [message #1225703 is a reply to message #1225695] Mon, 30 December 2013 14:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Again, I'm not expert at how to invoke Ant programmatically. I'm not
sure anyone on this forum is such an expert. Nor is it clear to me why
you need such a button. The ant task requires parameters you can more
easily configure in your GenModel and once you have a GenModel you can
easily generate from it. There's even Alt-Shift-G for generating all
models in your workspace.

On 30/12/2013 3:32 PM, javs javs wrote:
> Hello friends
>
> I'm trying to run an ant task from java emf for the generation of code and I get the following error
>
> Exception: _C: \ ....... \ build.xml: 37: The following error occurred while executing this line:
> C: \ ................ \ build.xml: 29: Problem: failed to create task or type emf.Ecore2Java
> Cause: The name is undefined.
> Action: Check the spelling.
> Action: Check That any custom tasks / types Have Been Declared.
> Action: Check That <presetdef> any / declarations have taken place <macrodef>.
>
>
> Can you help me with this?
>
> thanks
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF.ECORE2JAVA run ant from java [message #1225722 is a reply to message #1225703] Mon, 30 December 2013 15:36 Go to previous messageGo to next message
javs javs is currently offline javs javsFriend
Messages: 27
Registered: November 2013
Junior Member
I want to run it through a button to call it from a plugin, but I could not do it, and I need



Re: EMF.ECORE2JAVA run ant from java [message #1225725 is a reply to message #1225703] Mon, 30 December 2013 15:44 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
HI

I'm not an expert either, although I have many scars to show for my
attempts.

Getting the ANT classpath right is really hard. Eclipse provides
integration for plugins but you're not really using a plugin since
you've contrived to have a custom classpath within a plugin classpath.
You therefore need at least to put the EMF ant tasks library on your
classpath.

Ed M recommends a GenModel, which is fine if a GenModel is enough.

I recommend an MWE script which gives you the power to sequence more
than just GenModel.

Regards

Ed Willink

On 30/12/2013 14:53, Ed Merks wrote:
> Again, I'm not expert at how to invoke Ant programmatically. I'm not
> sure anyone on this forum is such an expert. Nor is it clear to me
> why you need such a button. The ant task requires parameters you can
> more easily configure in your GenModel and once you have a GenModel
> you can easily generate from it. There's even Alt-Shift-G for
> generating all models in your workspace.
>
> On 30/12/2013 3:32 PM, javs javs wrote:
>> Hello friends
>>
>> I'm trying to run an ant task from java emf for the generation of
>> code and I get the following error
>>
>> Exception: _C: \ ....... \ build.xml: 37: The following error
>> occurred while executing this line:
>> C: \ ................ \ build.xml: 29: Problem: failed to create task
>> or type emf.Ecore2Java
>> Cause: The name is undefined.
>> Action: Check the spelling.
>> Action: Check That any custom tasks / types Have Been Declared.
>> Action: Check That <presetdef> any / declarations have taken place
>> <macrodef>.
>>
>>
>> Can you help me with this?
>>
>> thanks
>>
>>
>
Previous Topic:[EMF] XML Serialization sequentially
Next Topic:[EMF Validation] IBatchValidator.validate returns "No constraints were evaluated."
Goto Forum:
  


Current Time: Fri Mar 29 05:00:45 GMT 2024

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

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

Back to the top