| Summary: | Xtext generator should not touch MANIFEST.MF if no changes are necessary | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Daniel Weber <daniel.weber.dev> | ||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | jan, karsten.thoms, sebastian.zarnekow, sven.efftinge | ||||
| Version: | 1.0.0 | Flags: | jan:
juno+
|
||||
| Target Milestone: | M6 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Daniel Weber
P.S.: As a workaround, I disabled manifest merging for the time being. What a coincidence :-) Although we use SVN here a new project policy enforces that no source file must be touched during a build. The sources are write protected, and we stumbled yesterday over the same issue. Setting the mergeManifest property to false is no option, since we also don't want to have the generated manifest. So +1 for this bug from my side. Created attachment 176978 [details]
Hack (as stated in the comment) was there for other sections, added the same for import-package
According to the sources, there is a "hack" in org.eclipse.xtext.generator/src/org/eclipse/xtext/generator/MergeableManifest.java
// hack: reconstruct linebreaks
addRequiredBundles(Collections.<String>emptySet());
addExportedPackages(Collections.<String>emptySet());
The patch I just attached adds another line calling addImportedPackages. This seems to fix the problem I encountered, but I did not dig any deeper to check how a clean solution could replace the hack ;)
MergeableManifest has been moved in the meantime. Applied the patch to org.eclipse.xtext.util.MergeableManifest. Works fine. Pushed to MASTER. Requested via bug 522520. -M. |