[jboss-cvs] JBossAS SVN: r57884 - projects/microcontainer/trunk/deployers/src/main/org/jboss/deployers/plugins/structure
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 27 02:17:25 EDT 2006
Author: scott.stark at jboss.org
Date: 2006-10-27 02:17:23 -0400 (Fri, 27 Oct 2006)
New Revision: 57884
Modified:
projects/microcontainer/trunk/deployers/src/main/org/jboss/deployers/plugins/structure/DefaultStructureBuilder.java
Log:
Don't process the context file twice for a manifest if it was in the classpath.
Modified: projects/microcontainer/trunk/deployers/src/main/org/jboss/deployers/plugins/structure/DefaultStructureBuilder.java
===================================================================
--- projects/microcontainer/trunk/deployers/src/main/org/jboss/deployers/plugins/structure/DefaultStructureBuilder.java 2006-10-27 05:21:51 UTC (rev 57883)
+++ projects/microcontainer/trunk/deployers/src/main/org/jboss/deployers/plugins/structure/DefaultStructureBuilder.java 2006-10-27 06:17:23 UTC (rev 57884)
@@ -42,7 +42,8 @@
import org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter;
/**
- * The default StructureBuilder. It translates a
+ * The default StructureBuilder. It translates a StructureMetaData instance
+ * into a DeploymentContext tree.
*
* @author Scott.Stark at jboss.org
* @version $Revision:$
@@ -104,6 +105,7 @@
context.setMetaDataPath(metaDataPath);
ArrayList<VirtualFile> paths = new ArrayList<VirtualFile>();
List<ClassPathInfo> classPath = info.getClassPath();
+ boolean classPathHadVF = false;
if( classPath != null )
{
for(ClassPathInfo cp : classPath)
@@ -119,6 +121,8 @@
if( suffixes == null || suffixes.length == 0 )
{
paths.add(child);
+ if( classPathHadVF == false )
+ classPathHadVF = child.equals(virtualFile);
if( trace )
log.trace("Added simple classpath entry: "+child);
// Process any Manifest Class-Path refs
@@ -138,6 +142,8 @@
for(VirtualFile file : matches)
{
VFSUtils.addManifestLocations(file, paths);
+ if( classPathHadVF == false )
+ classPathHadVF = child.equals(virtualFile);
}
}
}
@@ -149,15 +155,19 @@
}
}
- try
+ // If virtualFile was not already processed as part of the classpath
+ if( classPathHadVF == false )
{
- // Process any Manifest Class-Path refs on the context itself
- if( virtualFile.isLeaf() == false )
- VFSUtils.addManifestLocations(virtualFile, paths);
+ try
+ {
+ // Process any Manifest Class-Path refs on the context itself
+ if( virtualFile.isLeaf() == false )
+ VFSUtils.addManifestLocations(virtualFile, paths);
+ }
+ catch(IOException ignore)
+ {
+ }
}
- catch(IOException ignore)
- {
- }
// Set the classpath
if( paths.size() > 0 )
context.setClassPath(paths);
More information about the jboss-cvs-commits
mailing list