I switched from Helios to Indigo due to Papyrus compatibility issues. When I tried to build a new Acceleo module in this environment (Eclipse Indigo Release Build 20110615-0604 and Acceleo 3.1.0.v20110607-0602) I noticed that the .mtl file of my module was never built into a .java file as in the Helios version.

The option Project->Build Automatically has been activated all the time since installation. I changed the execution environment from J2SE-1.5 to JavaSE-1.6 in the "Properties for JRE System Library" dialog box and in the MANIFEST.MF file until no warning concerning to the incompatibility between J2SE-1.5 and JavaSE-1.6 appeard. But the .mtl file is still not built and the message "Selection does not contain a main type (@main annotation is missing in your main template)" keeps appearing when trying to run the template.

Does any of you have any suggestion to fix this problem?

Also, are Papyrus and Acceleo compatible? I am a newcomer and plan to use them both in my project.

I hope you can help me know, please. I am using Indigo Release Build id: 20110615-0604. In the dialog box "Generate a new Acceleo generation project" I checked the boxes labeled "Generate file" and "Main template" and set the metamodel to "http://www.eclipse.org/uml2/3.0.0/UML". Once the project is generated I se that the .java file associated to my .mtl file has been built. However, after making any change to the .mtl file the corresponded .java file indicates the following errors:

org.eclipse.uml2 cannot be resolved to a type
org.eclipse.uml2.uml.UMLPackage cannot be resolved to a type
The method isInWorkspace(Class<? extends EPackage>) in the type AbstractAcceleoGenerator is not applicable for the arguments (Class<UMLPackage>)

In Acceleo 3, the Java launcher is created to launch any templates with the following comment [comment @main/]. If you don't have this comment, the Java launcher will not be created. You need to ask to create a main module in the Acceleo wizard to have it in your template (by using the Acceleo Main Module Wizard or by checking the box "main" in the regular Acceleo wizard). If you remove this comment, the Java file will not deleted but it will not de synchronized anymore with the main module. Don't forget to export the package containing the main template too in the MANIFEST.MF (tab runtime). For more information, you can have a look at the Acceleo user guide and at the Best practices guide on the Obeo Network.

Thank you for your kind reply Stephane. I am basically following this tutorial http://wiki.eclipse.org/Acceleo/Getting_Started with what seems to be a recent Acceleo release (3.1.0 and Eclipse Indigo for x86-64 in Windows 7). I failed the first time because the .java file asociated with the file generate.mtl was not generated automatically. The second time, I generated the project by checking the boxes labeled "Generate file" and "Main template" and then I got the following error messages in the file Generate.java:

org.eclipse.uml2 cannot be resolved to a type
org.eclipse.uml2.uml.UMLPackage cannot be resolved to a type
The method isInWorkspace(Class<? extends EPackage>) in the type AbstractAcceleoGenerator is not applicable for the arguments (Class<UMLPackage>)

In my third attempt I made sure to check "Generate file" and "Main template". This time I checked the file META-INF/MANIFEST.MF and noticed that the package containing the file generate.mtl (org.eclipse.acceleo.module.sample.main) had already been exported. However the file Generate.java still has the issues above.

I want to point out that in Acceleo 3.0.2 running in Eclipse Helios for Mac OS X (PowerPC and Leopard) I have not had any problem.

Do you have a dependency with the uml project? Have a look at your MANIFEST.MF file and in the 'dependencies' tab, you should have "org.eclipse.uml2.uml" has a dependency. This is the Eclipse bundle that contains the UML metamodel and it is required to generate.