Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Generating ecore model code with maven or ant
Generating ecore model code with maven or ant [message #129771] Sat, 20 September 2008 00:27 Go to next message
Eclipse UserFriend
Originally posted by: martinfjohansen.gmail.com

Hello

I am building a project using maven where I have an ecore model from which I
want to build the model code automatically. i.e. I have a file called
PSL.ecore and I want the sources build whenever I run maven package etc so
that the correct dependencies are resolved etc. A quite common task in
maven, that is.

I have two problems:
1. The EMFgen plugin in the maven repository does not work
(net.sf.mapasuta.build.maven.plugins.maven-emfgen-plugin), and it required
the user to download the dependencies automatically, which is contrary to
the maven philosophy. Hence I don't know any maven plugin which handles
this.
2. I tried using the ant-tasks emf.Ecore2Java instead. The problem is that
I get the error-message
"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 any <presetdef>/<macrodef> declarations have
taken place."
even though the emf.Ecore2Java is mentioned in the eclipse preferences as a
possible option. This method would work if the ant task worked.

I would be interrested in any solution which would allow me to automatically
build the java model code from my ecore model, and then, especially with
maven or ant.

Thanks!
- Martin Johansen.
Re: Generating ecore model code with maven or ant [message #129786 is a reply to message #129771] Sat, 20 September 2008 01:11 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Martin,

Please use the EMF newsgroup to ask about EMF's Ant tasks.

I'm not sure what to say about the failures. EMF's Ant tasks do require
installing the tasks and Eclipse in order to work properly, but I have
no idea how Maven invokes ant tasks differently from Eclipse... It just
sounds like you've not installed the tasks properly...



Martin Johansen wrote:
> Hello
>
> I am building a project using maven where I have an ecore model from
> which I want to build the model code automatically. i.e. I have a
> file called PSL.ecore and I want the sources build whenever I run
> maven package etc so that the correct dependencies are resolved etc. A
> quite common task in maven, that is.
>
> I have two problems:
> 1. The EMFgen plugin in the maven repository does not work
> (net.sf.mapasuta.build.maven.plugins.maven-emfgen-plugin), and it
> required the user to download the dependencies automatically, which is
> contrary to the maven philosophy. Hence I don't know any maven plugin
> which handles this.
> 2. I tried using the ant-tasks emf.Ecore2Java instead. The problem is
> that I get the error-message
> "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 any <presetdef>/<macrodef> declarations have
> taken place."
> even though the emf.Ecore2Java is mentioned in the eclipse preferences
> as a possible option. This method would work if the ant task worked.
>
> I would be interrested in any solution which would allow me to
> automatically build the java model code from my ecore model, and then,
> especially with maven or ant.
>
> Thanks!
> - Martin Johansen.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Generating ecore model code with maven or ant [message #620317 is a reply to message #129771] Sat, 20 September 2008 01:11 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Martin,

Please use the EMF newsgroup to ask about EMF's Ant tasks.

I'm not sure what to say about the failures. EMF's Ant tasks do require
installing the tasks and Eclipse in order to work properly, but I have
no idea how Maven invokes ant tasks differently from Eclipse... It just
sounds like you've not installed the tasks properly...



Martin Johansen wrote:
> Hello
>
> I am building a project using maven where I have an ecore model from
> which I want to build the model code automatically. i.e. I have a
> file called PSL.ecore and I want the sources build whenever I run
> maven package etc so that the correct dependencies are resolved etc. A
> quite common task in maven, that is.
>
> I have two problems:
> 1. The EMFgen plugin in the maven repository does not work
> (net.sf.mapasuta.build.maven.plugins.maven-emfgen-plugin), and it
> required the user to download the dependencies automatically, which is
> contrary to the maven philosophy. Hence I don't know any maven plugin
> which handles this.
> 2. I tried using the ant-tasks emf.Ecore2Java instead. The problem is
> that I get the error-message
> "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 any <presetdef>/<macrodef> declarations have
> taken place."
> even though the emf.Ecore2Java is mentioned in the eclipse preferences
> as a possible option. This method would work if the ant task worked.
>
> I would be interrested in any solution which would allow me to
> automatically build the java model code from my ecore model, and then,
> especially with maven or ant.
>
> Thanks!
> - Martin Johansen.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Generating ecore model code with maven or ant
Next Topic:[Announce] EMFT COMPARE 0.9.0 I200809220348 is available
Goto Forum:
  


Current Time: Thu Mar 28 17:20:26 GMT 2024

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

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

Back to the top