Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325351

Summary: Impossible to have main modules with the same name in different packages
Product: [Modeling] Acceleo Reporter: Laurent Delaigue <laurent.delaigue>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: stephane.begaudeau
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Laurent Delaigue CLA 2010-09-15 10:01:00 EDT
Build Identifier: 3.0.0.v201006150906

I tried to generate with 2 different main modules. Both were named "main.mtl" and had a "Main.java" generated file.
At runtime in eclipse mode, the first one is systematically executed (no qualified name is used for the template name in the generated class)
In java application mode, it seemed all right but I didn't test a lot.

Reproducible: Always
Comment 1 Stephane Begaudeau CLA 2011-04-06 09:56:13 EDT
The main module is now found not by its name but by its relative path to its containing source folder. The olg MODULE_FILE_NAME value in the Java launcher generated by Acceleo was:
<module_name>

Now it will be:
/<module_folder_0_name>/<module_folder_1_name>/.../<module_folder_n_name>/<module_name>

The old behavior will also work but it will still look for the first file named <module_name>.emtl in the bundle during an Acceleo Plug-in generation.

The fix has been contributed on HEAD. It will be available in Acceleo 3.1.0M7.