[jboss-cvs] JBossAS SVN: r69930 - projects/microcontainer/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 19 10:41:59 EST 2008
Author: adrian at jboss.org
Date: 2008-02-19 10:41:59 -0500 (Tue, 19 Feb 2008)
New Revision: 69930
Modified:
projects/microcontainer/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContext.java
projects/microcontainer/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/VFSStructureBuilder.java
Log:
Use the name/simpleName already determined by the Deployment (rather than recreating it from the vfs file name) if it has one.
Modified: projects/microcontainer/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContext.java
===================================================================
--- projects/microcontainer/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContext.java 2008-02-19 15:39:48 UTC (rev 69929)
+++ projects/microcontainer/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContext.java 2008-02-19 15:41:59 UTC (rev 69930)
@@ -92,9 +92,23 @@
/**
* Create a new AbstractVFSDeploymentContext.
*
+ * @param name the name
+ * @param simpleName the simple name
* @param root the virtual file
* @param relativePath the relative path
*/
+ public AbstractVFSDeploymentContext(String name, String simpleName, VirtualFile root, String relativePath)
+ {
+ super(name, simpleName, relativePath);
+ this.root = root;
+ }
+
+ /**
+ * Create a new AbstractVFSDeploymentContext.
+ *
+ * @param root the virtual file
+ * @param relativePath the relative path
+ */
public AbstractVFSDeploymentContext(VirtualFile root, String relativePath)
{
super(safeVirtualFileName(root), root.getName(), relativePath);
Modified: projects/microcontainer/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/VFSStructureBuilder.java
===================================================================
--- projects/microcontainer/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/VFSStructureBuilder.java 2008-02-19 15:39:48 UTC (rev 69929)
+++ projects/microcontainer/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/VFSStructureBuilder.java 2008-02-19 15:41:59 UTC (rev 69930)
@@ -55,7 +55,19 @@
if (deployment instanceof VFSDeployment)
{
VFSDeployment vfsDeployment = (VFSDeployment) deployment;
- return new AbstractVFSDeploymentContext(vfsDeployment.getRoot(), "");
+ String name = deployment.getName();
+ String simpleName = deployment.getSimpleName();
+ if (name == null)
+ {
+ return new AbstractVFSDeploymentContext(vfsDeployment.getRoot(), "");
+ }
+ else
+ {
+ if (simpleName == null)
+ return new AbstractVFSDeploymentContext(name, name, vfsDeployment.getRoot(), "");
+ else
+ return new AbstractVFSDeploymentContext(name, simpleName, vfsDeployment.getRoot(), "");
+ }
}
return super.createRootDeploymentContext(deployment);
}
More information about the jboss-cvs-commits
mailing list