Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » maven to generate genmodel, sources and eclipse plugin from an ecore
maven to generate genmodel, sources and eclipse plugin from an ecore [message #419726] Wed, 04 June 2008 08:47 Go to next message
Eclipse UserFriend
Originally posted by: chantal.taconet.it-sudparis.eu

Hi,

I would like my emf project to be a maven module.
And so I want to write a pom.xml file to automatically:
- generate the genmodel from the ecore
- generate the sources from the genmodel (model, edit, editor)
- generate the jar plugin

I found something which sounds to be appropriate to generate the
genmodel and the source for the model:
EMF generator plugin.
http://mapasuta.sourceforge.net/maven/site/maven-emfgen-plug in/index.html

But I am not sure this plugin is still available to use.
The source URL is no more available, and I have difficulties to get the
plugin.
[INFO] The plugin
'net.sf.mapasuta.build.maven.plugins:maven-emfgen-plugin' does not exist
or no valid version could be found

My description of the plugin in the pom.xml file is:
<groupId>net.sf.mapasuta.build.maven.plugins</groupId>
<artifactId>maven-emfgen-plugin</artifactId>
<version>1.0-beta-2</version>
furthermore I red information it did not work with eclipse europa.

My questions are:
- does someone use maven to generate everything from an ecore file and
how does he do ?
- does someone use MAPASUTA EMF generator plugin for that with eclipse
3.3 ?
- Any other idea ?

Previously in the emf news there were information for using ant tasks to
generate sources from xsd files:
http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg2 7179.html
But I did not find anything for maven

I found also this very interesting article:
http://www.eclipse.org/articles/article.php?file=Article-Ecl ipse-and-Maven2/index.html
interesting for eclipse plugin but nothing for emf.



Thanks for any help
--
Chantal
Re: maven to generate genmodel, sources and eclipse plugin from an ecore [message #419732 is a reply to message #419726] Wed, 04 June 2008 12:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33224
Registered: July 2009
Senior Member
Chantal,

Comments below.


Chantal Taconet wrote:
> Hi,
>
> I would like my emf project to be a maven module.
> And so I want to write a pom.xml file to automatically:
> - generate the genmodel from the ecore
> - generate the sources from the genmodel (model, edit, editor)
> - generate the jar plugin
This is normally an export step done at a later time by something like
the PDE build...
>
> I found something which sounds to be appropriate to generate the
> genmodel and the source for the model:
> EMF generator plugin.
> http://mapasuta.sourceforge.net/maven/site/maven-emfgen-plug in/index.html
I know Nick has utilities to produce a Maven repository my massaging the
results of our regular builds...
>
> But I am not sure this plugin is still available to use.
> The source URL is no more available, and I have difficulties to get
> the plugin.
> [INFO] The plugin
> 'net.sf.mapasuta.build.maven.plugins:maven-emfgen-plugin' does not exist
> or no valid version could be found
I don't know about it. I'm not sure if whomever provides it watches
this newsgroup.
>
> My description of the plugin in the pom.xml file is:
> <groupId>net.sf.mapasuta.build.maven.plugins</groupId>
> <artifactId>maven-emfgen-plugin</artifactId>
> <version>1.0-beta-2</version>
> furthermore I red information it did not work with eclipse europa.
>
> My questions are:
> - does someone use maven to generate everything from an ecore file and
> how does he do ?
> - does someone use MAPASUTA EMF generator plugin for that with eclipse
> 3.3 ?
> - Any other idea ?
Hopefully someone has information about it. I don't...
>
> Previously in the emf news there were information for using ant tasks to
> generate sources from xsd files:
> http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg2 7179.html
> But I did not find anything for maven
There are some new Maven projects starting at Eclipse, so those might be
of interest to you.
>
> I found also this very interesting article:
> http://www.eclipse.org/articles/article.php?file=Article-Ecl ipse-and-Maven2/index.html
>
> interesting for eclipse plugin but nothing for emf.
My impression from Nick's work was that any plugin could be massaged
into a maven result; he does that for each EMF build. You could track
him down on IRC's #eclipse-modeling when he's around later and ask him
about it...
>
>
>
> Thanks for any help
> --
> Chantal


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: maven to generate genmodel, sources and eclipse plugin from an ecore [message #420661 is a reply to message #419726] Mon, 07 July 2008 08:11 Go to previous message
Eclipse UserFriend
Originally posted by: chantal.taconet.it-sudparis.eu

Hi,

Finally I get the answer from the maven-emfgen-plugin developer.

There was a problem with the plugin version which was not in the central
maven repository.
With the snapshop version of maven-emfgen-plugin and the following
pom.xml configuration, it finally worked.

Now, I can generate through maven the genmodel file and the model java
generated files.
--
Chantal

pom.xml configuration:

<pluginRepositories>
<pluginRepository>
<id>mapasuta.repo</id>
<name>Mapasuta Project Download Repository</name>
<url>http://mapasuta.sf.net/maven/repo</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

<plugin>
<groupId>net.sf.mapasuta.build.maven.plugins</groupId>
<artifactId>maven-emfgen-plugin</artifactId>
<!-- this version is found in the mapasuta repository, but has
a problem to find the mojo-->
<version>1.0.1-SNAPSHOT</version>
<!-- this version is found on the central maven repository but
has an exception class not found with the eclipse launcher 3.3-->
<!--version>1.0-beta-2</version-->
<!-- this version is found in the mapasuta repository, but has
a bug about versions -->
<!--version>1.0.0</version-->
<configuration>
<baseName>CollectorView</baseName>
<genSrc>${emfgen.output.dir}/src/main/java</genSrc>
<genModel>CollectorView.genmodel</genModel>
<metaModels>

<metaModel>${basedir}/src/main/model/CollectorView.ecore</metaModel >

<metaModel>${basedir}/src/main/model/ContextView.ecore</metaModel >
</metaModels>
<packageUris>
<packageUri>collectorView</packageUri>
<packageUri>contextView</packageUri>
</packageUris>
<modelProject>mavenCAMetaModel</modelProject>
<prefixName>collectorView</prefixName>
<eclipseDir>/home/eclipseOmondoKermeta/</eclipseDir>
<eclipseVersion>3.3.0</eclipseVersion>
</configuration>
<goals>
<goal>genmodel</goal>
</goals>
</plugin>

Chantal Taconet a écrit :
> Hi,
>
> I would like my emf project to be a maven module.
> And so I want to write a pom.xml file to automatically:
> - generate the genmodel from the ecore
> - generate the sources from the genmodel (model, edit, editor)
> - generate the jar plugin
>
> I found something which sounds to be appropriate to generate the
> genmodel and the source for the model:
> EMF generator plugin.
> http://mapasuta.sourceforge.net/maven/site/maven-emfgen-plug in/index.html
>
> But I am not sure this plugin is still available to use.
> The source URL is no more available, and I have difficulties to get the
> plugin.
> [INFO] The plugin
> 'net.sf.mapasuta.build.maven.plugins:maven-emfgen-plugin' does not exist
> or no valid version could be found
>
> My description of the plugin in the pom.xml file is:
> <groupId>net.sf.mapasuta.build.maven.plugins</groupId>
> <artifactId>maven-emfgen-plugin</artifactId>
> <version>1.0-beta-2</version>
> furthermore I red information it did not work with eclipse europa.
>
> My questions are:
> - does someone use maven to generate everything from an ecore file and
> how does he do ?
> - does someone use MAPASUTA EMF generator plugin for that with eclipse
> 3.3 ?
> - Any other idea ?
>
> Previously in the emf news there were information for using ant tasks to
> generate sources from xsd files:
> http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg2 7179.html
> But I did not find anything for maven
>
> I found also this very interesting article:
> http://www.eclipse.org/articles/article.php?file=Article-Ecl ipse-and-Maven2/index.html
>
> interesting for eclipse plugin but nothing for emf.
>
>
>
> Thanks for any help
> --
> Chantal
Previous Topic:Recognize a DragAndDropCommand
Next Topic:EMF Datatypes
Goto Forum:
  


Current Time: Sat Oct 12 14:16:28 GMT 2024

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

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

Back to the top