Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325351 - Impossible to have main modules with the same name in different packages
Summary: Impossible to have main modules with the same name in different packages
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-15 10:01 EDT by Laurent Delaigue CLA
Modified: 2011-04-06 09:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.