bug 346027 tolerate META-INF/web-fragment.xml that are inside a directory instead of a jar.
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3199 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
3b7949bc8c
commit
d6639b77b5
|
@ -69,7 +69,14 @@ public class FragmentConfiguration extends AbstractConfiguration
|
|||
{
|
||||
for (Resource frag : frags)
|
||||
{
|
||||
metaData.addFragment(frag, Resource.newResource("jar:"+frag.getURL()+"!/META-INF/web-fragment.xml"));
|
||||
if (frag.isDirectory()) //tolerate the case where the library is a directory, not a jar. useful for OSGi for example
|
||||
{
|
||||
metaData.addFragment(frag, Resource.newResource(frag.getURL()+"/META-INF/web-fragment.xml"));
|
||||
}
|
||||
else //the standard case: a jar most likely inside WEB-INF/lib
|
||||
{
|
||||
metaData.addFragment(frag, Resource.newResource("jar:"+frag.getURL()+"!/META-INF/web-fragment.xml"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue