[jboss-cvs] JBossAS SVN: r99257 - in branches/vfs3-int/server/src: etc/conf/default/bootstrap and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jan 11 19:54:47 EST 2010
Author: johnbailey
Date: 2010-01-11 19:54:47 -0500 (Mon, 11 Jan 2010)
New Revision: 99257
Removed:
branches/vfs3-int/server/src/main/java/org/jboss/deployment/vfs/
Modified:
branches/vfs3-int/server/src/etc/conf/all/bootstrap/deployers.xml
branches/vfs3-int/server/src/etc/conf/all/bootstrap/profile.xml
branches/vfs3-int/server/src/etc/conf/all/bootstrap/vfs.xml
branches/vfs3-int/server/src/etc/conf/default/bootstrap/profile.xml
branches/vfs3-int/server/src/etc/deploy/jboss-logging.xml
branches/vfs3-int/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java
branches/vfs3-int/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/HandlesTypesClassFilter.java
branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java
branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WARStructure.java
branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java
Log:
[JBAS-7350] - Initial VFS3 integration for jboss-as-server
Modified: branches/vfs3-int/server/src/etc/conf/all/bootstrap/deployers.xml
===================================================================
--- branches/vfs3-int/server/src/etc/conf/all/bootstrap/deployers.xml 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/etc/conf/all/bootstrap/deployers.xml 2010-01-12 00:54:47 UTC (rev 99257)
@@ -124,7 +124,7 @@
<bean name="JARStructureCandidates" class="org.jboss.deployers.vfs.spi.structure.helpers.DefaultCandidateStructureVisitorFactory">
<!-- A filter to exclude some obvious non-subdeployments -->
<property name="filter">
- <bean name="JARFilter" class="org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter">
+ <bean name="JARFilter" class="org.jboss.vfs.util.SuffixesExcludeFilter">
<constructor><parameter>
<list elementClass="java.lang.String">
<!-- Exclude class files as subdeployments -->
Modified: branches/vfs3-int/server/src/etc/conf/all/bootstrap/profile.xml
===================================================================
--- branches/vfs3-int/server/src/etc/conf/all/bootstrap/profile.xml 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/etc/conf/all/bootstrap/profile.xml 2010-01-12 00:54:47 UTC (rev 99257)
@@ -223,7 +223,7 @@
</bean>
<!-- A filter for excluding files from the scanner -->
- <bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">
+ <bean name="DeploymentFilter" class="org.jboss.vfs.util.ExtensibleFilter">
<!-- Files starting with theses strings are ignored -->
<property name="prefixes">#,%,\,,.,_$</property>
<!-- Files ending with theses strings are ignored -->
Modified: branches/vfs3-int/server/src/etc/conf/all/bootstrap/vfs.xml
===================================================================
--- branches/vfs3-int/server/src/etc/conf/all/bootstrap/vfs.xml 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/etc/conf/all/bootstrap/vfs.xml 2010-01-12 00:54:47 UTC (rev 99257)
@@ -4,47 +4,6 @@
-->
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="VFSCache">
- <constructor factoryClass="org.jboss.virtual.spi.cache.VFSCacheFactory" factoryMethod="getInstance">
- <!-- Use the CombinedVFSCache implementation -->
- <parameter>org.jboss.virtual.plugins.cache.CombinedVFSCache</parameter>
- </constructor>
- <start ignored="true"/>
- <property name="permanentRoots">
- <map keyClass="java.net.URL" valueClass="org.jboss.virtual.spi.ExceptionHandler">
- <entry>
- <key>${jboss.lib.url}</key>
- <value><null/></value>
- </entry>
- <entry>
- <key>${jboss.common.lib.url}</key>
- <value><inject bean="VfsNamesExceptionHandler"/></value>
- </entry>
- <entry>
- <key>${jboss.server.lib.url}</key>
- <value><inject bean="VfsNamesExceptionHandler"/></value>
- </entry>
- <entry>
- <key>${jboss.server.home.url}deploy</key>
- <value><inject bean="VfsNamesExceptionHandler"/></value>
- </entry>
- <!-- Comes into play only for "all" server configuration " -->
- <entry>
- <key>${jboss.server.home.url}farm</key>
- <value><inject bean="VfsNamesExceptionHandler"/></value>
- </entry>
- </map>
- </property>
- <property name="realCache">
- <bean class="org.jboss.virtual.plugins.cache.IterableTimedVFSCache"/>
- </property>
- </bean>
- <bean name="VfsNamesExceptionHandler" class="org.jboss.virtual.plugins.context.helpers.NamesExceptionHandler">
- <constructor>
- <parameter class="java.lang.String">sqljdbc.jar</parameter>
- </constructor>
- </bean>
-
</deployment>
Modified: branches/vfs3-int/server/src/etc/conf/default/bootstrap/profile.xml
===================================================================
--- branches/vfs3-int/server/src/etc/conf/default/bootstrap/profile.xml 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/etc/conf/default/bootstrap/profile.xml 2010-01-12 00:54:47 UTC (rev 99257)
@@ -185,7 +185,7 @@
</bean>
<!-- A filter for excluding files from the scanner -->
- <bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">
+ <bean name="DeploymentFilter" class="org.jboss.vfs.util.ExtensibleFilter">
<!-- Files starting with theses strings are ignored -->
<property name="prefixes">#,%,\,,.,_$</property>
<!-- Files ending with theses strings are ignored -->
Modified: branches/vfs3-int/server/src/etc/deploy/jboss-logging.xml
===================================================================
--- branches/vfs3-int/server/src/etc/deploy/jboss-logging.xml 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/etc/deploy/jboss-logging.xml 2010-01-12 00:54:47 UTC (rev 99257)
@@ -419,7 +419,7 @@
<level name="INFO" />
</logger>
- <logger category="org.jboss.virtual">
+ <logger category="org.jboss.vfs">
<level name="INFO" />
</logger>
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/AltAnnotationMetaDataDeployer.java 2010-01-12 00:54:47 UTC (rev 99257)
@@ -68,9 +68,9 @@
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.WebServiceRefs;
-import org.jboss.deployers.spi.annotations.AnnotationEnvironment;
-import org.jboss.deployers.spi.annotations.Element;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.mcann.AnnotationRepository;
+import org.jboss.mcann.Element;
import org.jboss.vfs.VirtualFile;
/**
@@ -88,7 +88,7 @@
public AltAnnotationMetaDataDeployer()
{
super();
- setInput(AnnotationEnvironment.class);
+ setInput(AnnotationRepository.class);
// add annotations AnnotationMetaDataDeployer scans
addAnnotationClass(Stateful.class);
addAnnotationClass(Remove.class);
@@ -130,8 +130,8 @@
@SuppressWarnings("unchecked")
protected Collection<Class<?>> getClasses(VFSDeploymentUnit unit, String mainClassName, List<VirtualFile> classpath) throws IOException
{
- AnnotationEnvironment env = unit.getAttachment(AnnotationEnvironment.class);
- if (env == null)
+ AnnotationRepository repo = unit.getAttachment(AnnotationRepository.class);
+ if (repo == null)
{
if (log.isTraceEnabled())
log.trace("Cannot scan classes, missing AnnotationEnvironment as attachment: " + unit.getName());
@@ -142,21 +142,21 @@
for(Class<? extends Annotation> annotation : annotationOnClass)
{
Class<Annotation> annotationClass = (Class<Annotation>)annotation;
- Set<Element<Annotation, Class<?>>> elements = env.classIsAnnotatedWith(annotationClass);
+ Set<Element<Annotation, Class<?>>> elements = repo.classIsAnnotatedWith(annotationClass);
for(Element<Annotation, Class<?>> elt : elements)
classes.add(elt.getOwner());
}
for(Class<? extends Annotation> annotation : annotationOnMethod)
{
Class<Annotation> annotationClass = (Class<Annotation>)annotation;
- Set<Element<Annotation, Method>> elements = env.classHasMethodAnnotatedWith(annotationClass);
+ Set<Element<Annotation, Method>> elements = repo.classHasMethodAnnotatedWith(annotationClass);
for(Element<Annotation, Method> elt : elements)
classes.add(elt.getOwner());
}
for(Class<? extends Annotation> annotation : annotationOnField)
{
Class<Annotation> annotationClass = (Class<Annotation>)annotation;
- Set<Element<Annotation, Field>> elements = env.classHasFieldAnnotatedWith(annotationClass);
+ Set<Element<Annotation, Field>> elements = repo.classHasFieldAnnotatedWith(annotationClass);
for(Element<Annotation, Field> elt : elements)
classes.add(elt.getOwner());
}
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/AnnotatedClassFilter.java 2010-01-12 00:54:47 UTC (rev 99257)
@@ -22,7 +22,6 @@
package org.jboss.deployment;
import java.io.IOException;
-import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashMap;
@@ -95,7 +94,7 @@
public void visit(VirtualFile file)
{
- if(file.isLeaf())
+ if(file.isFile())
{
accepts(file);
}
Modified: branches/vfs3-int/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/main/java/org/jboss/deployment/OptAnnotationMetaDataDeployer.java 2010-01-12 00:54:47 UTC (rev 99257)
@@ -32,9 +32,9 @@
import java.util.List;
import java.util.Set;
-import org.jboss.deployers.spi.annotations.AnnotationEnvironment;
-import org.jboss.deployers.spi.annotations.Element;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.mcann.AnnotationRepository;
+import org.jboss.mcann.Element;
import org.jboss.metadata.annotation.creator.AbstractCreator;
import org.jboss.metadata.annotation.creator.AnnotationContext;
import org.jboss.metadata.annotation.creator.client.ApplicationClient5MetaDataCreator;
@@ -60,7 +60,7 @@
public OptAnnotationMetaDataDeployer()
{
super();
- setInput(AnnotationEnvironment.class);
+ setInput(AnnotationRepository.class);
}
protected void processMetaData(VFSDeploymentUnit unit, WebMetaData webMetaData, ApplicationClientMetaData clientMetaData, List<VirtualFile> classpath) throws Exception
@@ -138,7 +138,7 @@
{
boolean trace = log.isTraceEnabled();
- AnnotationEnvironment env = unit.getAttachment(AnnotationEnvironment.class);
+ AnnotationRepository env = unit.getAttachment(AnnotationRepository.class);
if (env == null)
{
if (trace)
Modified: branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/AbstractWarDeployer.java 2010-01-12 00:54:47 UTC (rev 99257)
@@ -364,53 +364,43 @@
VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)unit;
VirtualFile root = vfsUnit.getRoot();
- VirtualFile unjared = VFSUtils.unjar(root);
- // file was not unjared yet
- if (root != unjared)
- {
- // get the real unjared url
- expWarUrl = VFSUtils.getPhysicalURL(unjared);
+ expWarUrl = root.toURL();
- // Map
- String warPathName = root.getPathName();
- if (warPathName.endsWith("/") == false)
- warPathName += "/";
- List<VirtualFile> classpathVFs = vfsUnit.getClassPath();
- if (classpathVFs != null)
+ // Map
+ String warPathName = root.getPathName();
+ if (warPathName.endsWith("/") == false)
+ warPathName += "/";
+ List<VirtualFile> classpathVFs = vfsUnit.getClassPath();
+ if (classpathVFs != null)
+ {
+ List<URL> classpath = new ArrayList<URL>();
+ for (VirtualFile vf : classpathVFs)
{
- List<URL> classpath = new ArrayList<URL>();
- for (VirtualFile vf : classpathVFs)
+ try
{
- try
+ String path = vf.getPathName();
+ if (path.startsWith(warPathName))
{
- String path = vf.getPathName();
- if (path.startsWith(warPathName))
- {
- path = path.substring(warPathName.length());
- URL pathURL = new URL(expWarUrl, path);
- classpath.add(pathURL);
- }
- else
- {
- log.debug("Ignoring path element: " + vf);
- }
+ path = path.substring(warPathName.length());
+ URL pathURL = new URL(expWarUrl, path);
+ classpath.add(pathURL);
}
- catch (Exception e)
+ else
{
- log.debug("Ignoring path element: " + vf, e);
+ log.debug("Ignoring path element: " + vf);
}
}
- unit.addAttachment("org.jboss.web.expandedWarClasspath", classpath);
+ catch (Exception e)
+ {
+ log.debug("Ignoring path element: " + vf, e);
+ }
}
-
- // Indicate that an expanded URL exists
- unit.addAttachment("org.jboss.web.expandedWarURL", expWarUrl, URL.class);
+ unit.addAttachment("org.jboss.web.expandedWarClasspath", classpath);
}
- else
- {
- expWarUrl = VFSUtils.getRealURL(root);
- }
+ // Indicate that an expanded URL exists
+ unit.addAttachment("org.jboss.web.expandedWarURL", expWarUrl, URL.class);
+
// Resolve any ear relative alt-dd path to an expWarUrl/WEB-INF/alt-dd.xml file
String altDDPath = metaData.getAlternativeDD();
if (altDDPath != null)
@@ -478,8 +468,7 @@
if (warURL != null)
{
// use vfs to cleanup/delete - since we created it with vfs
- VirtualFile file = VFS.getRoot(warURL);
- file.cleanup(); // it's temp, it will be deleted as well
+ VirtualFile file = VFS.getChild(warURL);
}
}
catch (Exception e)
Modified: branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/HandlesTypesClassFilter.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/HandlesTypesClassFilter.java 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/HandlesTypesClassFilter.java 2010-01-12 00:54:47 UTC (rev 99257)
@@ -33,10 +33,10 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VirtualFileVisitor;
-import org.jboss.virtual.VisitorAttributes;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VirtualFileVisitor;
+import org.jboss.vfs.VisitorAttributes;
/**
* A VirtualFileVisitor that traverses unit root and determines the
@@ -91,17 +91,10 @@
public void visit(VirtualFile file)
{
- try
+ if(file.isFile())
{
- if(file.isLeaf())
- {
- accepts(file);
- }
+ accepts(file);
}
- catch (IOException e)
- {
- throw new Error("Error visiting " + file, e);
- }
}
@SuppressWarnings("unchecked")
Modified: branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataDeployer.java 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/MergedJBossWebMetaDataDeployer.java 2010-01-12 00:54:47 UTC (rev 99257)
@@ -48,7 +48,7 @@
import org.jboss.metadata.web.spec.WebCommonMetaData;
import org.jboss.metadata.web.spec.WebFragmentMetaData;
import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
/**
* A deployer that merges annotation metadata, xml metadata, and jboss metadata
@@ -137,29 +137,23 @@
webInfLib = vfsUnit.getFile("WEB-INF/lib");
if (webInfLib != null)
{
- try
+ List<VirtualFile> jars = webInfLib.getChildren();
+ for (VirtualFile jar : jars)
{
- List<VirtualFile> jars = webInfLib.getChildren();
- for (VirtualFile jar : jars)
+ jarsSet.add(jar.getName());
+ // Find overlays
+ VirtualFile overlay = jar.getChild("META-INF/resources");
+ if (overlay.exists())
{
- jarsSet.add(jar.getName());
- // Find overlays
- VirtualFile overlay = jar.getChild("META-INF/resources");
- if (overlay != null)
- {
- overlays.add(overlay);
- }
- // Find ServletContainerInitializer services
- VirtualFile sci = jar.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
- if (sci != null)
- {
- scis.put(jar.getName(), sci);
- }
+ overlays.add(overlay);
}
+ // Find ServletContainerInitializer services
+ VirtualFile sci = jar.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
+ if (sci.exists())
+ {
+ scis.put(jar.getName(), sci);
+ }
}
- catch (IOException e)
- {
- }
}
if (!isComplete)
Modified: branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/ServletContainerInitializerDeployer.java 2010-01-12 00:54:47 UTC (rev 99257)
@@ -25,6 +25,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.net.URISyntaxException;
import java.net.URL;
import java.util.HashMap;
import java.util.HashSet;
@@ -43,8 +44,8 @@
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.metadata.web.spec.WebMetaData;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
/**
* A deployer that processes ServletContainerInitializer.
@@ -106,9 +107,9 @@
{
try
{
- VFS vfs = VFS.getVFS(jarURL);
- VirtualFile sci = vfs.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
- if (sci != null)
+ VirtualFile virtualFile = VFS.getChild(jarURL);
+ VirtualFile sci = virtualFile.getChild("META-INF/services/javax.servlet.ServletContainerInitializer");
+ if (sci.exists())
{
ServletContainerInitializer service = loadSci(unit, sci, jarURL.getPath(), false);
if (service != null)
@@ -117,7 +118,7 @@
}
}
}
- catch (IOException e)
+ catch (URISyntaxException e)
{
DeploymentException.rethrowAsDeploymentException("Deployment error processing SCI for JAR: " + jarURL, e);
}
Modified: branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WARStructure.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WARStructure.java 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WARStructure.java 2010-01-12 00:54:47 UTC (rev 99257)
@@ -29,10 +29,10 @@
import org.jboss.deployers.spi.structure.ContextInfo;
import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
import org.jboss.deployers.vfs.spi.structure.StructureContext;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VisitorAttributes;
+import org.jboss.vfs.util.SuffixMatchFilter;
/**
* WARStructure.
@@ -133,24 +133,16 @@
// We require either a WEB-INF or the name ends in .war
if (file.getName().endsWith(".war") == false)
{
- try
+ webinf = file.getChild("WEB-INF");
+ if (webinf.exists())
{
- webinf = file.getChild("WEB-INF");
- if (webinf != null)
- {
- if (trace)
- log.trace("... ok - directory has a WEB-INF subdirectory");
- }
- else
- {
- if (trace)
- log.trace("... no - doesn't look like a war and no WEB-INF subdirectory.");
- return false;
- }
+ if (trace)
+ log.trace("... ok - directory has a WEB-INF subdirectory");
}
- catch (IOException e)
+ else
{
- log.warn("Exception while checking if file is a war: " + e);
+ if (trace)
+ log.trace("... no - doesn't look like a war and no WEB-INF subdirectory.");
return false;
}
}
@@ -164,7 +156,7 @@
// Add all children as locations for TLDs (except classes and lib), recursively
webinf = file.getChild("WEB-INF");
- if (webinf != null)
+ if (webinf.exists())
{
List<VirtualFile> children = webinf.getChildren();
for (VirtualFile child : children)
@@ -179,27 +171,20 @@
// Check for WEB-INF/classes
VirtualFile classes = null;
- try
- {
- // The classpath contains WEB-INF/classes
- classes = file.getChild("WEB-INF/classes");
-
- // Check for a META-INF for metadata
- // FIXME: This is not spec legal, descriptors could be loaded from this location
- if (classes != null)
+ // The classpath contains WEB-INF/classes
+ classes = file.getChild("WEB-INF/classes");
+
+ // Check for a META-INF for metadata
+ // FIXME: This is not spec legal, descriptors could be loaded from this location
+ if (classes.exists())
metaDataLocations.add("WEB-INF/classes/META-INF");
- }
- catch(IOException e)
- {
- log.warn("Exception while looking for classes, " + file.getPathName() + ", " + e);
- }
// Check for jars in WEB-INF/lib
List<VirtualFile> archives = null;
try
{
VirtualFile webinfLib = file.getChild("WEB-INF/lib");
- if (webinfLib != null)
+ if (webinfLib.exists())
{
archives = webinfLib.getChildren(webInfLibFilter);
// Add the jars' META-INF for metadata
@@ -209,7 +194,7 @@
if (webInfLibMetaDataFilter == null || webInfLibMetaDataFilter == webInfLibFilter || webInfLibMetaDataFilter.accepts(jar))
{
VirtualFile metaInf = jar.getChild("META-INF");
- if (metaInf != null && !isLeaf(metaInf))
+ if (metaInf.exists() && !isLeaf(metaInf))
{
metaDataLocations.add("WEB-INF/lib/" + jar.getName() + "/META-INF");
List<VirtualFile> children = metaInf.getChildren();
Modified: branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java
===================================================================
--- branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java 2010-01-12 00:50:29 UTC (rev 99256)
+++ branches/vfs3-int/server/src/main/java/org/jboss/web/deployers/WarAnnotationMetaDataDeployer.java 2010-01-12 00:54:47 UTC (rev 99257)
@@ -102,15 +102,7 @@
}
VirtualFile root = unit.getRoot();
- boolean isLeaf = true;
- try
- {
- isLeaf = root.isLeaf();
- }
- catch(IOException ignore)
- {
- }
- if(isLeaf == true)
+ if(root.isFile())
return;
List<VirtualFile> classpath = unit.getClassPath();
More information about the jboss-cvs-commits
mailing list