From 57c2cc31faf27422e6208f0407c9d0ea130a068a Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 27 Apr 2011 00:51:08 +0000 Subject: [PATCH] 343482 refactored overlay deployer layout to use WAR layout - work in progress git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3032 7e9141cc-0065-0410-87d8-b60c137991c4 --- VERSION.txt | 1 + jetty-distribution/pom.xml | 24 ++++ ...eployer.xml => jetty-overlay-deployer.xml} | 0 .../src/main/config/overlays/tmp/README.TXT | 1 - .../jetty/overlays/OverlayedAppProvider.java | 113 +++++++++++------- .../overlays/OverlayedAppProviderTest.java | 67 ++++++----- .../myfoo=blue/WEB-INF/classes/resourceA.txt | 1 + .../myfoo=blue/WEB-INF/classes/resourceB.txt | 1 + .../WEB-INF/lib-overlay/resources.jar | Bin 0 -> 921 bytes .../{context.xml => WEB-INF/overlay.xml} | 0 .../{web.xml => WEB-INF/web-overlay.xml} | 0 .../overlays/instances/myfoo=blue/logo.png | Bin 0 -> 2128 bytes .../myfoo=green/WEB-INF/classes/resourceA.txt | 1 + .../myfoo=green/WEB-INF/classes/resourceB.txt | 1 + .../WEB-INF/lib-overlay/resources.jar | Bin 0 -> 925 bytes .../{context.xml => WEB-INF/overlay.xml} | 0 .../{web.xml => WEB-INF/web-overlay.xml} | 0 .../overlays/instances/myfoo=green/logo.png | Bin 0 -> 11230 bytes .../myfoo=red/WEB-INF/classes/resourceA.txt | 1 + .../myfoo=red/WEB-INF/classes/resourceB.txt | 1 + .../WEB-INF/lib-overlay/resources.jar | Bin 0 -> 917 bytes .../{context.xml => WEB-INF/overlay.xml} | 0 .../{web.xml => WEB-INF/web-overlay.xml} | 0 .../overlays/instances/myfoo=red/logo.png | Bin 0 -> 4499 bytes .../{context.xml => WEB-INF/overlay.xml} | 0 .../nodes/nodeA/WEB-INF/classes/resourceA.txt | 1 + .../nodes/nodeA/WEB-INF/classes/resourceB.txt | 1 + .../nodes/nodeA/WEB-INF/classes/resourceC.txt | 1 + .../nodes/nodeA/WEB-INF/classes/resourceD.txt | 1 + .../WEB-INF/lib-overlay/nodeResources.jar | Bin 0 -> 1119 bytes .../{web.xml => WEB-INF/web-overlay.xml} | 0 .../nodes/nodeB/{ => WEB-INF}/web.xml | 0 .../myfoo=foo/WEB-INF/classes/resourceA.txt | 1 + .../myfoo=foo/WEB-INF/classes/resourceB.txt | 1 + .../myfoo=foo/WEB-INF/classes/resourceC.txt | 1 + .../myfoo=foo/WEB-INF/classes/resourceD.txt | 1 + .../myfoo=foo/WEB-INF/classes/resourceE.txt | 1 + .../myfoo=foo/WEB-INF/classes/resourceF.txt | 1 + .../WEB-INF/lib-overlay/templateResources.jar | Bin 0 -> 1409 bytes .../myfoo=foo/{ => WEB-INF}/template.xml | 0 .../web-default.xml} | 0 .../{web.xml => WEB-INF/web-overlay.xml} | 0 .../overlays/templates/myfoo=foo/index.html | 10 ++ .../overlays/templates/myfoo=foo/index.jsp | 54 +++++++++ .../overlays/templates/myfoo=foo/logo.png | Bin 0 -> 2001 bytes .../root/{context.xml => WEB-INF/overlay.xml} | 0 .../home/overlays/templates/root/index.html | 7 ++ .../org/eclipse/jetty/start/start.config | 3 + .../java/org/eclipse/jetty/util/TypeUtil.java | 34 ++++++ .../eclipse/jetty/xml/XmlConfiguration.java | 49 ++------ 50 files changed, 270 insertions(+), 109 deletions(-) rename jetty-overlay-deployer/src/main/config/etc/{jetty-cloudtide-deployer.xml => jetty-overlay-deployer.xml} (100%) delete mode 100644 jetty-overlay-deployer/src/main/config/overlays/tmp/README.TXT create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/classes/resourceA.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/classes/resourceB.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/lib-overlay/resources.jar rename jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/{context.xml => WEB-INF/overlay.xml} (100%) rename jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/{web.xml => WEB-INF/web-overlay.xml} (100%) create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/logo.png create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/WEB-INF/classes/resourceA.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/WEB-INF/classes/resourceB.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/WEB-INF/lib-overlay/resources.jar rename jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/{context.xml => WEB-INF/overlay.xml} (100%) rename jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/{web.xml => WEB-INF/web-overlay.xml} (100%) create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/logo.png create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/WEB-INF/classes/resourceA.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/WEB-INF/classes/resourceB.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/WEB-INF/lib-overlay/resources.jar rename jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/{context.xml => WEB-INF/overlay.xml} (100%) rename jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/{web.xml => WEB-INF/web-overlay.xml} (100%) create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/logo.png rename jetty-overlay-deployer/src/test/resources/home/overlays/instances/root=root/{context.xml => WEB-INF/overlay.xml} (100%) create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceA.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceB.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceC.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceD.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/lib-overlay/nodeResources.jar rename jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/{web.xml => WEB-INF/web-overlay.xml} (100%) rename jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeB/{ => WEB-INF}/web.xml (100%) create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceA.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceB.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceC.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceD.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceE.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceF.txt create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/lib-overlay/templateResources.jar rename jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/{ => WEB-INF}/template.xml (100%) rename jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/{webdefault.xml => WEB-INF/web-default.xml} (100%) rename jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/{web.xml => WEB-INF/web-overlay.xml} (100%) create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/index.html create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/index.jsp create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/logo.png rename jetty-overlay-deployer/src/test/resources/home/overlays/templates/root/{context.xml => WEB-INF/overlay.xml} (100%) create mode 100644 jetty-overlay-deployer/src/test/resources/home/overlays/templates/root/index.html diff --git a/VERSION.txt b/VERSION.txt index a17343617d7..f9d5d7c8678 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -4,6 +4,7 @@ jetty-7.4.1-SNAPSHOT + 343352 make sure that jetty.osgi.boot is activated when a WAB is registered + 343567 HttpClient does not limit the destination's exchange queue + 343707 'REQUEST' is printed on console for each incoming HTTP request + + 343482 refactored overlay deployer layout to use WAR layout jetty-7.4.0.v20110414 + 342504 Scanner Listener diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index 717a6a6f88f..954d171873e 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -278,6 +278,16 @@ ** ${assembly-directory} + + org.eclipse.jetty + jetty-overlay-deployer + ${project.version} + config + jar + true + ** + ${assembly-directory} + @@ -490,6 +500,15 @@ ** ${assembly-directory}/lib + + org.eclipse.jetty + jetty-overlay-deployer + ${project.version} + jar + true + ** + ${assembly-directory}/lib + org.eclipse.jetty jetty-jsp-2.1 @@ -607,6 +626,11 @@ jetty-websocket ${project.version} + + org.eclipse.jetty + jetty-overlay-deployer + ${project.version} + org.eclipse.jetty jetty-jsp-2.1 diff --git a/jetty-overlay-deployer/src/main/config/etc/jetty-cloudtide-deployer.xml b/jetty-overlay-deployer/src/main/config/etc/jetty-overlay-deployer.xml similarity index 100% rename from jetty-overlay-deployer/src/main/config/etc/jetty-cloudtide-deployer.xml rename to jetty-overlay-deployer/src/main/config/etc/jetty-overlay-deployer.xml diff --git a/jetty-overlay-deployer/src/main/config/overlays/tmp/README.TXT b/jetty-overlay-deployer/src/main/config/overlays/tmp/README.TXT deleted file mode 100644 index 675410eb689..00000000000 --- a/jetty-overlay-deployer/src/main/config/overlays/tmp/README.TXT +++ /dev/null @@ -1 +0,0 @@ -This directory is for temporary cloudtide files diff --git a/jetty-overlay-deployer/src/main/java/org/eclipse/jetty/overlays/OverlayedAppProvider.java b/jetty-overlay-deployer/src/main/java/org/eclipse/jetty/overlays/OverlayedAppProvider.java index 5bac82655ab..f7021401a76 100644 --- a/jetty-overlay-deployer/src/main/java/org/eclipse/jetty/overlays/OverlayedAppProvider.java +++ b/jetty-overlay-deployer/src/main/java/org/eclipse/jetty/overlays/OverlayedAppProvider.java @@ -16,6 +16,7 @@ package org.eclipse.jetty.overlays; import java.io.File; import java.io.IOException; import java.net.InetAddress; +import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import java.net.URLClassLoader; @@ -145,6 +146,13 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid public final static String TEMPLATES="templates"; public final static String NODES="nodes"; public final static String INSTANCES="instances"; + + public final static String LIB="WEB-INF/lib-overlay"; + public final static String WEBAPP="."; + public final static String OVERLAY_XML="WEB-INF/overlay.xml"; + public final static String TEMPLATE_XML="WEB-INF/template.xml"; + public final static String WEB_DEFAULT_XML="WEB-INF/web-default.xml"; + public final static String WEB_FRAGMENT_XML="WEB-INF/web-overlay.xml"; enum Monitor { WEBAPPS,TEMPLATES,NODES,INSTANCES} ; @@ -153,31 +161,13 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid static { List regexes = new ArrayList(); - - regexes.add(WEBAPPS+"/[^/]*/"); - regexes.add(TEMPLATES+"/[^/]*/"); - regexes.add(NODES+"/[^/]*/"); - regexes.add(INSTANCES+"/[^/]*/"); - - regexes.add(WEBAPPS+"/[^/]*"); - regexes.add(TEMPLATES+"/[^/]*"); - regexes.add(NODES+"/[^/]*"); - regexes.add(INSTANCES+"/[^/]*"); - - regexes.add(TEMPLATES+"/[^/]*/[^/]+"); - regexes.add(NODES+"/[^/]*/[^/]+"); - regexes.add(INSTANCES+"/[^/]*/[^/]+"); - - regexes.add(TEMPLATES+"/[^/]*/lib/[^/]+"); - regexes.add(NODES+"/[^/]*/lib/[^/]+"); - regexes.add(INSTANCES+"/[^/]*/lib/[^/]+"); - - for (String s:new String[] {"/WEB-INF/lib/[^/]*","/WEB-INF/classes/[^/]*","/WEB-INF/[^/]*\\.xml",}) + + for (String s:new String[] {".war",".jar","/WEB-INF/syslib/[^/]*","/WEB-INF/lib/[^/]*","/WEB-INF/classes/[^/]*","/WEB-INF/[^/]*\\.xml",}) { regexes.add(WEBAPPS+"/[^/]*"+s); - regexes.add(TEMPLATES+"/[^/]*/webapp"+s); - regexes.add(NODES+"/[^/]*/webapp"+s); - regexes.add(INSTANCES+"/[^/]*/webapp"+s); + regexes.add(TEMPLATES+"/[^/]*"+s); + regexes.add(NODES+"/[^/]*"+s); + regexes.add(INSTANCES+"/[^/]*"+s); } for (String s: regexes) @@ -212,6 +202,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid Set changes = new HashSet(); for (String filename:filenames) { + File file=new File(filename); if (file.getName().startsWith(".") || file.getName().endsWith(".swp")) continue; @@ -232,7 +223,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid } String uri=dir+"/"+name; - + for (Pattern p : __scanPatterns) { if (p.matcher(relname).matches()) @@ -244,7 +235,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid __log.debug("{} != {}",relname,p.pattern()); } } - + if (changes.size()>0) OverlayedAppProvider.this.updateLayers(changes); } @@ -344,7 +335,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid // Build the instance lib loader ClassLoader shared_loader = shared.getWebappLoader()!=null?shared.getWebappLoader():(shared.getLibLoader()!=null?shared.getLibLoader():orig_loader); ClassLoader loader = shared_loader; - Resource instance_lib = instance.getResource("lib"); + Resource instance_lib = instance.getResource(LIB); if (instance_lib.exists()) { List libs = new ArrayList(); @@ -370,7 +361,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid // Create the instance context for the template ContextHandler context=null; - Resource template_context_xml = template.getResource("context.xml"); + Resource template_context_xml = template.getResource(OVERLAY_XML); if (template_context_xml.exists()) { __log.debug("{}: context.xml={}",origin,template_context_xml); @@ -386,7 +377,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid context=new WebAppContext(); // Set the resource base - final Resource instance_webapp = instance.getResource("webapp"); + final Resource instance_webapp = instance.getResource(WEBAPP); if (instance_webapp.exists()) { context.setBaseResource(new ResourceCollection(instance_webapp,shared.getBaseResource())); @@ -406,7 +397,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid context.setAttribute("org.eclipse.jetty.server.session.timer", _sessionScavenger); // Apply any node or instance context.xml - for (Resource context_xml : getLayeredResources("context.xml",node,instance)) + for (Resource context_xml : getLayeredResources(OVERLAY_XML,node,instance)) { __log.debug("{}: context.xml={}",origin,context_xml); XmlConfiguration xmlc = newXmlConfiguration(context_xml.getURL(),idMap,template,instance); @@ -479,7 +470,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid loader = new URLClassLoader(new URL[]{},shared_loader); // add default descriptor - List webdefaults=getLayeredResources("webdefault.xml",instance,node,template); + List webdefaults=getLayeredResources(WEB_DEFAULT_XML,instance,node,template); if (webdefaults.size()>0) { Resource webdefault = webdefaults.get(0); @@ -488,7 +479,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid } // add overlay descriptors - for (Resource override : getLayeredResources("web.xml",template,node,instance)) + for (Resource override : getLayeredResources(WEB_FRAGMENT_XML,template,node,instance)) { __log.debug("{}: web override={}",origin,override); webappcontext.addOverrideDescriptor(override.toString()); @@ -541,7 +532,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid // If we have libs directories, create classloader and make it available to // the XMLconfiguration List libs = new ArrayList(); - for (Resource lib : getLayeredResources("lib",node,template)) + for (Resource lib : getLayeredResources(LIB,node,template)) { for (String jar :lib.list()) { @@ -591,7 +582,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid // shared results of running the template and node context.xml files. // If there is a template context.xml, give it the chance to create the ContextHandler instance // otherwise create an instance ourselves - for (Resource template_xml : getLayeredResources("template.xml",template,node)) + for (Resource template_xml : getLayeredResources(TEMPLATE_XML,template,node)) { __log.debug("{}: template.xml={}",key,template_xml); XmlConfiguration xmlc = newXmlConfiguration(template_xml.getURL(),idMap,template,null); @@ -882,6 +873,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid } } + /* ------------------------------------------------------------ */ protected File tmpdir(String name,String suffix) throws IOException { File dir=_tmpDir; @@ -900,7 +892,8 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid tmp.deleteOnExit(); return tmp; } - + + /* ------------------------------------------------------------ */ /** * Walks the defined webapps, templates, nodes and instances to * determine what should be deployed, then adjust reality to match. @@ -1026,11 +1019,13 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid } + /* ------------------------------------------------------------ */ protected void removeInstance(String name) { _removedLayers.add(_instances.remove(name)); } + /* ------------------------------------------------------------ */ protected Instance loadInstance(String name, File origin) throws IOException { @@ -1039,6 +1034,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid return instance; } + /* ------------------------------------------------------------ */ protected void removeNode() { if (_node!=null) @@ -1046,6 +1042,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid _node=null; } + /* ------------------------------------------------------------ */ protected Node loadNode(File origin) throws IOException { @@ -1054,12 +1051,14 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid _node=new Node(_nodeName,origin); return _node; } - + + /* ------------------------------------------------------------ */ protected void removeTemplate(String name) { _removedLayers.add(_templates.remove(name)); } + /* ------------------------------------------------------------ */ protected Template loadTemplate(String name, File origin) throws IOException { @@ -1072,7 +1071,8 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid { _removedLayers.add(_webapps.remove(name)); } - + + /* ------------------------------------------------------------ */ protected Webapp loadWebapp(String name, File origin) throws IOException { @@ -1081,6 +1081,7 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid return webapp; } + /* ------------------------------------------------------------ */ private static List getLayeredResources(String path, Layer... layers) { List resources = new ArrayList(); @@ -1095,6 +1096,9 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid return resources; } + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ class Layer { private final String _name; @@ -1217,10 +1221,13 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid public Resource getContext() { - return getResource("context.xml"); + return getResource(OVERLAY_XML); } } - + + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ class Node extends Overlay { public Node(String name, File origin) throws IOException @@ -1229,7 +1236,10 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid } } - + + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ class ClassifiedOverlay extends Overlay { private final String _templateName; @@ -1238,9 +1248,16 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid public ClassifiedOverlay(String name, File origin) throws IOException { super(name,origin); + + int l=1; int e=name.indexOf('='); + if (e<0) + { + l=2; + e=name.indexOf("--"); + } _templateName=e>=0?name.substring(0,e):name; - _classifier=e>=0?name.substring(e+1):null; + _classifier=e>=0?name.substring(e+l):null; } public String getTemplateName() @@ -1253,7 +1270,10 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid return _classifier; } } - + + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ class Template extends ClassifiedOverlay { private Webapp _webapp; @@ -1273,7 +1293,10 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid super(name,origin); } } - + + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ class Instance extends ClassifiedOverlay { Template _template; @@ -1315,7 +1338,10 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid getLoadedKey(); } } - + + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ + /* ------------------------------------------------------------ */ static class OverlayedApp extends App { final Instance _instance; @@ -1332,4 +1358,5 @@ public class OverlayedAppProvider extends AbstractLifeCycle implements AppProvid } } + } diff --git a/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayedAppProviderTest.java b/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayedAppProviderTest.java index ffcb5a37a28..034443d6fea 100644 --- a/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayedAppProviderTest.java +++ b/jetty-overlay-deployer/src/test/java/org/eclipse/jetty/overlays/OverlayedAppProviderTest.java @@ -169,7 +169,7 @@ public class OverlayedAppProviderTest assertTrue(scanned.isEmpty()); - // Check scanning for archives + // Check scanning for directories File war = new File(_webapps,"foo-1.2.3"); war.mkdir(); File template = new File(_templates,"foo=foo-1.2.3"); @@ -178,6 +178,12 @@ public class OverlayedAppProviderTest node.mkdir(); File instance = new File(_instances,"foo=instance"); instance.mkdir(); + for (File f : new File[] { war,template,node,instance } ) + { + File webinf = new File(f,"WEB-INF"); + webinf.mkdir(); + touch(webinf,"web.xml"); + } provider.scan(); provider.scan(); @@ -204,10 +210,10 @@ public class OverlayedAppProviderTest for (File d : new File[]{template,node,instance}) { - touch(d,"web.xml"); - touch(d,"context.xml"); - touch(d,"other"); - touch(d,"webapp/WEB-INF/lib/bar.jar"); + touch(d,"WEB-INF/web-fragment.xml"); + touch(d,"WEB-INF/overlay.xml"); + touch(d,"WEB-INF/other"); + touch(d,"WEB-INF/lib/bar.jar"); } provider.scan(); @@ -223,9 +229,8 @@ public class OverlayedAppProviderTest // Touch xml Thread.sleep(1000); // needed so last modified is different - touch(war,"WEB-INF/web.xml"); - for (File d : new File[]{template,node,instance}) - touch(d,"context.xml"); + for (File d : new File[]{war,template,node,instance}) + touch(d,"WEB-INF/web.xml"); provider.scan(); provider.scan(); results = scanned.poll(); @@ -238,9 +243,8 @@ public class OverlayedAppProviderTest // Touch XML Thread.sleep(1000); - touch(war,"WEB-INF/spring.XML"); - for (File d : new File[]{template,node,instance}) - touch(d,"webapp/WEB-INF/spring.XML"); + for (File d : new File[]{war,template,node,instance}) + touch(d,"WEB-INF/spring.XML"); provider.scan(); provider.scan(); results = scanned.poll(); @@ -253,21 +257,17 @@ public class OverlayedAppProviderTest // Touch unrelated - touch(war,"index.html"); - for (File d : new File[]{template,node,instance}) - touch(d,"webapp/index.html"); + for (File d : new File[]{war,template,node,instance}) + touch(d,"index.html"); provider.scan(); provider.scan(); results = scanned.poll(); - assertEquals(1,results.size()); - assertTrue(results.contains("webapps/foo-1.2.3")); - + assertEquals(null,results); // Touch jar Thread.sleep(1000); - touch(war,"WEB-INF/lib/bar.jar"); - for (File d : new File[]{template,node,instance}) - touch(d,"webapp/WEB-INF/lib/bar.jar"); + for (File d : new File[]{war,template,node,instance}) + touch(d,"WEB-INF/lib/bar.jar"); provider.scan(); provider.scan(); results = scanned.poll(); @@ -280,9 +280,7 @@ public class OverlayedAppProviderTest // touch other class Thread.sleep(1000); - touch(war,"WEB-INF/other.txt"); - touch(war,"index.html"); - for (File d : new File[]{template,node,instance}) + for (File d : new File[]{war,template,node,instance}) touch(d,"index.html"); provider.scan(); provider.scan(); @@ -414,15 +412,20 @@ public class OverlayedAppProviderTest // Add a war dir File warDir = new File(_webapps,"foo-1.2.3"); warDir.mkdir(); + File warDirWI = new File(warDir,"WEB-INF"); + warDirWI.mkdir(); + touch(warDirWI,"web.xml"); provider.scan(); provider.scan(); assertEquals("loadWebapp foo-1.2.3",scanned.poll(1,TimeUnit.SECONDS)); assertEquals(warDir.getAbsolutePath(),scanned.poll(1,TimeUnit.SECONDS)); - // Add a template dir File templateDir = new File(_templates,"foo=foo-1.2.3"); templateDir.mkdir(); + File templateDirWI = new File(templateDir,"WEB-INF"); + templateDirWI.mkdir(); + touch(templateDirWI,"web.xml"); provider.scan(); provider.scan(); assertEquals("loadTemplate foo=foo-1.2.3",scanned.poll(1,TimeUnit.SECONDS)); @@ -431,6 +434,9 @@ public class OverlayedAppProviderTest // Add a node dir File nodeADir = new File(_nodes,"nodeA"); nodeADir.mkdir(); + File nodeADirWI = new File(nodeADir,"WEB-INF"); + nodeADirWI.mkdir(); + touch(nodeADirWI,"web.xml"); provider.scan(); provider.scan(); assertEquals("loadNode",scanned.poll(1,TimeUnit.SECONDS)); @@ -439,6 +445,9 @@ public class OverlayedAppProviderTest // Add another node dir File nodeBDir = new File(_nodes,"nodeB"); nodeBDir.mkdir(); + File nodeBDirWI = new File(nodeBDir,"WEB-INF"); + nodeBDirWI.mkdir(); + touch(nodeADirWI,"web.xml"); provider.scan(); provider.scan(); assertTrue(scanned.isEmpty()); @@ -446,6 +455,9 @@ public class OverlayedAppProviderTest // Add an instance dir File instanceDir = new File(_instances,"foo=instance"); instanceDir.mkdir(); + File instanceDirWI = new File(instanceDir,"WEB-INF"); + instanceDirWI.mkdir(); + touch(instanceDirWI,"web.xml"); provider.scan(); provider.scan(); assertEquals("loadInstance foo=instance",scanned.poll(1,TimeUnit.SECONDS)); @@ -464,11 +476,8 @@ public class OverlayedAppProviderTest assertTrue(scanned.isEmpty()); // Touch directories - touch(warDir,"WEB-INF/web.xml"); - touch(templateDir,"context.xml"); - touch(nodeADir,"context.xml"); - touch(nodeBDir,"context.xml"); - touch(instanceDir,"context.xml"); + for (File d : new File[]{warDir,templateDir,nodeADir,nodeBDir,instanceDir}) + touch(d,"WEB-INF/web.xml"); provider.scan(); provider.scan(); assertEquals(8,scanned.size()); diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/classes/resourceA.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/classes/resourceA.txt new file mode 100644 index 00000000000..9c74ff39523 --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/classes/resourceA.txt @@ -0,0 +1 @@ +instance myfoo=blue WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/classes/resourceB.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/classes/resourceB.txt new file mode 100644 index 00000000000..9c74ff39523 --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/classes/resourceB.txt @@ -0,0 +1 @@ +instance myfoo=blue WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/lib-overlay/resources.jar b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/lib-overlay/resources.jar new file mode 100644 index 0000000000000000000000000000000000000000..a94e69bb0ea974a806898e43834bf336f9062ec1 GIT binary patch literal 921 zcmWIWW@Zs#-~d9m+EiNxB*4kQ!r%MB z$s^K|8W}9ppK1O`QxktG9xgV0$ulwSif5{?Gd~r5EMf#ZWMA~3Aa|fOAdGN`LIkQW zc!9D-sm1xFMaij-dLDN))(VOQ+zvj9q!k<`0p6@^ PApfudVJ1*g3LMG+U~j=h literal 0 HcmV?d00001 diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/context.xml b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/overlay.xml similarity index 100% rename from jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/context.xml rename to jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/overlay.xml diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/web.xml b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/web-overlay.xml similarity index 100% rename from jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/web.xml rename to jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/WEB-INF/web-overlay.xml diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/logo.png b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=blue/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..21e0d3024a490381a6fd603b940c2ea19e627b01 GIT binary patch literal 2128 zcma)7c{Cg77Ee%HY!#}OQd_mhSUO5uJJFIB&1(^DT1y43h-NATK~#yFv39homZt5L zc1A2k&s8Sx*@N z0H{KJye>+SBo(Bhyz~W9oC^0K{-U=hppI_vm-M5A@wpri0D!=I0t7s+I4D&rV4;3z z6ed8j+8U;dSC#6dDqZZEU@YVo8XXyj1wd{`hGQd? zkTk)sz+(c&4)wX|zi!OR%IX7{%iR3MYs%)1y!LTpEvK`GQ0J}g|LZ9v_k~*G#aG4t z-XDe!=n^x5cGzD@GW=#GN3usz&pkb5q2h~<2_lCRQEMEVg!G^gDt>V6HQQk#!CP^i zPjtooV)|)Zmw+~fXSfLd_IwIcG_KQ7`qACT-58i%l;J6(EJZmjDJmV!lGD=<4eV>N@7xsHNG%v?yzw*0IQ3G0MiA;QMkC`!5 z9ECtM>ds}B#1##z*Xb(GdV4M-ADxm5#=T!%B3@D+9yy z0sat1Wgz2)Ip#CY(Rw9#aOh_lqGv;jOUbT$45OLa)f|wtWULc|lHe5XVhG1Og7+sg zPqTAI%%=sdp;L{I$}INPx`A*u8F2Q!batz6cD|*tz4bL40S?P;3N}6Fz#47ft@C`^OY?(Ij-Tfiw zW7E0noHgyOzb6fZv?k1JWj!_8D;7*_;M+Ak)d%iMn5DcY!b$U4$8Q*EeI&B9F;Q-# zfsnv+{i3tTc)9ToWO@CkO=Zbu+cpqVqvxSOT)-I;!;DS7htwp-9mcUb#Ly#jORdzT>cYu5e{9aQgUO#~lgjW(yxO6$A#;V`!8M&szSD%>3FMYVp+XVS>}rO8A13aCAbcb^8a^wF+sW6@ObHu6^KbZIBuMZ&N@g z?d?vd(&P|3qMY#O9XIXZAV{m93p{kD2`w7k zcX+`+_?uP-q1&%jj>}nDpM0}G1y%#BwJ-cKbBu}ZRJ49 zd>#&`6T>5MU39L``6G<3)n`JO;qD;IfJ~2rRqEb_*S7QYz`sfJbg`9&$TcUr_K@!wkIA!j7S&STue}OaVqsj=G8#*Z?O7&y*`j zz9yJeVBOJ_FiWpgDi3@Mvv^k z=_y9vmUXFo$qYYO8zGh?))GnJXqf!flgi5Lq_Bz7Qr-%g$Ws|y&ru`FA`q?U#)p@K zfmHXSa(Gva`mA)Fn%Xb-CQpBN;zV2Ws}f`@={BYs|G-PSOiwthTWm9b9!Y>9lYVJD ztnN^sUpO=~Bg$|!@;%5GCzpNf4Q+u&%vji2`Q-24GJ4HkD*P7y>`@i#kGeuNJLO6* zGG{XR(IyG~{mukxl6lUYB-DK16h34HYtxv@4O5-w5NMn1mimu7+a1CID{E`d>n6XS zZQ5tr#F}L0gIR&76~pDq!33aSGHxPb^>4^*c2WybIk>RWvI zcu}ozz%M6Ez39G*cI2AH6S;4I%d%k$)r(XLL`E45O;5UE-64PO8|T{{dZu B2IT+% literal 0 HcmV?d00001 diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/WEB-INF/classes/resourceA.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/WEB-INF/classes/resourceA.txt new file mode 100644 index 00000000000..4817b3f04de --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/WEB-INF/classes/resourceA.txt @@ -0,0 +1 @@ +instance myfoo=green WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/WEB-INF/classes/resourceB.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/WEB-INF/classes/resourceB.txt new file mode 100644 index 00000000000..4817b3f04de --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/WEB-INF/classes/resourceB.txt @@ -0,0 +1 @@ +instance myfoo=green WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/WEB-INF/lib-overlay/resources.jar b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=green/WEB-INF/lib-overlay/resources.jar new file mode 100644 index 0000000000000000000000000000000000000000..bfce59a00ba557902d2b7f79105a59e54642e38a GIT binary patch literal 925 zcmWIWW@Zs#-~d9m+EiNxB*4kQ!r%MB z$s^K|8W}9ppK1O`QxktG9xgV0$ulwSif5{?Gd~r5EMf#ZWMA~3Aa|fOAdGN`LIkQW zc!9D-sm1xFMaij-dLO>P$oyj&8Jsy!mz?)=K8JR>FP}2u2@v?|00l*)@I^FVW%c)H>sUxc_%ydDB#rPTGT-+`zH*-K?)DzO z06A}aYhQaiT7PF>Ct5{ibuGh491;M47N9IIqZhD#9%}4EY3O}x?)sbPaa6yGCDoCd z$t|Ad>EvnlX&3#y@bL)GiVUiQ3rfqH~ zx~Re4_^v$$PuboX8YzUQx72<24Nj8yt4jhg*U3@I5Ve)OrpQB)P&(4?bb?1(`}eS@jX4SoCJ$4ZaKmNt)QriY zk>Z2)c%_m&`wLW|Z6RmNXgmx0iW@m9;Mca?)vT(^xil(jx`IAkV9ev8=&2x?7DxMD`V(E?Z0E)BLlxh^P|o zO7yKjcr$Y_RjX}tvzz{!itz;Nsz&e^c6G8#0FI?tsy}GFOUkM!F<_ka_jFpBEboIq zN{5Q>G1ENwB4MniJSMlMDjQ#xO?Rt>;+@*n&Gm_zC z2()Z1)h2MRt_5t}wxmOa*SYv8Wwo2rH}gh(`4=ec3rl6T_b3WMO2_(2_P6yF$s1Qw zG;tR7#9o|a9a+|LXnlfWTCdS~PJLg8Duy}kide@Yus8xO0V{kAl~_%$yFsnGm{aWv zE6G7e$2s3!;*f(}cyXjS%x(C$h*oI(S68bmdX)f?LY_7 zAVX1|`d1dyy7vu>P=gq}(g*Xk^JyFgZ1!bgB;iSx&bj@yg zm=Z!}$@`ws=9V)L)WY_JA>_#?b}}Pg;{qMA^90-MJsGFQ=1#LqCHd^{ru=PwK~h^g z^LODzufol>In6BPP__d#XO*$kWxubM!G_qUMLtVpj+eHRWH7gL7ge{Gn^+T4$0DC1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aphb~*Dvwi$iHBX-5iIC<6OkNDq^wyXRa5xpiBD^13J;?|Gk%am` zoA`tDD5m@m(1#*$sxiA|GKa?4RTV_wZSp&p)?^DK-y%r{NQy zHK`!#r8>&u+*(pf06ov}>3o^q-H-hMXM!I#=6x>RZ>KlTieBd*DB(%rP)_z%s zW4@tNSpdNuu-(qjsDpiYFMLM6B=mMAg`3h5&K=0T-c5xj#{G_+6o2V+#QsFCxk6;ax z+b<7OlqI6Z|J~v&8sNLM40eo8muF@hm;P8h7xv%qD!KBnEe5zNxdr}zMp^$`{(baM Zis-IhA44|S9zJ^uP=2o=-y&-j^*>XfsSW@D literal 0 HcmV?d00001 diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/WEB-INF/classes/resourceA.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/WEB-INF/classes/resourceA.txt new file mode 100644 index 00000000000..47d45478c5d --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/WEB-INF/classes/resourceA.txt @@ -0,0 +1 @@ +instance myfoo=red WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/WEB-INF/classes/resourceB.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/WEB-INF/classes/resourceB.txt new file mode 100644 index 00000000000..47d45478c5d --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/WEB-INF/classes/resourceB.txt @@ -0,0 +1 @@ +instance myfoo=red WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/WEB-INF/lib-overlay/resources.jar b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/myfoo=red/WEB-INF/lib-overlay/resources.jar new file mode 100644 index 0000000000000000000000000000000000000000..994a698f89908e6960d52c925a82c2255ac6b45a GIT binary patch literal 917 zcmWIWW@Zs#-~d9m+EiNxB*4kQ!r%MB z$s^K|8W}9ppK1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wi`2eYyr%3SCT@(dBYUx^>px{0Mq7y1LAw$ z*vK#sGml2bv$70uzpM@qr~UhFuDON=%F7exoN(ldRHK#Zg%{Yj3l4r?V`Hhh+Li}; zYyrG@G26{zVVRmen+_eiPqj7}=-fFMit!T97!TDXvWeAssHgakTr#J)Z; zwg7Hyq&ahj@1{(1DJ+zDAnol`Q9&6Q6cS?HYVGe&1qF2eJX2d7d6p~(>BI^Atuk3oXlTWxq6iyh{_+h`O}|b{d%rzP-K9I3FfLQ6cwSR z#nCGU!opBcfZSY>R|CiZ4?ss*b;Xh;*tijiiKA}B|7QT3^{;o|#b5ry_+Fv2Gdw&H8;iATv0#Ct zmukrX4>!!lpsiDxSR~IOhZRXc?x8JWs(7w lNd{OZ8DN=YfMpU${{?9R0`h)Cw8j7c002ovPDHLkV1i3!hME8X literal 0 HcmV?d00001 diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/instances/root=root/context.xml b/jetty-overlay-deployer/src/test/resources/home/overlays/instances/root=root/WEB-INF/overlay.xml similarity index 100% rename from jetty-overlay-deployer/src/test/resources/home/overlays/instances/root=root/context.xml rename to jetty-overlay-deployer/src/test/resources/home/overlays/instances/root=root/WEB-INF/overlay.xml diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceA.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceA.txt new file mode 100644 index 00000000000..170b5badf10 --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceA.txt @@ -0,0 +1 @@ +node WEB-INF lib diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceB.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceB.txt new file mode 100644 index 00000000000..170b5badf10 --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceB.txt @@ -0,0 +1 @@ +node WEB-INF lib diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceC.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceC.txt new file mode 100644 index 00000000000..170b5badf10 --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceC.txt @@ -0,0 +1 @@ +node WEB-INF lib diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceD.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceD.txt new file mode 100644 index 00000000000..170b5badf10 --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/classes/resourceD.txt @@ -0,0 +1 @@ +node WEB-INF lib diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/lib-overlay/nodeResources.jar b/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/lib-overlay/nodeResources.jar new file mode 100644 index 0000000000000000000000000000000000000000..61f42e6bba84d32596a39bb328f2b079b7348828 GIT binary patch literal 1119 zcmWIWW@Zs#-~htkHL11?NPv@pg~8V~#8KDN&rSc|DFy~+h5&DN4v-2asImZ@nni#r z;F^6M{XE@VgG2Ou-9G!CIql=Et9OytTUYDcne&^246YbIcv__A<*VcAd$DvC3+IfN zl1HQ^H8NPHKhyk?rY8PWJX~!0l4oMt70*;(XMQUBSi}f+$iC=5LGD0nKp5c==5SPB z@B(FvQj7CTi;`0v^-3yAPM`Mo3_Wqu=MfXwl-;#mGTcBloJ5=AL={tJs#fHv2cV!Z literal 0 HcmV?d00001 diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/web.xml b/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/web-overlay.xml similarity index 100% rename from jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/web.xml rename to jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeA/WEB-INF/web-overlay.xml diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeB/web.xml b/jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeB/WEB-INF/web.xml similarity index 100% rename from jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeB/web.xml rename to jetty-overlay-deployer/src/test/resources/home/overlays/nodes/nodeB/WEB-INF/web.xml diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceA.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceA.txt new file mode 100644 index 00000000000..9e00184c94d --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceA.txt @@ -0,0 +1 @@ +template WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceB.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceB.txt new file mode 100644 index 00000000000..9e00184c94d --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceB.txt @@ -0,0 +1 @@ +template WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceC.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceC.txt new file mode 100644 index 00000000000..9e00184c94d --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceC.txt @@ -0,0 +1 @@ +template WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceD.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceD.txt new file mode 100644 index 00000000000..9e00184c94d --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceD.txt @@ -0,0 +1 @@ +template WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceE.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceE.txt new file mode 100644 index 00000000000..9e00184c94d --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceE.txt @@ -0,0 +1 @@ +template WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceF.txt b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceF.txt new file mode 100644 index 00000000000..9e00184c94d --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/classes/resourceF.txt @@ -0,0 +1 @@ +template WEB-INF classes diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/lib-overlay/templateResources.jar b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/WEB-INF/lib-overlay/templateResources.jar new file mode 100644 index 0000000000000000000000000000000000000000..4fb379cb2220dd66d34ba0b3464bb9de108ad426 GIT binary patch literal 1409 zcmWIWW@Zs#-~hslHL11?NPv@pg~8V~#8KDN&rSc|DFy~+h5&DN4v-2asImZ@nni#r z;F^6M{XE@VgG2Ou-9G!CIql=Et9OytTUYDcne&^246YbIcv__A<*VcAd$DvC3+IfN zl1HQ^H8NPHKhyk?rY8PWJX~!0l4oMt70*;(XMQUBSi}f+$iC=5LGD0nKp5eW#xPW0 z@B(FvQj7CTi;`0v^-3yAv^~%2p77N13_Wqu=MfXwB!^oM`1pb9Kx&CI$%$$vIaAFf z7pj@$N;Q+*sAiHoNhX~@OUuZqz>_GG7@0&EQ1b;W(Sz~@Du5?+P%a7ZM%9X(OhLH< z0YJG8t`#YdAe#V6&dA9VqQ#0{eqmZ& zzC+RqPN2kVwE#vPESSJ4l6b96NLs;35LqiImEn$@Ge}y&X)eHTemplate foo webapp + + +Should see index.jsp instead of this!!! + +

+Red, +Blue, +Green diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/index.jsp b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/index.jsp new file mode 100644 index 00000000000..569338d2448 --- /dev/null +++ b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/index.jsp @@ -0,0 +1,54 @@ + +<%@page import="java.io.BufferedReader"%> +<%@page import="java.io.InputStreamReader"%> +<%@page import="java.util.Enumeration"%> +

<%=application.getServletContextName()%>

+ + +

+Red, +Blue, +Green +

+ +

Overlays

+webapp=<%=application.getInitParameter("webapp")%>
+template=<%=application.getInitParameter("template")%>
+node=<%=application.getInitParameter("node")%>
+instance=<%=application.getInitParameter("instance")%>
+ +

Init Parameters

+<% +Enumeration e=application.getInitParameterNames(); +while (e.hasMoreElements()) +{ + String name=e.nextElement().toString(); + String value=application.getInitParameter(name); + out.println(name+": "+value+"
"); +} +%> +

Attributes

+<% +e=application.getAttributeNames(); +while (e.hasMoreElements()) +{ + String name=e.nextElement().toString(); + String value=String.valueOf(application.getAttribute(name)); + out.println(name+": "+value+"
"); +} +%> +

Resources

+<% +ClassLoader loader = Thread.currentThread().getContextClassLoader(); +%> +resourceA.txt=<%=new BufferedReader(new InputStreamReader(loader.getResource("resourceA.txt").openStream())).readLine()%>
+resourceB.txt=<%=new BufferedReader(new InputStreamReader(loader.getResource("resourceB.txt").openStream())).readLine()%>
+resourceC.txt=<%=new BufferedReader(new InputStreamReader(loader.getResource("resourceC.txt").openStream())).readLine()%>
+resourceD.txt=<%=new BufferedReader(new InputStreamReader(loader.getResource("resourceD.txt").openStream())).readLine()%>
+resourceE.txt=<%=new BufferedReader(new InputStreamReader(loader.getResource("resourceE.txt").openStream())).readLine()%>
+resourceF.txt=<%=new BufferedReader(new InputStreamReader(loader.getResource("resourceF.txt").openStream())).readLine()%>
+resourceG.txt=<%=new BufferedReader(new InputStreamReader(loader.getResource("resourceG.txt").openStream())).readLine()%>
+resourceH.txt=<%=new BufferedReader(new InputStreamReader(loader.getResource("resourceH.txt").openStream())).readLine()%>
+resourceI.txt=<%=new BufferedReader(new InputStreamReader(loader.getResource("resourceI.txt").openStream())).readLine()%>
+resourceJ.txt=<%=new BufferedReader(new InputStreamReader(loader.getResource("resourceJ.txt").openStream())).readLine()%>
+resourceK.txt=<%=new BufferedReader(new InputStreamReader(loader.getResource("resourceK.txt").openStream())).readLine()%>
diff --git a/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/logo.png b/jetty-overlay-deployer/src/test/resources/home/overlays/templates/myfoo=foo/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..b633447fff53fc3da462aecd0899c2255d0f53b2 GIT binary patch literal 2001 zcmbVNc{JN=8vZ4%ec!@G3AI)%b!|;-Rk^WdEOilDQA-7-LMs%dxArP()Y_|hYpJxB ztCb0jEmZ9dMTJsJLW`od+V8J3bLNlvXU>^(zW001_nvP#&v)MEeNr8;7y({sUH||D ztgS4aKzs~_FE=MRLmE(-KOo!*V*ykT$bJSFJlCz_Co!O0#D7m`ogcyt&y_U0d6=qvkTLig~}W5sBV? z;X&!yS)F#7Fg7&UDH~hz^Y!&*5bJLc`eR+1OQ>4-(9jw{IImYZ^6O-FYAR1^*PO1d zuHydoiWoqgY3JzNy0yKW9l1JXttXxP^VI=vKwVAEN@lt#vL+CfmX@X@%x#5$<+Qb( z52JcQ&5=kXO#I!_Ru9>=MhTYQ{ozBtp1wX0KnM)P=`ED8v5rwwNre7K^`9gP)d#OeN8?0_ zG~89zSx;%SQzj-RgxeM9hh^*m_ch(wn@tcPbh^27RRPU(Z6K}BqI(8GDqO%nJheuG zs=ZnSfwld^{QUgZzP`RYKmYnlZY^{H3xT|BXn+D$WOCTt8-aTn84B4}a9Fy66#o+n zMKU)x*S+bshlfm3Qj(5|NrpK*zM;VYFu!)~#TWhhp>G?2wd;5$pwAYtw0!?wm z1%#0;G%dwA?!XPq1dsoT-i)T@+o^;#eH>yk&m@?`gP=(k3IqZ{B$=)NOGgXJnS-p7@MLHM^ z#?jT4i#)|=v&g!$K`N?j_Cu4n10w{CuNbSUb@_FrThRLln1QTx z6u!K?e7-f|MAby5pq#PVI?0&2;k&`^Pty&jIBJ$n*)hqi4$s(F+LPs64Ogd|?|cg} z*p-kTGz5i0al{+R3Q}YD8}8D*d6MbGrBO|gFx0%UsR?a4f3Uj&HBU=V%LCd7+N zNE|xS3SPSQrc%?=c%zPwXm(hv%Fg$dDH_ThYbz(N(+iC@mV?0KTD%-b7dChRbqx(M zk?f%%CkR|f-qcQgY;4+3GoI!OHe*q9F<57fEwmpX8pmIz%P z{G9^;t5r9%Cloudtide Deployer Demo + +

+Red, +Blue, +Green diff --git a/jetty-start/src/main/resources/org/eclipse/jetty/start/start.config b/jetty-start/src/main/resources/org/eclipse/jetty/start/start.config index c5fe090819b..620dd8fbc1e 100644 --- a/jetty-start/src/main/resources/org/eclipse/jetty/start/start.config +++ b/jetty-start/src/main/resources/org/eclipse/jetty/start/start.config @@ -149,6 +149,9 @@ $(jetty.home)/lib/jetty-http-$(version).jar [All,websocket] $(jetty.home)/lib/jetty-websocket-$(version).jar ! available org.eclipse.jetty.websocket.WebSocket +[All,overlay] +$(jetty.home)/lib/jetty-overlay-deployer-$(version).jar ! available org.eclipse.jetty.overlay.OverlayedAppProvider + # Add ext if it exists [Server,All,default,ext] diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/TypeUtil.java b/jetty-util/src/main/java/org/eclipse/jetty/util/TypeUtil.java index 78cc36492d7..d13857a41ea 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/TypeUtil.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/TypeUtil.java @@ -18,6 +18,7 @@ import java.io.InputStream; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.lang.reflect.Modifier; import java.net.URL; import java.util.Arrays; import java.util.Collections; @@ -513,4 +514,37 @@ public class TypeUtil } return null; } + + public static Object call(Class oClass, String method, Object obj, Object[] arg) + throws InvocationTargetException, NoSuchMethodException + { + // Lets just try all methods for now + Method[] methods = oClass.getMethods(); + for (int c = 0; methods != null && c < methods.length; c++) + { + if (!methods[c].getName().equals(method)) + continue; + if (methods[c].getParameterTypes().length != arg.length) + continue; + if (Modifier.isStatic(methods[c].getModifiers()) != (obj == null)) + continue; + if ((obj == null) && methods[c].getDeclaringClass() != oClass) + continue; + + try + { + return methods[c].invoke(obj,arg); + } + catch (IllegalAccessException e) + { + Log.ignore(e); + } + catch (IllegalArgumentException e) + { + Log.ignore(e); + } + } + + throw new NoSuchMethodException(method); + } } diff --git a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java index 08a61bfaacf..20109df106f 100644 --- a/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java +++ b/jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java @@ -209,7 +209,7 @@ public class XmlConfiguration } catch (Exception e) { - Log.ignore(e); + Log.warn(e); } if (_processor!=null) break; @@ -684,44 +684,21 @@ public class XmlConfiguration if (Log.isDebugEnabled()) Log.debug("XML call " + method); - // Lets just try all methods for now - Method[] methods = oClass.getMethods(); - for (int c = 0; methods != null && c < methods.length; c++) + try { - if (!methods[c].getName().equals(method)) - continue; - if (methods[c].getParameterTypes().length != size) - continue; - if (Modifier.isStatic(methods[c].getModifiers()) != (obj == null)) - continue; - if ((obj == null) && methods[c].getDeclaringClass() != oClass) - continue; - - Object n = null; - boolean called = false; - try - { - n = methods[c].invoke(obj,arg); - called = true; - } - catch (IllegalAccessException e) - { - Log.ignore(e); - } - catch (IllegalArgumentException e) - { - Log.ignore(e); - } - if (called) - { - if (id != null) - _idMap.put(id,n); - configure(n,node,argi); - return n; - } + Object n= TypeUtil.call(oClass,method,obj,arg); + if (id != null) + _idMap.put(id,n); + configure(n,node,argi); + return n; + } + catch (NoSuchMethodException e) + { + IllegalStateException ise = new IllegalStateException("No Method: " + node + " on " + oClass); + ise.initCause(e); + throw ise; } - throw new IllegalStateException("No Method: " + node + " on " + oClass); } /* ------------------------------------------------------------ */