Friday, June 25, 2010

How to migrate from Acceleo 2 to Acceleo 3?

Acceleo 3.0 has just been released and we have a lot of questions about how to migrate from Acceleo 2.x to Acceleo 3.x? Acceleo 3 has some differences with Acceleo 2, especially for the new syntax elements based on the Model-to-text OMG standard.

The question is : How to create the 3.x '.mtl' file from the 2.x '.mt' file?


The tooling will initialize the migration process... Just right click on the Acceleo 2.x project.


We know that the migration can't be perfect, because the MTL standard is statically typed. Sometimes you need human understanding to provide the right context and get the right equivalence. You will probably have to change the way you organize your code generators. We are confident that Acceleo 2.x users will move easily to Acceleo 3.0.

Don't worry, the Acceleo Team will continue to maintain the 2.x syntax of Acceleo. However, the new major versions and the new features will take place on Eclipse.org.

There aren't a lot of differences between the old version of acceleo and the new one. It's not so long to migrate from a syntax to another, but you should do that only if you have at least one day free. Note that it can be a little bit more for big code generation modules. Acceleo 3.0 comes with an equivalence documentation.

I hope that it will be useful...

4 comments:

Jonathan Musset said...

I put it in the FAQ :
http://wiki.eclipse.org/Acceleo/FAQ

s2o said...

Hi Jonathan,
I wrote some modules in Acceleo 2, http://s2o-bcn.blogspot.com/2009/06/mda-practical-uml-with-acceleo.html but now I'm in a new project (in a big project for a big company) and I thought to use MDA with Acceleo... (we will work with hibernate, spring and flex). And as a new project the best fit will be with Accceleo 3, so I thought to get my old modules as a started point or maybe the j2ee modules from acceleo.
But with the first try of migration I have some errors, ie: the function "hasStereotype" as unreferenced. Maybe is there any module of j2ee with acceleo 3?

Thank you very much in advance and excuse me for my English.

Sergi

PS. These days I'm investigating which will be the technology that we have to use, so I'm in a hurry...

s2o said...
This comment has been removed by the author.
s2o said...

Well, at the end I began to migrate the org.acceleo.module.pim.uml21.gen.java.common to see if it will cost to much or not...
But I'm sorry, what I can say is that after past the wizard migrate tool, there are a lot of problems to resolve and
that the migration is not so obvious.

It's a pity because the generation from scratch of that kind of module (jee module) could be too hard
and by the other hand I don't think that will be a good idea begin a new project with the version 2 of Acceleo.

Anyway I think that Acceleo is a great project.

Thank you,
Sergi