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

Bug 354730

Summary: Plain Web Applications are not transformed on Virgo 3.0.0.RC2
Product: [RT] Virgo Reporter: Violeta Georgieva <milesg78>
Component: runtimeAssignee: Violeta Georgieva <milesg78>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dmarthaler, eclipse, glyn.normington
Version: unspecified   
Target Milestone: 3.7.0.RC01   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Sample web application
none
Patch in WebBundleTransformer
glyn.normington: review+
Patch in ManifestUpgrader and StandardBundleInstallArtifact glyn.normington: review-

Description Violeta Georgieva CLA 2011-08-15 09:43:05 EDT
Mail thread
http://dev.eclipse.org/mhonarc/lists/virgo-dev/msg00977.html
Comment 1 Violeta Georgieva CLA 2011-08-15 13:36:16 EDT
Created attachment 201505 [details]
Sample web application
Comment 2 Violeta Georgieva CLA 2011-08-15 13:43:53 EDT
Created attachment 201506 [details]
Patch in WebBundleTransformer
Comment 3 Violeta Georgieva CLA 2011-08-15 13:51:30 EDT
Created attachment 201509 [details]
Patch in ManifestUpgrader and StandardBundleInstallArtifact
Comment 4 Violeta Georgieva CLA 2011-08-15 14:06:42 EDT
Hi,

I identify 3 places where Bundle-SymbolicName, Web-ContextPath and Bundle-ManifestVersion are added to the plain web application's Manifest.mf file. Unfortunately this prevents plain web application Manifest.mf transformation when WABHeaders=strict.
Please review the patches.
Do you think that there are other uses cases that are not covered with this patch?

I'm looking forward to your comments.

Regards
Violeta
Comment 5 Chris Frost CLA 2011-08-16 07:39:06 EDT
Giving a target milestone of 3.5.0 as I don't want to hold the release up for it. Work around is to set the WABHeaders back to defaulted.
Comment 6 Glyn Normington CLA 2011-08-25 03:12:58 EDT
Comment on attachment 201506 [details]
Patch in WebBundleTransformer

There are a couple of problems with this patch.

The first is that the kernel has become "infected" with web specific code. StandardBundleInstallArtifact should not have any web specific code in it.

The second is that the following test in ManifestUpgrader looks wrong:

if (!(hasWarSuffix(installArtifact) && !specifiesWebContextPath(bundleManifest))) {

because the presence of a number of other headers can indicate a WAB, not just web context path.

Also, because this bug slipped through, I think it would be worth adding a test, probably an integration test, to check that WARs are handled correctly.

One other thing to consider. There is duplication of the hasWarSuffix logic and it might be better to add a hasExtension method to util and then use that throughout.
Comment 7 Glyn Normington CLA 2011-08-25 03:14:13 EDT
Sorry, but comment 6 should have been about the other attachment.
Comment 8 Violeta Georgieva CLA 2012-03-20 16:57:10 EDT
I'm preparing another patch.

We may think about donwporting this fix to 3.0.x as there are a lot of questions about it in the forum.
Comment 9 Glyn Normington CLA 2012-09-17 04:51:36 EDT
Since 3.5.0 has shipped, targeting 3.6.0. If this bug is more urgent, please target 3.5.1 and provide a fix.
Comment 10 Glyn Normington CLA 2012-12-19 05:27:37 EST
This has missed 3.6.0, now targetting 3.7.0.
Comment 11 daniel marthaler CLA 2017-02-01 04:22:05 EST
Tested with 3.7.0.M04