Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2014-11-07 00:41:48 +0000
committerJan Bartel2014-11-07 00:43:23 +0000
commit244f97a9d1b186c4522b57cc2badfd1b056b1048 (patch)
treeac825b2590b74a27e64e679af0f917d4d387f3ce /jetty-osgi
parent0b68144a273cb4620682eec671bc8126cc6e106b (diff)
downloadorg.eclipse.jetty.project-244f97a9d1b186c4522b57cc2badfd1b056b1048.tar.gz
org.eclipse.jetty.project-244f97a9d1b186c4522b57cc2badfd1b056b1048.tar.xz
org.eclipse.jetty.project-244f97a9d1b186c4522b57cc2badfd1b056b1048.zip
Added extra debug to jetty osgi; added proper manifest to test-webapp-fragment
Diffstat (limited to 'jetty-osgi')
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractWebAppProvider.java16
-rw-r--r--jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiWebInfConfiguration.java1
2 files changed, 17 insertions, 0 deletions
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractWebAppProvider.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractWebAppProvider.java
index 849a00c55c..28f72c814f 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractWebAppProvider.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/AbstractWebAppProvider.java
@@ -252,6 +252,12 @@ public abstract class AbstractWebAppProvider extends AbstractLifeCycle implement
(overrideBundleInstallLocation == null
? BundleFileLocatorHelperFactory.getFactory().getHelper().getBundleInstallLocation(_bundle)
: new File(overrideBundleInstallLocation));
+
+ if (LOG.isDebugEnabled())
+ {
+ LOG.debug("Bundle location is {}, install location: {}", _bundle.getLocation(), bundleInstallLocation);
+ }
+
URL url = null;
Resource rootResource = Resource.newResource(BundleFileLocatorHelperFactory.getFactory().getHelper().getLocalURL(bundleInstallLocation.toURI().toURL()));
//try and make sure the rootResource is useable - if its a jar then make it a jar file url
@@ -266,6 +272,8 @@ public abstract class AbstractWebAppProvider extends AbstractLifeCycle implement
if (_webAppPath == null || _webAppPath.length() == 0 || ".".equals(_webAppPath))
{
url = bundleInstallLocation.toURI().toURL();
+ if (LOG.isDebugEnabled())
+ LOG.debug("Webapp base using bundle install location: {}", url);
}
else
{
@@ -273,16 +281,24 @@ public abstract class AbstractWebAppProvider extends AbstractLifeCycle implement
if (_webAppPath.startsWith("/") || _webAppPath.startsWith("file:"))
{
url = new File(_webAppPath).toURI().toURL();
+ if (LOG.isDebugEnabled())
+ LOG.debug("Webapp base using absolute location: {}", url);
}
else if (bundleInstallLocation != null && bundleInstallLocation.isDirectory())
{
url = new File(bundleInstallLocation, _webAppPath).toURI().toURL();
+ if (LOG.isDebugEnabled())
+ LOG.debug("Webapp base using path relative to bundle unpacked install location: {}", url);
}
else if (bundleInstallLocation != null)
{
Enumeration<URL> urls = BundleFileLocatorHelperFactory.getFactory().getHelper().findEntries(_bundle, _webAppPath);
if (urls != null && urls.hasMoreElements())
+ {
url = urls.nextElement();
+ if (LOG.isDebugEnabled())
+ LOG.debug("Webapp base using path relative to packed bundle location: {}", url);
+ }
}
}
diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiWebInfConfiguration.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiWebInfConfiguration.java
index 4482640bcf..3d006779cc 100644
--- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiWebInfConfiguration.java
+++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiWebInfConfiguration.java
@@ -105,6 +105,7 @@ public class OSGiWebInfConfiguration extends WebInfConfiguration
for (Bundle bundle : bundles)
{
+ LOG.debug("Checking bundle {}:{}", bundle.getBundleId(), bundle.getSymbolicName());
if (pattern != null)
{
// if bundle symbolic name matches the pattern

Back to the top