Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Searching for a guide for Maven/Gradle builds and EMF(-based) frameworks(Do a comprehesive guide to use EMF outside Eclipse exists?)
Searching for a guide for Maven/Gradle builds and EMF(-based) frameworks [message #1849968] Thu, 10 February 2022 00:48 Go to next message
Ricardo \\\"CaWal\\\" Cacheta Waldemarin is currently offline Ricardo \\\"CaWal\\\" Cacheta WaldemarinFriend
Messages: 29
Registered: January 2013
Junior Member
Hello!

First of all, I must say that EMF and other EMF-based frameworks are amazing and I really want to use them more. However, I always had problems to use them in applications outside the Eclipse IDE.

In my last project, for my PhD degree, I used EMF, Xtext and ATL implement a "framework" for model-based development of domain specific web services (JAX-RS-based). The EMF-based frameworks gave me some headaches until I got Maven working (circa 2019). Having proved my point, I passed to other PhD activities and the project was frozen for the last few years.

Nowadays I want to update the code and open my project for community use, but all my builds are broken. In this sense, i use Maven both to i) build the model-based infrastructure defined for the development of these domain -speciific services, and 2) to build the generated services as well. (Both the support infrastructure and the services share EMF metamodels and Xtext DSLs).

I've never found a comprehensive and updated guide to use EMF-based technologies with maven builds. Do it exists? EMF and related frameworks are amazing, but I think the lack of a better/easier/searchable documentation hinders the best use of them,.

Thanks in advance.
Re: Searching for a guide for Maven/Gradle builds and EMF(-based) frameworks [message #1849972 is a reply to message #1849968] Thu, 10 February 2022 06:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
I'm not sure there is really anything specific about EMF itself with respect to Maven Tycho builds. A great many projects at Eclipse use Maven/Tycho, including EMF itself. You can see how EMF's build works here:

https://ci.eclipse.org/emf/

That site also includes instructions for how to set up a local development environment where you can run the Maven/Tycho build via the external launcher provided by the project.

Oomph also uses EMF heavily:

https://ci.eclipse.org/oomph/

It provides the same type of instructions for setting up and also has external launchers to run the Maven/Tycho build locally.

I suppose things get trickier if you want to run the generators as part of the build, which I personally try to avoid because I'd rather know exactly what my build is building and when the generators change what they generated I'd like to know that, see that, and review that.

What do you think is specific about EMF that EMF-specific instructions are needed rather than generic instructions about how to build plugins and features? (Not that those are easy to find either, but there are lots of examples of complex projects in the Eclipse Git repositories.)


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Searching for a guide for Maven/Gradle builds and EMF(-based) frameworks [message #1849992 is a reply to message #1849968] Thu, 10 February 2022 13:28 Go to previous message
Pavel Vlasov is currently offline Pavel VlasovFriend
Messages: 7
Registered: March 2013
Junior Member
Hello,

My understanding of the question is that the goal is to be able to use the model jars in non-OSGi environment, say SpringBoot microservices, and have Maven-style dependencies management, i.e. pom.xml.

If this is the case, I have several examples of interdependent models built with "pure Maven" and published to Maven Central.

* Ncore model - the base of all other models below - https://github.com/Nasdanika/core/tree/master/ncore
* A number of intermediate models, you can find a list here and then navigate to the generated model documentation on the site and to the sources on GitHub - https://docs.nasdanika.org/index.html#products-overview
* Engineering Model - depends on the above models - https://github.com/Nasdanika/engineering/tree/main/model

The above examples uses old EMF dependencies because I need Java 8 compatibility for now. You can look up latest versions at Maven Central and upgrade.

By the way, the web site itself (https://docs.nasdanika.org/) was generated from an application model, which was generated from the engineering model with generated Ecore documentation "mounted" to it - in case you are interested in generating model documentation. A link to the source is in the site footer.

[Updated on: Thu, 10 February 2022 13:52]

Report message to a moderator

Previous Topic:how to make a ComboView not selectable
Next Topic:Create a runtime model using EMF
Goto Forum:
  


Current Time: Tue Apr 23 15:40:24 GMT 2024

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

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

Back to the top