Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] discusion relative to maven integration in papyrus

Ø  (as an aside, do we have a good story for the EMF codegen situations that require editing generated code?)

 

All metamodels based on the GMF Notation metamodel, which doesn’t come with a GenModel. Especially the generated code for the Model Import tool and Viewpoints can’t be compiled immediately. They need manual fixes.

 

The Notation metamodel has been generated a long time ago, and I suspect something not standard has been used (Or maybe I just don’t know which GenModel options should be enabled :) )

 

Ø  [cwd]  That’s a good point.  I’ve even forgotten now what the motivation was for migrating the builds to Tycho in the first place.  And I think I was one of those that were advocating for it!

 

Much (much, much, much, much, much, much, much) easier to maintain and reproduce than our previous Ant/Buckminster build.

 

Camille

 

De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de Christian W. Damus
Envoyé : jeudi 19 février 2015 16:04
À : Papyrus Project list
Objet : Re: [mdt-papyrus.dev] discusion relative to maven integration in papyrus

 

Hi, François,

 

Thanks for your comments.  I have some replies to follow up, in-line below.

 

Cheers,

 

Christian

 

 

 

On Thursday, Feb 19, 2015 at 07:07, LE FEVRE FRANCOIS <francois.le-fevre@xxxxxx>, wrote:

Hi, Christian,

 

Your report « Maven Nature in Papyrus source projects” is really good.

I had really appreciated it covers all aspects from installation , to configuration, to scalability…

 

About the installation process.

Perhaps it could be good to know what is the exact version of maven on the hudson server, so we could assert that we have exactly the same environment.

You can link a specific maven instance that is not embedded within the eclipse/oomph in the installations setup/eclipse preference.

 

 

[cwd] Indeed.  However, I think the linked maven instance is only used for “Maven Builds” as run by maven launch configurations.  I see no evidence that they are used for the regular workspace builds (I tried it) and, in fact, the preference page itself makes it clear that the embedded maven is always used for dependency resolution.

 

 

 

 

Performance/Scalability

Your tests were really precise and it is a good news to see that there are no major impact in the time of each step.

They are still in the same magnitude order, even if m2e is a little longer.

 

 

[cwd]  Yes, performance definitely seems to be in the same ball-park, and I’m satisfied with that.  This was by no means a statistically rigorous experiment:  I tried to control the conditions as well as I could, but I didn’t take repeated measurements and compute means and sigmas as I would for a more formal performance test.  I’m happy to do that, of course, but it takes time.

 

 

 

Mvn clean install

If we add the nature maven, it is really important that the “mvn clean install” default command works.

This will be the basic test that will lead an external developer that comes from the maven side.

 

 

[cwd]  I think that should be fine.  None of this experiment changed the POM files or module structure in any way.  It only changed the metadata used by the Eclipse workbench.

 

I’m curious about this notion of attracting developers from Maven, which has been mentioned before.  What do you mean by that?  We’re trying to attract people interested in model-driven development with UML; Maven has nothing to do with that.  If the tools help to ease adoption, that’s great, but I expect that much of the modelling community is already familiar with Eclipse because so many of the best modelling tools are built on Eclipse already (at least the ones that Papyrus is built on).  I don’t see why Maven would attract anyone in particular …

 

 

 

Benefits

 

 

[cwd] I’d like to play a bit of the devil’s advocate in response, not be snarky or obstinate or anything, but just to make sure that I (and anybody else reading) understand both of our perspectives.  I don’t necessarily disagree on any point!  And I fully embrace my dinosaur nature when it shows itself.  :-)  In any case, it seems that we have a developer approaching Eclipse from a strong Maven background and one that is approaching Maven from a strong Eclipse background, which is great because that ensures we get a complete picture and a productive discussion.

 

 

To my humble opinion, the major benefits are:

·         Better code industrialization

 

 

[cwd] Eclipse has rather proven itself in producing industrial-strength software (witness EMF, Equinox, Eclipse Platform).  Does maven automatically improve on that?  Quality is more about what we put into the source, not what the build does with it.

 

 

o   Unify developer and releng and test environments on a common basis maven/tycho

 

 

[cwd]  One thing that my experiment seems to demonstrate is that, in fact, the Maven nature does not do much to unify these environments, except perhaps in the dependency resolution.  But, through Tycho, this all traces back to the PDE and JDT metadata anyways, so what’s the difference?  Certainly the actual mechanics of the build are still vastly different.

 

 

o   Detect many small bugs/misconfiguration (.classpath, missing pom, so missing plugin in the build process)

 

 

[cwd]  Yes, we have seen how some more issues like this cropped up.  I could say that there would be other ways to validate these configuration details, but that might be trying too hard.  ;-)

 

 

·         Improve developer’s experience

 

o   Decrease the size of the repository if we are able to generate at the fly the generated code for XTend,  EMF and GMF ( I have tried to setup a project to generate clazz diagram but I am block on a specific dependency, I will need help there)

 

 

[cwd]  Right, but there are other ways that this can be accomplished, too.  We didn’t need maven to get rid of Xtend-generated code because the Xtext builder already does that.  And we would have put the energy spent on an EMF generator maven plug-in into an Eclipse plug-in that implements this as a project builder, if we still used Buckminster for the builds, but we’re using maven so we had to do it as a maven plug-in.

 

 

o   Less git trigger

 

 

[cwd]  What does you mean by this?  Git triggers to me are a specific thing, hooks in the git system whereby actions like commit or push can be intercepted for validation, notification, and other behaviours.

 

 

o   No modification of the src-gen folders by the developers, best code practices

 

 

[cwd]  That doesn’t need maven.  And a best practice is a best practice regardless.  (as an aside, do we have a good story for the EMF codegen situations that require editing generated code?)

 

 

·         Maven galaxy

o   By using maven we could rely more on convention rather than configuration

 

 

[cwd]  I don’t know … the Maven Nature conversion modified a thousand files in my git workspace automatically …  It added more configuration than it removed.  What configuration specifically are you referring to?

 

 

o   It could be also a good start to define some api/tools independent from Eclipse and then encapsulate them for Eclipse IDE, or other workbench (web?)

 

 

[cwd]  Do you mean APIs for manipulation of Papyrus artifacts, transformations, and the like that don’t require the whole Eclipse run-time?  That is important to me, and if maven can help that, great.  But again, the Eclipse IDE also provides for a variety of execution environments at build- and run-time.  It just hasn’t been a priority for Papyrus yet.

 

 

o   It is a step for instance to develop our own maven archetype to create default papyrus eclipse plugins ensuring a shared infrastructure

 

 

[cwd]  This does sound interesting.  But, of course, Eclipse provides mechanisms for project templates, too.  I don’t know enough about maven to understand in what ways its archetypes are better.

 

 

o   We could also rely on many other plugins that will help us to refine the releng process.

 

 

[cwd]  Yes, the maven community provides a wealth of plug-ins for just about everything one can think of (except, apparently, generating EMF code?)

 

 

 

Integration

I do agree with your proposition to make the modification in the first milestone post Mars.

It could be also the good time to organize/simplify the source repository, as proposed by Benoit, by adding pom to group plugins elements together (children/module feature) and eventually to add additional repositories to separate project concepts.

 

Initially I was afraid because you use at the beginning of the report the term “it has  been proposed to convert” which was too strong, but then you precise “adding the maven nature”.

 

 

[cwd]  Yeah, by the time I had finished writing that document, I was half convinced that I myself had proposed to convert the entire set of Papyrus projects to maven. ;-)  Perhaps that the word “proposed” was not the right choice; “suggested” or even “hinted” may have been better.  It seems to have been the eventual conclusion, at any rate.

 

 

I do not want to break the amazing work that have been done, I just want to open a new way to manipulate the papyrus source code.

 

 

[cwd] Absolutely!  And I do appreciate it.  I’m engaged in this discussion because I want to understand what maven can do for us if we change our development practices to embrace it fully.  I don’t know that I personally need any more convincing, having seen that at the very least our development environment won’t take any kind of backward step and that we would have a better handle on our build dependencies.  I just want it done right for the right reasons.

 

 

And finally it is not a “new way”, as the papyrus team has already done the migration to tycho, it is just to strengthen this link papyrus/tycho/maven.

 

 

[cwd]  That’s a good point.  I’ve even forgotten now what the motivation was for migrating the builds to Tycho in the first place.  And I think I was one of those that were advocating for it!

 

 

 

Again Thanks a lot for this report.

 

Francois

 

 

 

 

De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de Christian W. Damus
Envoyé : jeudi 19 février 2015 04:24
À : Papyrus Project list
Objet : Re: [mdt-papyrus.dev] discusion relative to maven integration in papyrus

 

Hi, François, all,

 

I have completed a preliminary experiment with the M2Eclipse maven nature in a large Papyrus workspace and, I have to say, I am quite pleased with the results.  My concerns about performance and scalability turn out to be pretty much dispelled (at least as far as Papyrus is concerned).

 

Perhaps my previous experience with maven projects in Eclipse suffered from either the particular set-up of the projects I was working with, or M2Eclipse has just gotten that much better, or my memories are at least in part fictional, or some combination of all of these factors.  In short, although I don’t yet see much concrete advantage for developers in the general case to convert our source projects to the maven nature, neither do I have any objection now.  It is still something of a sweeping change that might rather wait until the summer, but of course we can discuss that.  Also, I don’t know how I could practically continue to “soak” this environment with real development work to give it a more thorough test, as I am between major feature development activities and work on a branch would imply continual merges of probably an annoying kind (considering how very many files would be different).

 

Anyhow, I have prepared what I think is a fairly upbeat report on the matter [1] and I have added a blurb with a link to the same report to the Wiki, in the Developer Guide [2].  I’d appreciate your comments.

 

Cheers,

 

Christian

 


Back to the top