Bug 353982 - Validation wrongly failed for dependencies exported by the container
Summary: Validation wrongly failed for dependencies exported by the container
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Libra (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Holger Staudacher CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-05 05:39 EDT by Arnaud MERGEY CLA
Modified: 2022-02-24 11:24 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arnaud MERGEY CLA 2011-08-05 05:39:16 EDT
Currently a bundle containing servlet declare javax.servlet dependency as import-package, as servlet classes are supposed to be provided by the container.
When packaging the bundle in a WAR we do not have to include explicitly javax.servlet bundle in configuration list of bundle of the war product definition.
It would be good to have such support for other JEE supposed to be provided by the container.

For example:

For a bundle responsible of sending email, it is better to declare javax.mail dependence as import-package, as javamail is provided by JEE container.

Then in web.xml the bridge servlet can be configured to export container javamail

		<init-param>
			<param-name>extendedFrameworkExports</param-name>
			<param-value>javax.mail; version=1.4, javax.mail.internet; version=1.4</param-value>
		</init-param>

But it is not possible to package such application with war tooling, because war product validation is failing, complaining about missing constraint for javamail.

Currently the only way is to either package a javamail bundle with the application, to have the WAR built, and then remove it from the war and from the config.ini bundle lists.

To summarize, there should be some kind of support in the war product tooling for dependencies defined in "extendedFrameworkExports" init param