jboynes 2004/02/20 12:30:22
Modified: modules/jetty/src/java/org/apache/geronimo/jetty/deployment
WARConfigBuilder.java
Log:
Fix GBEAN_INFO
Fish inside jars not relative to them
Revision Changes Path
1.4 +13 -8
incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/WARConfigBuilder.java
Index: WARConfigBuilder.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/WARConfigBuilder.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WARConfigBuilder.java 20 Feb 2004 16:57:11 -0000 1.3
+++ WARConfigBuilder.java 20 Feb 2004 20:30:22 -0000 1.4
@@ -75,7 +75,6 @@
import org.apache.geronimo.deployment.DeploymentContext;
import org.apache.geronimo.deployment.DeploymentException;
import org.apache.geronimo.deployment.service.GBeanBuilder;
-import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GBeanInfoFactory;
import org.apache.geronimo.gbean.GConstructorInfo;
@@ -121,14 +120,20 @@
public XmlObject getDeploymentPlan(URL module) {
try {
- XmlObject plan = getPlan(new URL(module,
"WEB-INF/geronimo-jetty.xml"), JettyWebAppDocument.type);
+ URL moduleBase;
+ if (module.toString().endsWith("/")) {
+ moduleBase = module;
+ } else {
+ moduleBase = new URL("jar:"+module.toString()+"!/");
+ }
+ XmlObject plan = getPlan(new URL(moduleBase,
"WEB-INF/geronimo-jetty.xml"), JettyWebAppDocument.type);
// todo needs generic web XMLBeans
// if (plan == null) {
-// plan = getPlan(new URL(module,
"WEB-INF/geronimo-web.xml"));
+// plan = getPlan(new URL(moduleBase,
"WEB-INF/geronimo-web.xml"));
// }
// todo should be able to deploy a naked WAR
// if (plan == null) {
-// plan = getPlan(new URL(module, "WEB-INF/web.xml"),
WebAppDocument.type);
+// plan = getPlan(new URL(moduleBase, "WEB-INF/web.xml"),
WebAppDocument.type);
// }
return plan;
} catch (MalformedURLException e) {
@@ -297,13 +302,13 @@
public static final GBeanInfo GBEAN_INFO;
static {
- GBeanInfoFactory infoFactory = new
GBeanInfoFactory(ServiceConfigBuilder.class);
+ GBeanInfoFactory infoFactory = new
GBeanInfoFactory(WARConfigBuilder.class);
infoFactory.addInterface(ConfigurationBuilder.class);
infoFactory.addReference(new GReferenceInfo("Repository",
Repository.class));
infoFactory.addReference(new GReferenceInfo("Kernel", Kernel.class));
infoFactory.setConstructor(new GConstructorInfo(
- new String[]{"Repository", "Kernel"},
- new Class[]{Repository.class, Kernel.class}
+ new String[]{"Kernel", "Repository"},
+ new Class[]{Kernel.class, Repository.class}
));
GBEAN_INFO = infoFactory.getBeanInfo();
}