Issue Details (XML | Word | Printable)

Key: OSGI-576
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Costin Leau
Reporter: Alin Dreghiciu
Votes: 6
Watchers: 6
Operations

If you were logged in you would be able to see more operations.
Spring OSGi

DefaultWarScanner should support also budnles that do not have a "war" extension

Created: 14/Jul/08 03:04 AM   Updated: 25/Jul/08 04:30 PM
Component/s: WEB
Affects Version/s: 1.1
Fix Version/s: 1.1.1

Time Tracking:
Not Specified


 Description  « Hide
Starting with 1.1.0 default war scanner only considers as web bundles the bundles that have a .war extension.
This breaks up existing bundles and is not suited for all situations as you could install bundles from different sources (urls), urls that not mandatory end with a .war.
Also this adds complexity to the build process based on maven bundle plugin.
A reasonable compromise can be the solution described on a related topic on Spring forum: http://forum.springframework.org/showpost.php?p=190987&postcount=12
{quote}
I understand the need to restrict configuration at some point. On the other hand, if the presence of "WEB-INF/web.xml" is not mandatory but still common in WARs, you could implement a two-stage detection logic in the extender:

1. Check for "WEB-INF/web.xml" in a given bundle -> if present, start bundle as WAR
2. If not present, check for naming pattern "*.war" -> if present, start bundle as WAR

As an alternative, you could use a special header in the manifest (similar to or even equivalent with "Web-ContextPath" which is currently supported in Spring-DM). This is not ideal with respect to OSGi standard compliance, however.

This is certainly not a major issue with the given workaround described above.
{quote}

 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
Costin Leau added a comment - 25/Jul/08 03:55 AM
Guys, I've updated the default war scanner so now it checks the presence of .war extension and then the presence of WEB-INF folder. Give it a try and let me know how it works for you.
The feature is available in the 1.1.1-SNAPSHOT.
Cheers,

Ulrik Sandberg added a comment - 25/Jul/08 08:51 AM
Works fine.

Costin Leau added a comment - 25/Jul/08 04:30 PM
Thanks - I'm marking the issue as resolved.