Merge remote-tracking branch 'origin/jetty-9.4.x' into issue-1640
This commit is contained in:
commit
39aee0b18f
|
@ -25,9 +25,11 @@ import java.util.Set;
|
|||
|
||||
import javax.servlet.ServletContainerInitializer;
|
||||
|
||||
|
||||
import org.eclipse.jetty.annotations.AnnotationParser.Handler;
|
||||
import org.eclipse.jetty.osgi.boot.OSGiWebInfConfiguration;
|
||||
import org.eclipse.jetty.osgi.boot.OSGiWebappConstants;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
|
@ -184,6 +186,23 @@ public class AnnotationConfiguration extends org.eclipse.jetty.annotations.Annot
|
|||
parseBundle(context,parser,webbundle,webbundle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.annotations.AnnotationConfiguration#parseWebInfClasses(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.annotations.AnnotationParser)
|
||||
*/
|
||||
@Override
|
||||
public void parseWebInfClasses(WebAppContext context, org.eclipse.jetty.annotations.AnnotationParser parser)
|
||||
throws Exception
|
||||
{
|
||||
Bundle webbundle = (Bundle) context.getAttribute(OSGiWebappConstants.JETTY_OSGI_BUNDLE);
|
||||
String bundleClasspath = (String)webbundle.getHeaders().get(Constants.BUNDLE_CLASSPATH);
|
||||
//only scan WEB-INF/classes if we didn't already scan it with parseWebBundle
|
||||
if (StringUtil.isBlank(bundleClasspath) || !bundleClasspath.contains("WEB-INF/classes"))
|
||||
super.parseWebInfClasses(context, parser);
|
||||
}
|
||||
|
||||
/**
|
||||
* Scan a bundle required by the webbundle for servlet annotations
|
||||
* @param context The webapp context
|
||||
|
|
|
@ -128,7 +128,7 @@ public class TestOSGiUtil
|
|||
for (Bundle b : bundleContext.getBundles())
|
||||
{
|
||||
bundlesIndexedBySymbolicName.put(b.getSymbolicName(), b);
|
||||
System.err.println(" " + b.getSymbolicName() + " " + b.getLocation() + " " + b.getVersion()+ " " + b.getState());
|
||||
System.err.println(" " + b.getBundleId()+" "+b.getSymbolicName() + " " + b.getLocation() + " " + b.getVersion()+ " " + b.getState());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -20,7 +20,7 @@
|
|||
<slf4j-version>1.6.6</slf4j-version>
|
||||
<jetty-test-policy-version>1.2</jetty-test-policy-version>
|
||||
<alpn.api.version>1.1.3.v20160715</alpn.api.version>
|
||||
<jsp.version>8.5.9.1</jsp.version>
|
||||
<jsp.version>8.5.20</jsp.version>
|
||||
<!-- default values are unsupported, but required to be defined for reactor sanity reasons -->
|
||||
<alpn.version>undefined</alpn.version>
|
||||
</properties>
|
||||
|
|
Loading…
Reference in New Issue