[jboss-cvs] JBossAS SVN: r101038 - in projects/jboss-deployers/trunk: deployers-jmx/src/main/java/org/jboss/system/deployers and 58 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 16 14:28:31 EST 2010


Author: johnbailey
Date: 2010-02-16 14:28:23 -0500 (Tue, 16 Feb 2010)
New Revision: 101038

Added:
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSArchiveStructureDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/support/AssembledDirectory.java
Removed:
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractSynchAdapter.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AddVisitor.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MergeOverrideSynchAdapter.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MergeSynchAdapter.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/OverrideSynchAdapter.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchAdapter.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchVisitor.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchWrapperModificationChecker.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/UpdateDeleteVisitor.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/InMemoryClassesDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ExplodeModificationAction.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/TempModificationAction.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarModificationAction.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnpackModificationAction.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/vfs/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/InMemoryClasesUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/redeploy/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.java
Modified:
   projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/SARArchiveFilter.java
   projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/SARDeployer.java
   projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/ServiceXSLDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/client/VFSDeployment.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/client/VFSDeploymentFactory.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/AbstractVFSParsingDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/FileMatcher.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/JAXBDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/JAXPDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/ManifestDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleObjectModelFactoryDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleSchemaResolverDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleVFSParsingDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/ObjectModelFactoryDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/SecurityActions.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/XSLDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/CandidateAnnotationsCallback.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/StructureContext.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentContext.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentResourceLoader.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentUnit.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSStructuralDeployers.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractCandidateStructureVisitor.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/CandidateStructureVisitorFactory.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/ClassPathVisitor.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/DefaultCandidateStructureVisitorFactory.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/SecurityActions.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VirtualFileDeploymentUnitFilter.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureCache.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureModificationChecker.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DefaultStructureCache.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DirModificationCheckerFilter.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MetaDataStructureModificationChecker.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/ModificationCheckerFilter.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureCache.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureListener.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureModificationChecker.java
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/TreeStructureCache.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/BeanDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/Properties2BeansDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/DeploymentUnitClassPath.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/MetaDataUrlIntegrationDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/PathUrlIntegrationDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/VFSClassLoaderClassPathDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/VFSDeploymentClassLoaderPolicyModule.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/client/AbstractVFSDeployment.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/client/DefaultVFSDeploymentFactory.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/AliasesParserDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContext.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContextMBean.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentUnit.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSStructureDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/MetaDataMatchFilter.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/SecurityActions.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSDeploymentResourceLoaderImpl.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSStructuralDeployersImpl.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSStructureBuilder.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/DirectoryStructure.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/GroupingStructure.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/file/FileStructure.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/FileModificationTypeMatcher.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationAction.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationActions.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationTypeMatcher.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationTypeStructureProcessor.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/war/WARStructure.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/util/ClasspathUtils.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BaseDeployersVFSTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BootstrapDeployersTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BootstrapDeployersTestDelegate.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AbstractAnnotationsScanningUnitTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/ScanningMetaDataTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/ClassLoaderTestSuite.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/support/TestMetaDataUrlIntegrationDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/support/TestPathUrlIntegrationDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/BootstrapDeployersSmokeTestUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/IntegrationDeployerUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/ManifestClassLoaderUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/VFSClassLoaderDependenciesTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/test/BeanScanningUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/test/BookingUnitTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/jaxp/support/TestXmlDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/merge/support/TestBeanMergeDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/nonmetadata/support/MockBshDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVFSDeploymentContext.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/TestXmlDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/ObjectMFDTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deploymentfactory/test/VFSDeploymentFactoryUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/matchers/support/FeedbackDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/metadata/support/ServicesFilter.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/metadata/test/MetaDataUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/parsing/test/DeployersAltDDTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/ClassPoolTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/ReflectTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/TypeInfoTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/AbstractStructureTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/VFSStructureTestSuite.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/dir/test/EsbStructureUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/dir/test/GroupingStructureUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/support/MockEarStructureDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/support/SimpleVFSResourceLoader.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/test/AbstractEARStructureTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/test/InnerModificationUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/explicit/test/ModificationTypeUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/explicit/test/MultipleMetadataStructureUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/support/BshFileMatcher.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/support/TmpFileStructure.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/test/FileMatcherTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/jar/test/ConfiguredSuffixJARStructureUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/jar/test/JARStructureUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/EsbModificationTypeMatcher.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/XmlIncludeVirtualFileFilter.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractStructureCacheTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/DirRemovalModificationTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/support/MockWarStructureDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/test/AbstractWARStructureTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/test/WARUnpackUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/support/ChildFileStructure.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/test/VFSStructureBuilderUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structureprocessor/test/VFSStructureProcessorUnitTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/JBossWebBeansMetaData.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/JBossWebBeansMetaDataDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscoveryDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/AbstractWebBeansTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/xb/test/AbstractSchemaResolverXBTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/bootstrap/bootstrap.xml
   projects/jboss-deployers/trunk/pom.xml
Log:
[JBDEPLOY-238] - Merged VFS3 branch changes into trunk -r 94634:101022

Modified: projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/SARArchiveFilter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/SARArchiveFilter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/SARArchiveFilter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -25,8 +25,8 @@
 import java.util.Set;
 import java.util.StringTokenizer;
 
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * SARArchiveFilter.

Modified: projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/SARDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/SARDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/SARDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -34,8 +34,8 @@
 import org.jboss.system.metadata.ServiceMetaData;
 import org.jboss.system.metadata.ServiceMetaDataParser;
 import org.jboss.util.xml.DOMWriter;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -159,7 +159,7 @@
             if (defaultCodeBaseRoot == null)
                throw new DeploymentException("No default codebase root for " + codebase + " in " + unit.getName());
             URL codeBaseURL = new URL(defaultCodeBaseRoot, codebase);
-            codebaseFile = VFS.getRoot(codeBaseURL);
+            codebaseFile = VFS.getChild(codeBaseURL);
          }
 
          if (codebaseFile == null)

Modified: projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/ServiceXSLDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/ServiceXSLDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-jmx/src/main/java/org/jboss/system/deployers/ServiceXSLDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -25,7 +25,7 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.system.metadata.ServiceDeployment;
 import org.jboss.system.metadata.ServiceDeploymentParser;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.w3c.dom.Document;
 
 public class ServiceXSLDeployer extends XSLDeployer<ServiceDeployment>

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/BeanDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/BeanDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/BeanDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -24,7 +24,7 @@
 import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * BeanDeployer.<p>

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/Properties2BeansDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/Properties2BeansDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/deployer/kernel/Properties2BeansDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -29,7 +29,7 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.kernel.spi.deployment.KernelDeployment;
 import org.jboss.kernel.plugins.deployment.props.DeploymentBuilder;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Properties2BeansDeployer.<p>

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/DeploymentUnitClassPath.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/DeploymentUnitClassPath.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/annotations/DeploymentUnitClassPath.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -35,7 +35,8 @@
 import org.jboss.classloader.spi.filter.ClassFilterUtils;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.util.collection.SoftValueHashMap;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.classloader.plugins.filter.JavaOnlyClassFilter;
 
 /**
  * Javassist ClassPath impl based on deployment unit
@@ -90,7 +91,7 @@
          for (VirtualFile cp : classPath)
          {
             file = cp.getChild(path);
-            if (file != null)
+            if (file.exists())
             {
                cache.put(className, file);
                return file;

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/InMemoryClassesDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/InMemoryClassesDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/InMemoryClassesDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,129 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.deployers.vfs.plugins.classloader;
-
-import java.net.URL;
-
-import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.util.id.GUID;
-import org.jboss.virtual.MemoryFileFactory;
-import org.jboss.virtual.VirtualFile;
-
-/**
- * TempURLDeployer.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- * @version $Revision: 1.1 $
- */
-public class InMemoryClassesDeployer extends AbstractVFSRealDeployer
-{
-   /** The name of the dynamic class root */
-   public static final String DYNAMIC_CLASS_URL_KEY = "DYNAMIC_CLASS_URL_KEY";
-
-   /** The name of the dynamic class root */
-   public static final String DYNAMIC_CLASS_KEY = "DYNAMIC_CLASS_KEY";
-
-   /** The host name creator */
-   private HostNameCreator hostNameCreator;
-
-   /**
-    * Create a new TempURLDeployer.
-    */
-   public InMemoryClassesDeployer()
-   {
-      // Make it run before the classloader describe deployer
-      setStage(DeploymentStages.DESCRIBE);
-      setOutput(ClassLoadingMetaData.class);
-      setTopLevelOnly(true);
-   }
-
-   /**
-    * Create host name.
-    *
-    * @param unit the deployment unit
-    * @return the host name
-    */
-   protected String createHost(VFSDeploymentUnit unit)
-   {
-      return (hostNameCreator != null) ? hostNameCreator.createHostName(unit) : GUID.asString();
-   }
-
-   @Override
-   public void deploy(VFSDeploymentUnit unit) throws DeploymentException
-   {
-      try
-      {
-         URL dynamicClassRoot = new URL("vfsmemory", createHost(unit), "");
-         VirtualFile classes = MemoryFileFactory.createRoot(dynamicClassRoot).getRoot();
-         unit.addAttachment(DYNAMIC_CLASS_URL_KEY, dynamicClassRoot);
-         unit.addAttachment(DYNAMIC_CLASS_KEY, classes);
-         unit.prependClassPath(classes);
-         log.debugf("Dynamic class root for %1s is %2s", unit.getName(), dynamicClassRoot);
-      }
-      catch (Exception e)
-      {
-         throw new DeploymentException("Error creating dynamic class root", e);
-      }
-   }
-
-   @Override
-   public void undeploy(VFSDeploymentUnit unit)
-   {
-      log.debugf("Removing dynamic class root for %1s", unit.getName());
-      try
-      {
-         VirtualFile classes = unit.removeAttachment(DYNAMIC_CLASS_KEY, VirtualFile.class);
-         if (classes != null)
-         {
-            unit.removeClassPath(classes);
-         }
-      }
-      finally
-      {
-         try
-         {
-            URL root = unit.removeAttachment(DYNAMIC_CLASS_URL_KEY, URL.class);
-            if (root != null)
-               MemoryFileFactory.deleteRoot(root);
-         }
-         catch (Exception e)
-         {
-            log.warn("Error deleting dynamic class root for " + unit.getName(), e);
-         }
-      }
-   }
-
-   /**
-    * Set host name creator.
-    *
-    * @param hostNameCreator the host name creator
-    */
-   public void setHostNameCreator(HostNameCreator hostNameCreator)
-   {
-      this.hostNameCreator = hostNameCreator;
-   }
-}

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/MetaDataUrlIntegrationDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/MetaDataUrlIntegrationDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/MetaDataUrlIntegrationDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,7 +22,7 @@
 package org.jboss.deployers.vfs.plugins.classloader;
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Checks metadata if matching integration deployment.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/PathUrlIntegrationDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/PathUrlIntegrationDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/PathUrlIntegrationDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,7 +22,7 @@
 package org.jboss.deployers.vfs.plugins.classloader;
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Checks path if matching integration deployment.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/UrlIntegrationDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -34,8 +34,8 @@
 import org.jboss.deployers.spi.deployer.DeploymentStages;
 import org.jboss.deployers.vfs.spi.deployer.AbstractOptionalVFSRealDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Integration deployer.
@@ -129,7 +129,7 @@
          {
             for (URL integrationURL : integrationURLs)
             {
-               VirtualFile integration = VFS.getRoot(integrationURL);
+               VirtualFile integration = VFS.getChild(integrationURL);
                unit.addClassPath(integration);
                added.add(integration);
             }
@@ -153,7 +153,7 @@
          {
             try
             {
-               VirtualFile integration = VFS.getRoot(integrationURL);
+               VirtualFile integration = VFS.getChild(integrationURL);
                unit.removeClassPath(integration);
             }
             catch (Throwable t)

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/VFSClassLoaderClassPathDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/VFSClassLoaderClassPathDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/VFSClassLoaderClassPathDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,6 +21,7 @@
 */
 package org.jboss.deployers.vfs.plugins.classloader;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
@@ -32,7 +33,8 @@
 import org.jboss.deployers.vfs.spi.deployer.AbstractOptionalVFSRealDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.deployers.vfs.spi.structure.helpers.ClassPathVisitor;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.util.automount.Automounter;
 
 /**
  * VFSClassLoaderClassPathDeployer.
@@ -104,8 +106,18 @@
          {
             if (vfsClassPath.contains(file) == false)
             {
-               if (canSeeParent == false || (canSeeParent && parentClassPath.contains(file) == false))
+               if (canSeeParent == false || (canSeeParent && parentClassPath.contains(file) == false)) 
+               {
+                  try
+                  {
+                     Automounter.mount(unit.getRoot(), file);
+                  }
+                  catch (IOException e)
+                  {
+                     DeploymentException.rethrowAsDeploymentException("Failed to mount " + file, e);
+                  }
                   vfsClassPath.add(file);
+               }
             }
          }
       }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/VFSDeploymentClassLoaderPolicyModule.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/VFSDeploymentClassLoaderPolicyModule.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/classloader/VFSDeploymentClassLoaderPolicyModule.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -37,7 +37,7 @@
 import org.jboss.classloading.spi.visitor.ResourceVisitor;
 import org.jboss.deployers.plugins.classloading.AbstractDeploymentClassLoaderPolicyModule;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * VFSDeploymentClassLoaderPolicyModule.
@@ -163,7 +163,7 @@
    @Override
    public URL getDynamicClassRoot()
    {
-      return getDeploymentUnit().getAttachment(InMemoryClassesDeployer.DYNAMIC_CLASS_URL_KEY, URL.class);
+      return getDeploymentUnit().getAttachment("DYNAMIC_CLASS_URL_KEY", URL.class);
    }
 
    @Override

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/client/AbstractVFSDeployment.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/client/AbstractVFSDeployment.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/client/AbstractVFSDeployment.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -24,11 +24,11 @@
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
+import java.io.Externalizable;
 
 import org.jboss.deployers.client.plugins.deployment.AbstractDeployment;
-import org.jboss.deployers.vfs.plugins.vfs.VirtualFileSerializator;
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * AbstractVFSDeployment.
@@ -37,16 +37,13 @@
  * @author <a href="ales.justin at jboss.org">Ales Justin</a>
  * @version $Revision: 1.1 $
  */
-public class AbstractVFSDeployment extends AbstractDeployment implements VFSDeployment
+public class AbstractVFSDeployment extends AbstractDeployment implements VFSDeployment, Externalizable
 {
    /** The serialVersionUID */
    private static final long serialVersionUID = 2L;
 
-   /** The flag to do direct VF serialization */
-   private boolean directRootSerialization;
-
    /** The root */
-   private transient VirtualFile root;
+   private VirtualFile root;
 
    /**
     * Get the vfs file name safely
@@ -54,7 +51,7 @@
     * @param root the virutal file
     * @return the name
     */
-   static final String safeVirtualFileName(VirtualFile root)
+   static String safeVirtualFileName(VirtualFile root)
    {
       if (root == null)
          throw new IllegalArgumentException("Null root");
@@ -67,6 +64,7 @@
       {
          return root.getName();
       }
+
    }
 
    /**
@@ -87,6 +85,19 @@
       super(safeVirtualFileName(root));
       this.root = root;
    }
+   
+   /**
+    * Create a new VFSDeployment.
+    * 
+    * @param name the deployment name
+    * @param root the root
+    * @throws IllegalArgumentException for a null root
+    */
+   public AbstractVFSDeployment(String name, VirtualFile root)
+   {
+      super(name);
+      this.root = root;
+   }
 
    public VirtualFile getRoot()
    {
@@ -105,38 +116,17 @@
       return "AbstractVFSDeployment(" + getSimpleName() + ")";
    }
 
-   /**
-    * Should we serialize root directly.
-    * e.g. the root is memory virtual file instance
-    * @see org.jboss.virtual.plugins.context.memory.MemoryContextHandler 
-    *
-    * @param directRootSerialization the direct root serialization flag
-    */
-   public void setDirectRootSerialization(boolean directRootSerialization)
-   {
-      this.directRootSerialization = directRootSerialization;
-   }
-
+   @Override
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
    {
       super.readExternal(in);
-      directRootSerialization = in.readBoolean();
-      if (directRootSerialization)
-         root = (VirtualFile)in.readObject();
-      else
-      {
-         VirtualFileSerializator serializator = (VirtualFileSerializator)in.readObject();
-         root = serializator.getFile();
-      }
+      root = (VirtualFile)in.readObject();
    }
 
+   @Override
    public void writeExternal(ObjectOutput out) throws IOException
    {
       super.writeExternal(out);
-      out.writeBoolean(directRootSerialization);
-      if (directRootSerialization)
-         out.writeObject(root);
-      else
-         out.writeObject(new VirtualFileSerializator(root));
+      out.writeObject(root);
    }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/client/DefaultVFSDeploymentFactory.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/client/DefaultVFSDeploymentFactory.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/client/DefaultVFSDeploymentFactory.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -24,7 +24,7 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * DefaultVFSDeploymentFactory.
@@ -43,4 +43,10 @@
    {
       return new AbstractVFSDeployment(root);
    }
+   
+   @Override
+   protected VFSDeployment newVFSDeployment(String name, VirtualFile root)
+   {
+      return new AbstractVFSDeployment(name, root);
+   }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/AliasesParserDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/AliasesParserDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/dependency/AliasesParserDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -30,7 +30,7 @@
 
 import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * AliasesParserDeployer.

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSArchiveStructureDeployer.java (from rev 101022, projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSArchiveStructureDeployer.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSArchiveStructureDeployer.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSArchiveStructureDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.deployers.vfs.plugins.structure;
+
+import java.io.IOException;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.vfs.spi.structure.StructureContext;
+import org.jboss.deployers.vfs.spi.structure.StructureDeployer;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.util.automount.Automounter;
+import org.jboss.vfs.util.automount.MountOption;
+
+/**
+ * Abstract {@link StructureDeployer} used to help mount VFS archive based {@link StructureDeployer}s.     
+ *  
+ * @author <a href="jbailey at redhat.com">John Bailey</a>
+ */
+public abstract class AbstractVFSArchiveStructureDeployer extends AbstractVFSStructureDeployer
+{
+
+   /**
+    * Determine the structure of a deployment invoking the Automounter for archive files.
+    * 
+    * @param context the structure context
+    * @return true when it recognized the context
+    * @throws DeploymentException for an error
+    */
+   public boolean determineStructure(StructureContext context) throws DeploymentException
+   {
+      VirtualFile root = context.getFile();
+      boolean valid = false;
+      try
+      {
+         if(root.isFile()) {
+            if (shouldMount(root) == false || mountArchive(root) == false)
+            {
+               return false;
+            }
+         }
+         valid = doDetermineStructure(context);
+      }
+      catch (DeploymentException e)
+      {
+         valid = false;
+         throw e;
+      }
+      finally
+      {
+         if (!valid)
+         {
+            Automounter.cleanup(root);
+         }
+      }
+      return valid;
+   }
+
+   /**
+    * Template method for VFS archive structure deployers to determine the structure once the archive has been mounted.
+    * 
+    * @param context the structure context
+    * @return true if the structure was determined
+    * @throws DeploymentException
+    */
+   protected abstract boolean doDetermineStructure(StructureContext context) throws DeploymentException;
+
+   /**
+    * Determine whether the {@link VirtualFile} has a name that matches this structure.  
+    * Defaults to just checking the suffix. 
+    * 
+    * @param root the {@link VirtualFile} root to check
+    * @return true if the file name is valid for this {@link StructureDeployer}
+    */
+   protected boolean hasValidName(VirtualFile root) {
+      return hasValidSuffix(root.getName());
+   }
+   
+   /**
+    * Template method for VFS archive structure deployers to correctly match file suffixes for their archive type.
+    * 
+    * @param name the name of the file
+    * @return true if the file matches the required pattern
+    */
+   protected abstract boolean hasValidSuffix(String name);
+   
+   /**
+    * Determine whether to mount the archive. 
+    * 
+    * @param virtualFile to check
+    * @return true if the {@link VirtualFile} should be mounted
+    */
+   protected boolean shouldMount(VirtualFile virtualFile) {
+      return virtualFile.isFile() && hasValidName(virtualFile);
+   }
+
+   /**
+    * Mounts the the provided file as an archive using the {@link Automounter}
+    * 
+    * @param file the file to mount
+    * @return true if the mount was successful 
+    * @throws DeploymentException
+    */
+   private boolean mountArchive(VirtualFile file) throws DeploymentException
+   {
+      try
+      {
+         performMount(file);
+      }
+      catch (IOException e)
+      {
+         throw DeploymentException.rethrowAsDeploymentException("Failed to mount archive: " + file, e);
+      }
+      return true;
+   }
+   
+   protected void performMount(VirtualFile file) throws IOException {
+      Automounter.mount(file, MountOption.COPY);
+   }
+
+}

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContext.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContext.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContext.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -39,9 +39,10 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentResourceLoader;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.util.automount.Automounter;
 
 /**
  * AbstractVFSDeploymentContext.
@@ -90,7 +91,7 @@
          return root.getName();
       }
    }
-
+   
    /**
     * For serialization
     */
@@ -137,27 +138,20 @@
          return;
       }
 
-      try
+      Map<VirtualFile, MetaDataType> locations = new LinkedHashMap<VirtualFile, MetaDataType>();
+      for (MetaDataEntry entry : paths)
       {
-         Map<VirtualFile, MetaDataType> locations = new LinkedHashMap<VirtualFile, MetaDataType>();
-         for (MetaDataEntry entry : paths)
-         {
-            if (entry == null)
-               throw new IllegalArgumentException("Null entry in paths: " + paths);
+         if (entry == null)
+            throw new IllegalArgumentException("Null entry in paths: " + paths);
 
-            String path = entry.getPath();
-            VirtualFile child = root.getChild(path);
-            if (child != null)
-               locations.put(child, entry.getType());
-            else
-               log.debugf("Meta data path does not exist: root=%1s path=%2s", root.getPathName(), path);
-         }
-         setMetaDataLocationsMap(locations);
+         String path = entry.getPath();
+         VirtualFile child = root.getChild(path);
+         if (child != null)
+            locations.put(child, entry.getType());
+         else
+            log.debugf("Meta data path does not exist: root=%1s path=%2s", root.getPathName(), path);
       }
-      catch (IOException e)
-      {
-         log.warn("Exception while applying paths: root=" + root.getPathName() + " paths=" + paths);
-      }
+      setMetaDataLocationsMap(locations);
    }
 
    public List<VirtualFile> getMetaDataLocations()
@@ -228,7 +222,7 @@
          if (metaDataLocations == null || metaDataLocations.isEmpty())
          {
             // It has to be a plain file
-            if (root != null && SecurityActions.isLeaf(root))
+            if (root != null && root.exists() && SecurityActions.isLeaf(root))
             {
                String fileName = root.getName();
                if (fileName.equals(name))
@@ -277,24 +271,17 @@
          if (filter.accepts(entry.getValue()))
          {
             VirtualFile location = entry.getKey();
-            try
+            result = location.getChild(name);
+            if (result.exists())
             {
-               result = location.getChild(name);
-               if (result != null)
-               {
-                  if (log.isTraceEnabled())
-                     log.trace("Found " + name + " in " + location.getName());
-                  deployed();
-                  break;
-               }
+	           if (log.isTraceEnabled())
+                  log.trace("Found " + name + " in " + location.getName());
+               deployed();
+               break;
             }
-            catch (IOException e)
-            {
-               log.debugf("Search exception invocation for metafile %1s in %2s, reason: %3s", name, location.getName(), e);
-            }
          }
       }
-      return result;
+      return result != null && result.exists() ? result : null;
    }
 
    public List<VirtualFile> getMetaDataFiles(String name, String suffix)
@@ -557,20 +544,14 @@
    {
       return new AbstractVFSDeploymentUnit(this);
    }
-
+   
    @Override
    public void cleanup()
    {
-      try
-      {
-         root.cleanup();
-      }
-      finally
-      {
-         super.cleanup();
-      }
+      Automounter.cleanup(root);
+      super.cleanup();
    }
-   
+
    @SuppressWarnings("unchecked")
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
    {

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContextMBean.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContextMBean.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentContextMBean.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -24,7 +24,7 @@
 import java.util.List;
 
 import org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContextMBean;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * AbstractVFSDeploymentContextMBean.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentUnit.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentUnit.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSDeploymentUnit.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -28,8 +28,8 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentResourceLoader;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * AbstractVFSDeploymentUnit.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSStructureDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSStructureDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSStructureDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,6 +21,7 @@
 */
 package org.jboss.deployers.vfs.plugins.structure;
 
+
 import org.jboss.classloader.spi.filter.ClassFilter;
 import org.jboss.classloading.spi.visitor.ResourceFilter;
 import org.jboss.deployers.structure.spi.DeploymentResourceLoader;
@@ -29,7 +30,7 @@
 import org.jboss.mcann.AnnotationRepository;
 import org.jboss.mcann.repository.Configuration;
 import org.jboss.mcann.scanner.DefaultAnnotationScanner;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * VFS aware structure deployer.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/MetaDataMatchFilter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/MetaDataMatchFilter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/MetaDataMatchFilter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,9 +21,9 @@
   */
 package org.jboss.deployers.vfs.plugins.structure;
 
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilterWithAttributes;
-import org.jboss.virtual.VisitorAttributes;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilterWithAttributes;
+import org.jboss.vfs.VisitorAttributes;
 
 /**
  * Matches meta data

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/SecurityActions.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/SecurityActions.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/SecurityActions.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -28,7 +28,7 @@
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
 
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author Scott.Stark at jboss.org
@@ -51,7 +51,7 @@
                {
                   public Boolean run() throws Exception
                   {
-                     return f.isLeaf();
+                     return f.isFile();
                   }
                });
             }
@@ -72,7 +72,7 @@
       {
          public Boolean isLeaf(VirtualFile f) throws IOException
          {
-            return f.isLeaf();
+            return f.isFile();
          }
          
       };

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSDeploymentResourceLoaderImpl.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSDeploymentResourceLoaderImpl.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSDeploymentResourceLoaderImpl.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -23,13 +23,12 @@
 
 import java.io.IOException;
 import java.net.MalformedURLException;
-import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Enumeration;
 import java.util.Vector;
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentResourceLoader;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * VFSDeploymentResourceLoader.
@@ -57,14 +56,8 @@
 
    public VirtualFile getFile(String path)
    {
-      try
-      {
-         return root.getChild(path);
-      }
-      catch (IOException e)
-      {
-         return null;
-      }
+      final VirtualFile virtualFile = root.getChild(path);
+      return virtualFile.exists() ? virtualFile : null;
    }
 
    public URL getResource(String name)
@@ -72,20 +65,12 @@
       try
       {
          VirtualFile child = root.getChild(name);
-         return child != null ? child.toURL() : null;
+         return child.exists() ? child.toURL() : null;
       }
-      catch (URISyntaxException e)
-      {
-         return null;
-      }
       catch (MalformedURLException e)
       {
          return null;
       }
-      catch (IOException e)
-      {
-         return null;
-      }
    }
 
    public Enumeration<URL> getResources(String name) throws IOException
@@ -93,7 +78,7 @@
       try
       {
          VirtualFile child = root.getChild(name);
-         if (child != null)
+         if (child.exists())
          {
             Vector<URL> vector = new Vector<URL>();
             vector.add(child.toURL());
@@ -102,10 +87,6 @@
          else
             return null;
       }
-      catch (URISyntaxException e)
-      {
-         return null;
-      }
       catch (MalformedURLException e)
       {
          return null;

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSStructuralDeployersImpl.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSStructuralDeployersImpl.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSStructuralDeployersImpl.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -42,7 +42,7 @@
 import org.jboss.deployers.vfs.spi.structure.VFSStructuralDeployers;
 import org.jboss.deployers.vfs.spi.structure.helpers.AbstractStructureDeployer;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * VFSStructuralDeployersImpl.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSStructureBuilder.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSStructureBuilder.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/VFSStructureBuilder.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -39,10 +39,11 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VisitorAttributes;
+import org.jboss.vfs.util.automount.Automounter;
+import org.jboss.vfs.util.SuffixMatchFilter;
 
 /**
  * VFSStructureBuilder.
@@ -88,11 +89,10 @@
          try
          {
             VirtualFile parentFile = vfsParent.getRoot();
-            @SuppressWarnings("deprecation")
-            VirtualFile file = parentFile.findChild(path); // leaving the findChild usage
-            return new AbstractVFSDeploymentContext(applyModification(file, child), path);
+            VirtualFile file = parentFile.getChild(path); 
+            return new AbstractVFSDeploymentContext(applyModification(file.exists() ? file : null, child), path);
          }
-         catch (Throwable t)
+         catch (RuntimeException t)
          {
             throw DeploymentException.rethrowAsDeploymentException("Unable to determine child " + path + " from parent " + vfsParent.getRoot().getName(), t);
          }
@@ -182,9 +182,9 @@
                {
                   try
                   {
-                     child = root.findChild(entry.getPath()); // leaving the findChild
+                     child = root.getChild(entry.getPath());
                   }
-                  catch (Throwable t)
+                  catch (RuntimeException t)
                   {
                      throw DeploymentException.rethrowAsDeploymentException("Unable to find class path entry " + entry + " from " + root.getName(), t);
                   }
@@ -208,6 +208,7 @@
                      // Process any Manifest Class-Path refs
                      for (VirtualFile file : matches)
                      {
+                        Automounter.mount(root, file);
                         VFSUtils.addManifestLocations(file, classPath);
                         if (classPathHadVF == false)
                            classPathHadVF = file.equals(root);
@@ -219,7 +220,9 @@
          
          VirtualFile file = vfsContext.getRoot();
          if (classPathHadVF == false && SecurityActions.isLeaf(file) == false)
+         {
             VFSUtils.addManifestLocations(file, classPath);
+         }
 
          if (classPath.isEmpty() == false)
             vfsContext.setClassPath(classPath);

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/DirectoryStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/DirectoryStructure.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/DirectoryStructure.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -31,7 +31,7 @@
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
 import org.jboss.deployers.vfs.spi.structure.VFSStructuralDeployers;
 import org.jboss.deployers.vfs.spi.structure.helpers.AbstractStructureDeployer;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Legacy directory structure.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/GroupingStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/GroupingStructure.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/GroupingStructure.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -31,8 +31,9 @@
 import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
 import org.jboss.util.collection.CollectionsFactory;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.util.automount.Automounter;
 
 /**
  * Similar to jar or directory structure,
@@ -95,7 +96,7 @@
          for (String lib : libs)
          {
             VirtualFile libVF = file.getChild(lib);
-            if (libVF != null)
+            if (libVF.exists())
             {
                VirtualFileFilter lf = filters.get(lib);
                if (lf == null)
@@ -103,7 +104,10 @@
 
                List<VirtualFile> archives = libVF.getChildren(lf);
                for (VirtualFile archive : archives)
+               {
+                  Automounter.mount(file, archive);
                   addClassPath(structureContext, archive, true, true, context);
+               }
             }
             else
             {
@@ -116,7 +120,7 @@
          for (String group : groups)
          {
             VirtualFile groupVF = file.getChild(group);
-            if (groupVF != null)
+            if (groupVF.exists())
             {
                VirtualFileFilter gf = filters.get(group);
                if (gf == null)

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/explicit/DeclaredStructure.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -27,7 +27,7 @@
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.jboss.xb.binding.Unmarshaller;
 import org.jboss.xb.binding.UnmarshallerFactory;
 
@@ -62,7 +62,7 @@
             try
             {
                VirtualFile jbossStructure = file.getChild("META-INF/jboss-structure.xml");
-               if (jbossStructure != null)
+               if (jbossStructure.exists())
                {
                   if (trace)
                      log.trace("... context has a META-INF/jboss-structure.xml");

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/file/FileStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/file/FileStructure.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/file/FileStructure.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,6 +22,7 @@
 package org.jboss.deployers.vfs.plugins.structure.file;
 
 import java.util.Set;
+import java.util.Arrays;
 import java.util.concurrent.CopyOnWriteArraySet;
 
 import org.jboss.beans.metadata.api.annotations.Install;
@@ -31,8 +32,8 @@
 import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
 import org.jboss.deployers.vfs.spi.deployer.FileMatcher;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * FileStructure is a simple suffix recognition structure deployer.
@@ -47,20 +48,16 @@
 public class FileStructure extends AbstractVFSStructureDeployer implements VirtualFileFilter
 {
    /** The file suffixes */
-   private static Set<String> fileSuffixes = new CopyOnWriteArraySet<String>();
+   private static Set<String> fileSuffixes = new CopyOnWriteArraySet<String>(Arrays.asList(new String[] {
+      "-service.xml",
+      "-beans.xml",
+      "-ds.xml",
+      "-aop.xml",
+   }));
 
    /** The file matchers */
    private Set<FileMatcher> fileMatchers = new CopyOnWriteArraySet<FileMatcher>();
 
-   // Initialise known suffixes
-   static
-   {
-      fileSuffixes.add("-service.xml");
-      fileSuffixes.add("-beans.xml");
-      fileSuffixes.add("-ds.xml");
-      fileSuffixes.add("-aop.xml");
-   }
-
    /**
     * Create a new FileStructure.
     */

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,18 +21,18 @@
 */
 package org.jboss.deployers.vfs.plugins.structure.jar;
 
-import java.io.IOException;
 import java.util.Set;
+import java.util.Collections;
+import java.util.HashSet;
 
 import org.jboss.beans.metadata.api.annotations.Install;
 import org.jboss.beans.metadata.api.annotations.Uninstall;
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.spi.deployer.matchers.JarExtensionProvider;
 import org.jboss.deployers.spi.structure.ContextInfo;
-import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSArchiveStructureDeployer;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.plugins.context.jar.JarUtils;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * JARStructure.
@@ -41,18 +41,34 @@
  * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  * @version $Revision: 1.1 $
  */
-public class JARStructure extends AbstractVFSStructureDeployer
+public class JARStructure extends AbstractVFSArchiveStructureDeployer
 {
+   private final Set<String> suffixes = Collections.synchronizedSet(new HashSet<String>());
+
+   public static Set<String> DEFAULT_JAR_SUFFIXES = new HashSet<String>();
+   static
+   {
+      DEFAULT_JAR_SUFFIXES = new HashSet<String>();
+      DEFAULT_JAR_SUFFIXES.add(".zip");
+      DEFAULT_JAR_SUFFIXES.add(".ear");
+      DEFAULT_JAR_SUFFIXES.add(".jar");
+      DEFAULT_JAR_SUFFIXES.add(".rar");
+      DEFAULT_JAR_SUFFIXES.add(".war");
+      DEFAULT_JAR_SUFFIXES.add(".sar");
+      DEFAULT_JAR_SUFFIXES.add(".har");
+      DEFAULT_JAR_SUFFIXES.add(".aop");
+   }
+
    /**
     * Create a new JARStructure. with the default suffixes
     */
    public JARStructure()
    {
-      this(null);
+      this(DEFAULT_JAR_SUFFIXES);
    }
 
    /**
-    * Sets the default relative order 10000.
+    * DEFAULT_JAR_SUFFIXESs the default relative order 10000.
     *
     * @param suffixes the suffixes
     */
@@ -70,8 +86,9 @@
     */
    public Set<String> getSuffixes()
    {
-      return JarUtils.getSuffixes();
+      return suffixes;
    }
+
    /**
     * Gets the set of suffixes recognised as jars
     * 
@@ -79,7 +96,8 @@
     */
    public void setSuffixes(Set<String> suffixes)
    {
-      JarUtils.setJarSuffixes(suffixes);
+      this.suffixes.retainAll(suffixes);
+      this.suffixes.addAll(suffixes);
    }
 
    @Install
@@ -87,7 +105,7 @@
    {
       String extension = provider.getJarExtension();
       if (extension != null)
-         JarUtils.addJarSuffix(extension);
+         suffixes.add(extension);
    }
 
    @Uninstall
@@ -95,70 +113,52 @@
    {
       String extension = provider.getJarExtension();
       if (extension != null)
-         JarUtils.removeJarSuffix(extension);
+         suffixes.remove(extension);
    }
 
-   public boolean determineStructure(StructureContext structureContext) throws DeploymentException
+   protected boolean hasValidSuffix(String name)
    {
+      int idx = name.lastIndexOf('.');
+      if (idx == -1)
+         return false;
+      return suffixes.contains(name.substring(idx).toLowerCase());
+   }
+
+   public boolean doDetermineStructure(StructureContext structureContext) throws DeploymentException
+   {
       ContextInfo context = null;
       VirtualFile file = structureContext.getFile();
       try
       {
          boolean trace = log.isTraceEnabled();
-
-         if (isLeaf(file) == false)
+         // For non top level directories that don't look like jars
+         // we require a META-INF otherwise each subdirectory would be a subdeployment
+         if (hasValidSuffix(file.getName()) == false)
          {
-            // For non top level directories that don't look like jars
-            // we require a META-INF otherwise each subdirectory would be a subdeployment
-            if (JarUtils.isArchive(file.getName()) == false)
+            if (structureContext.isTopLevel() == false)
             {
-               if (structureContext.isTopLevel() == false)
+               VirtualFile child = file.getChild("META-INF");
+               if (child.exists())
                {
-                  try
-                  {
-                     VirtualFile child = file.getChild("META-INF");
-                     if (child != null)
-                     {
-                        if (trace)
-                           log.trace("... ok - non top level directory has a META-INF subdirectory");
-                     }
-                     else
-                     {
-                        if (trace)
-                           log.trace("... no - doesn't look like a jar and no META-INF subdirectory.");
-                        return false;
-                     }
-                  }
-                  catch (IOException e)
-                  {
-                     log.warn("Exception while checking if file is a jar: " + e);
-                     return false;
-                  }
+                  if (trace)
+                     log.trace("... ok - non top level directory has a META-INF subdirectory");
                }
-               else if (trace)
+               else
                {
-                  log.trace("... ok - doesn't look like a jar but it is a top level directory.");
+                  if (trace)
+                     log.trace("... no - doesn't look like a jar and no META-INF subdirectory.");
+                  return false;
                }
             }
-            else
+            else if (trace)
             {
-               log.trace("... ok - its an archive or at least pretending to be");
+               log.trace("... ok - doesn't look like a jar but it is a top level directory.");
             }
          }
-         else if (JarUtils.isArchive(file.getName()))
-         {
-            if (trace)
-               log.trace("... ok - its an archive or at least pretending to be.");
-         }
-         else
-         {
-            if (trace)
-               log.trace("... no - not a directory or an archive.");
-            return false;
-         }
+         if(trace)
+            log.trace("... ok - its an archive or at least pretending to be");
 
          boolean valid = true;
-
          if (isSupportsCandidateAnnotations())
          {
             StructureContext parentContext = structureContext.getParentContext();
@@ -186,7 +186,7 @@
       catch (Exception e)
       {
          // Remove the invalid context
-         if(context != null)
+         if (context != null)
             structureContext.removeChild(context);
 
          throw DeploymentException.rethrowAsDeploymentException("Error determining structure: " + file.getName(), e);

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/AbstractModificationTypeMatcher.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -27,7 +27,7 @@
 import org.jboss.deployers.spi.structure.ModificationType;
 import org.jboss.deployers.spi.structure.StructureMetaData;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Abstract modification type matcher.
@@ -71,7 +71,7 @@
                   try
                   {
                      VirtualFile file = root.getChild(path);
-                     if (file != null && isModificationDetermined(file, child))
+                     if (file.exists() && isModificationDetermined(file, child))
                      {
                         contextInfo.setModificationType(modificationType);
                         return true;

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ExplodeModificationAction.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ExplodeModificationAction.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ExplodeModificationAction.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.deployers.vfs.plugins.structure.modify;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VFSUtils;
-
-/**
- * Explode modification action.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-class ExplodeModificationAction implements ModificationAction
-{
-   public VirtualFile modify(VirtualFile original) throws IOException, URISyntaxException
-   {
-      return VFSUtils.explode(original);
-   }
-}
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/FileModificationTypeMatcher.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/FileModificationTypeMatcher.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/FileModificationTypeMatcher.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -27,7 +27,7 @@
 
 import org.jboss.deployers.spi.structure.ContextInfo;
 import org.jboss.deployers.spi.structure.MetaDataEntry;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * File modification type matcher.
@@ -53,15 +53,8 @@
       {
          for (VirtualFile file : getStartingFiles(root, contextInfo))
          {
-            try
-            {
-               if (file.getChild(path) != null)
-                  return true;
-            }
-            catch (Exception e)
-            {
-               log.debugf("Cannot determine modification type, cause: %1s", e);
-            }
+            if (file.getChild(path).exists())
+               return true;
          }
       }
       return false;
@@ -88,15 +81,9 @@
             List<VirtualFile> result = new ArrayList<VirtualFile>(metadataPaths.size());
             for (MetaDataEntry metadataPath : metadataPaths)
             {
-               try
-               {
-                  VirtualFile child = file.getChild(metadataPath.getPath());
-                  if (child != null)
-                     result.add(child);
-               }
-               catch (Exception ignored)
-               {
-               }
+               VirtualFile child = file.getChild(metadataPath.getPath());
+               if (child.exists())
+                  result.add(child);
             }
             return result;
          }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationAction.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationAction.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationAction.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -24,7 +24,7 @@
 import java.io.IOException;
 import java.net.URISyntaxException;
 
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Execute modification on file.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationActions.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationActions.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationActions.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,10 +21,11 @@
 */
 package org.jboss.deployers.vfs.plugins.structure.modify;
 
-import java.util.HashMap;
-import java.util.Map;
+import java.io.IOException;
+import java.net.URISyntaxException;
 
 import org.jboss.deployers.spi.structure.ModificationType;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Modification actions.
@@ -33,16 +34,14 @@
  */
 public class ModificationActions
 {
-   private static final Map<ModificationType, ModificationAction> actions;
-
-   static
+   private static final ModificationAction ACTION = new ModificationAction()
    {
-      actions = new HashMap<ModificationType, ModificationAction>();
-      actions.put(ModificationType.UNPACK, new UnpackModificationAction());
-      actions.put(ModificationType.EXPLODE, new ExplodeModificationAction());
-      actions.put(ModificationType.TEMP, new TempModificationAction());
-      actions.put(ModificationType.UNJAR, new UnjarModificationAction());
-   }
+      public VirtualFile modify(final VirtualFile original) throws IOException, URISyntaxException
+      {
+         return original;
+      }
+   };
+ 
 
    /**
     * Get the modification action.
@@ -52,6 +51,6 @@
     */
    public static ModificationAction getAction(ModificationType type)
    {
-      return actions.get(type);
+      return ACTION;
    }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationTypeMatcher.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationTypeMatcher.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationTypeMatcher.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -23,7 +23,7 @@
 
 import org.jboss.deployers.spi.structure.ContextInfo;
 import org.jboss.deployers.spi.structure.StructureMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Determine if we need some modification.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationTypeStructureProcessor.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationTypeStructureProcessor.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/ModificationTypeStructureProcessor.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -31,7 +31,7 @@
 import org.jboss.deployers.structure.spi.DeploymentContext;
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Determine if we need some modification.

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/TempModificationAction.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/TempModificationAction.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/TempModificationAction.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.deployers.vfs.plugins.structure.modify;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VFSUtils;
-
-/**
- * Temp modification action.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-class TempModificationAction implements ModificationAction
-{
-   public VirtualFile modify(VirtualFile original) throws IOException, URISyntaxException
-   {
-      return VFSUtils.temp(original);
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarModificationAction.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarModificationAction.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnjarModificationAction.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.deployers.vfs.plugins.structure.modify;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VFSUtils;
-
-/**
- * Unjar modification action.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-class UnjarModificationAction implements ModificationAction
-{
-   public VirtualFile modify(VirtualFile original) throws IOException, URISyntaxException
-   {
-      return VFSUtils.unjar(original);
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnpackModificationAction.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnpackModificationAction.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/modify/UnpackModificationAction.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.deployers.vfs.plugins.structure.modify;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VFSUtils;
-
-/**
- * Unpack modification action.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-class UnpackModificationAction implements ModificationAction
-{
-   public VirtualFile modify(VirtualFile original) throws IOException, URISyntaxException
-   {
-      return VFSUtils.unpack(original);
-   }
-}

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/war/WARStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/war/WARStructure.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/war/WARStructure.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -28,12 +28,13 @@
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.spi.structure.ContextInfo;
 import org.jboss.deployers.spi.structure.MetaDataType;
-import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSArchiveStructureDeployer;
 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.automount.Automounter;
+import org.jboss.vfs.util.SuffixMatchFilter;
 
 /**
  * WARStructure.
@@ -42,7 +43,7 @@
  * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  * @version $Revision: 83811 $
  */
-public class WARStructure extends AbstractVFSStructureDeployer
+public class WARStructure extends AbstractVFSArchiveStructureDeployer
 {
    /** The default filter which allows jars/jar directories */
    public static final VirtualFileFilter DEFAULT_WEB_INF_LIB_FILTER = new SuffixMatchFilter(".jar", VisitorAttributes.DEFAULT);
@@ -118,8 +119,14 @@
       this.includeWebInfInClasspath = includeWebInfInClasspath;
    }
 
-   public boolean determineStructure(StructureContext structureContext) throws DeploymentException
+   @Override
+   protected boolean hasValidSuffix(String name)
    {
+      return name.endsWith(".war");
+   }
+
+   public boolean doDetermineStructure(StructureContext structureContext) throws DeploymentException
+   {
       ContextInfo context = null;
       VirtualFile file = structureContext.getFile();
       try
@@ -128,117 +135,94 @@
 
          // the WEB-INF
          VirtualFile webinf = null;
-
-         if (isLeaf(file) == false)
+         
+         // We require either a WEB-INF or the name ends in .war
+         if (hasValidSuffix(file.getName()) == false)
          {
-            // 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 != 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;
-                  }
-               }
-               catch (IOException e)
-               {
-                  log.warn("Exception while checking if file is a war: " + e);
-                  return false;
-               }
-            }
-            else if (trace)
-            {
-               log.trace("... ok - name ends in .war.");
-            }
+           webinf = file.getChild("WEB-INF");
+           if (webinf.exists())
+           {
+              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;
+           }
+         }
+         else if (trace)
+         {
+            log.trace("... ok - name ends in .war.");
+         }
 
-            List<String> metaDataLocations = new ArrayList<String>();
-            metaDataLocations.add("WEB-INF");
+         List<String> metaDataLocations = new ArrayList<String>();
+         metaDataLocations.add("WEB-INF");
 
-            // Check for WEB-INF/classes
-            VirtualFile classes = null;
-            try
-            {
-               // The classpath contains WEB-INF/classes
-               classes = file.getChild("WEB-INF/classes");
+         // Check for WEB-INF/classes
+         VirtualFile classes = file.getChild("WEB-INF/classes");
 
-               // Check for a META-INF for metadata
-               if (classes != null)
-                  metaDataLocations.add("WEB-INF/classes/META-INF");
-            }
-            catch(IOException e)
-            {
-               log.warn("Exception while looking for classes, " + file.getPathName() + ", " + e);
-            }
+         // Check for a META-INF for metadata
+         if (classes.exists())
+            metaDataLocations.add("WEB-INF/classes/META-INF");
 
-            // Create a context for this war file and all its metadata locations
-            context = createContext(structureContext, metaDataLocations.toArray(new String[metaDataLocations.size()]));
+         // Create a context for this war file and all its metadata locations
+         context = createContext(structureContext, metaDataLocations.toArray(new String[metaDataLocations.size()]));
 
-            // Check for jars in WEB-INF/lib
-            List<VirtualFile> archives = null;
-            try
+         // Check for jars in WEB-INF/lib
+         List<VirtualFile> archives = null;
+         try
+         {
+            VirtualFile webinfLib = file.getChild("WEB-INF/lib");
+            if (webinfLib.exists())
             {
-               VirtualFile webinfLib = file.getChild("WEB-INF/lib");
-               if (webinfLib != null)
+               archives = webinfLib.getChildren(webInfLibFilter);
+               // Add the jars' META-INF for metadata
+               for (VirtualFile jar : archives)
                {
-                  archives = webinfLib.getChildren(webInfLibFilter);
-                  // Add the jars' META-INF for metadata
-                  for (VirtualFile jar : archives)
-                  {
-                     // either same as plain lib filter, null or accepts the jar
-                     if (webInfLibMetaDataFilter == null || webInfLibMetaDataFilter == webInfLibFilter || webInfLibMetaDataFilter.accepts(jar))
-                        addMetaDataPath(structureContext, context, "WEB-INF/lib/" + jar.getName() + "/META-INF", MetaDataType.ALTERNATIVE);
-                  }
+                  // either same as plain lib filter, null or accepts the jar
+                  if (webInfLibMetaDataFilter == null || webInfLibMetaDataFilter == webInfLibFilter || webInfLibMetaDataFilter.accepts(jar))
+                     addMetaDataPath(structureContext, context, "WEB-INF/lib/" + jar.getName() + "/META-INF", MetaDataType.ALTERNATIVE);
                }
             }
-            catch (IOException e)
-            {
-               log.warn("Exception looking for WEB-INF/lib, " + file.getPathName() + ", " + e);
-            }
+         }
+         catch (IOException e)
+         {
+            log.warn("Exception looking for WEB-INF/lib, " + file.getPathName() + ", " + e);
+         }
 
-            // Add the war manifest classpath entries
-            addClassPath(structureContext, file, false, true, context);
+         // Add the war manifest classpath entries
+         addClassPath(structureContext, file, false, true, context);
 
-            // Add WEB-INF/classes if present
-            if (classes != null)
-               addClassPath(structureContext, classes, true, false, context);
-            else if (trace)
-               log.trace("No WEB-INF/classes for: " + file.getPathName());
+         // Add WEB-INF/classes if present
+         if (classes != null)
+            addClassPath(structureContext, classes, true, false, context);
+         else if (trace)
+            log.trace("No WEB-INF/classes for: " + file.getPathName());
 
-            // and the top level jars in WEB-INF/lib
-            if (archives != null)
+         // and the top level jars in WEB-INF/lib
+         if (archives != null)
+         {
+            for (VirtualFile jar : archives) 
             {
-               for (VirtualFile jar : archives)
-                  addClassPath(structureContext, jar, true, true, context);
+               Automounter.mount(file, jar);
+               addClassPath(structureContext, jar, true, true, context);
             }
-            else if (trace)
-            {
-               log.trace("No WEB-INF/lib for: " + file.getPathName());
-            }
-
-            // do we include WEB-INF in classpath
-            if (includeWebInfInClasspath && webinf != null)
-            {
-               addClassPath(structureContext, webinf, true, false, context);
-            }
-
-            // There are no subdeployments for wars
-            return true;
          }
-         else
+         else if (trace)
          {
-            if (trace)
-               log.trace("... no - not a directory or an archive.");
-            return false;
+            log.trace("No WEB-INF/lib for: " + file.getPathName());
          }
+
+         // do we include WEB-INF in classpath
+         if (includeWebInfInClasspath && webinf != null)
+         {
+            addClassPath(structureContext, webinf, true, false, context);
+         }
+
+         // There are no subdeployments for wars
+         return true;
       }
       catch (Exception e)
       {

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/util/ClasspathUtils.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/util/ClasspathUtils.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/util/ClasspathUtils.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -27,7 +27,7 @@
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Classpath utils.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BaseDeployersVFSTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BaseDeployersVFSTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BaseDeployersVFSTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -38,9 +38,8 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
 import org.jboss.deployers.vfs.spi.structure.StructureDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.plugins.context.jar.JarUtils;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * BaseDeployersVFSTest.
@@ -74,7 +73,7 @@
    protected VirtualFile getVirtualFile(String root, String path) throws Exception
    {
       URL url = getResource(root);
-      return VFS.getVirtualFile(url, path);
+      return VFS.getChild(url).getChild(path);
    }
    
    /**
@@ -87,7 +86,9 @@
    protected String getURL(String path) throws Exception
    {
       URL url = getResource(path);
-      return url.toString();
+      if (url == null)
+         throw new IllegalArgumentException("Null url");
+      return new URL("jar:" + url + "!/").toString();
    }
    /**
     * Get a vfs url string from a path
@@ -99,7 +100,7 @@
    protected String getVfsURL(String path) throws Exception
    {
       URL url = getResource(path);
-      return "vfs"+url.toString();
+      return url.toString();
    }
 
    /**
@@ -112,7 +113,9 @@
    protected String getJarURL(String path) throws Exception
    {
       URL url = getResource(path);
-      url = JarUtils.createJarURL(url);
+      if (url == null)
+         throw new IllegalArgumentException("Null url");
+      url = new URL("jar:" + url + "!/");
       return url.toString();
    }
 

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BootstrapDeployersTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BootstrapDeployersTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BootstrapDeployersTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,15 +21,17 @@
 */
 package org.jboss.test.deployers;
 
-import java.io.IOException;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.security.CodeSource;
 import java.security.ProtectionDomain;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.io.Closeable;
+import java.io.IOException;
 
 import junit.framework.AssertionFailedError;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
 import org.jboss.classloader.plugins.ClassLoaderUtils;
 import org.jboss.classloader.plugins.jdk.AbstractJDKChecker;
 import org.jboss.dependency.spi.ControllerContext;
@@ -41,13 +43,11 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.test.deployers.support.AssembledDirectory;
 import org.jboss.test.kernel.junit.MicrocontainerTest;
-import org.jboss.virtual.AssembledDirectory;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.plugins.context.file.FileSystemContext;
-import org.jboss.virtual.plugins.context.jar.JarUtils;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixesExcludeFilter;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileAssembly;
 
 /**
  * BootstrapDeployersTest.
@@ -57,6 +57,8 @@
  */
 public abstract class BootstrapDeployersTest extends MicrocontainerTest
 {
+   private static Map<VirtualFile, Closeable> assemblyHandles = new HashMap<VirtualFile, Closeable>();
+   
    public static BootstrapDeployersTestDelegate getDelegate(Class<?> clazz) throws Exception
    {
       return new BootstrapDeployersTestDelegate(clazz);
@@ -95,13 +97,13 @@
       return (BootstrapDeployersTestDelegate) super.getDelegate();
    }
    
-   protected VirtualFile createDeploymentRoot(String root, String child) throws IOException
+   protected VirtualFile createDeploymentRoot(String root, String child) throws IOException, URISyntaxException
    {
       URL resourceRoot = getClass().getResource(root);
       if (resourceRoot == null)
          fail("Resource not found: " + root);
-      VirtualFile deployment = VFS.getVirtualFile(resourceRoot, child);
-      if (deployment == null)
+      VirtualFile deployment = VFS.getChild(resourceRoot).getChild(child);
+      if (! deployment.exists())
          fail("Child not found " + child + " from " + resourceRoot);
       return deployment;
    }
@@ -299,34 +301,6 @@
       }
    }
 
-   protected AssembledDirectory createAssembledDirectory(String name) throws Exception
-   {
-      return createAssembledDirectory(name, "");     
-   }
-
-   protected AssembledDirectory createAssembledDirectory(String name, String rootName) throws Exception
-   {
-      return AssembledDirectory.createAssembledDirectory(name, rootName);
-   }
-
-   protected void addPackage(AssembledDirectory dir, Class<?> reference) throws Exception
-   {
-      String packagePath = ClassLoaderUtils.packageNameToPath(reference.getName());
-      dir.addResources(reference, new String[] { packagePath + "/*.class" } , new String[0]);
-   }
-
-   protected void addPath(final AssembledDirectory dir, String path, String name) throws Exception
-   {
-      URL url = getResource(path);
-      if (url == null)
-         fail(path + " not found");
-
-      VirtualFile file = VFS.getVirtualFile(url, name);
-      // TODO - remove this filter after new VFS relase
-      SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(JarUtils.getSuffixes());
-      dir.addPath(file, noJars);
-  }
-   
    protected DeploymentUnit assertChild(DeploymentUnit parent, String name)
    {
       String parentName = parent.getName();
@@ -344,15 +318,40 @@
       }
       throw new AssertionFailedError("Child " + name + " not found in " + children);
    }
+   
+   protected AssembledDirectory createAssembledDirectory(VirtualFile mountPoint) throws Exception
+   {
+      VirtualFileAssembly assembly = new VirtualFileAssembly();
+      assemblyHandles.put(mountPoint, VFS.mountAssembly(assembly, mountPoint));
+      return new AssembledDirectory(getClass(), assembly);
+   }
+   
+   protected VirtualFile getVirtualFile(String path) throws URISyntaxException 
+   {
+      URL resource = getResource(path);
+      if(resource != null)
+         return VFS.getChild(resource);
+      return null;
+   }
 
+   protected void closeAssembly(VirtualFile mountPoint) throws IOException
+   {
+      if (assemblyHandles.containsKey(mountPoint))
+         assemblyHandles.get(mountPoint).close();
+   }
+
    protected void setUp() throws Exception
    {
       super.setUp();
       // This is a hack for a hack. ;-)
       AbstractJDKChecker.getExcluded().add(BootstrapDeployersTest.class);
-
-      // Reduce the noise from the VFS
-      // FIXME add method change logging levels to AbstractTestCase
-      Logger.getLogger(FileSystemContext.class).setLevel(Level.INFO);
    }
+   
+   protected void tearDown() throws Exception 
+   {
+      for (Closeable handle : assemblyHandles.values())
+      {
+         handle.close();
+      }
+   }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BootstrapDeployersTestDelegate.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BootstrapDeployersTestDelegate.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/BootstrapDeployersTestDelegate.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -40,6 +40,7 @@
 import org.jboss.test.kernel.junit.MicrocontainerTestDelegate;
 import org.jboss.xb.binding.resolver.MutableSchemaResolver;
 import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
+import org.jboss.classloader.plugins.filter.NothingClassFilter;
 
 /**
  * BootstrapDeployersTestDelegate.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/DeployersVFSTestSuite.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -40,7 +40,6 @@
 import org.jboss.test.deployers.vfs.matchers.VFSMatchersTestSuite;
 import org.jboss.test.deployers.vfs.metadata.VFSMetaDataTestSuite;
 import org.jboss.test.deployers.vfs.parsing.test.ParsingTestSuite;
-import org.jboss.test.deployers.vfs.redeploy.RedeployTestSuite;
 import org.jboss.test.deployers.vfs.reflect.ReflectTestSuite;
 import org.jboss.test.deployers.vfs.structure.VFSStructureTestSuite;
 import org.jboss.test.deployers.vfs.structurebuilder.VFSStructureBuilderTestSuite;
@@ -85,7 +84,6 @@
       suite.addTest(AnnotationScanningTestSuite.suite());
       suite.addTest(DependencyTestSuite.suite());
       suite.addTest(JMXTestSuite.suite());
-      suite.addTest(RedeployTestSuite.suite());
       suite.addTest(WebBeansTestSuite.suite()); // now Weld
       suite.addTest(ReflectTestSuite.suite());
 

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/support/AssembledDirectory.java (from rev 101022, projects/jboss-deployers/branches/vfs3/deployers-vfs/src/test/java/org/jboss/test/deployers/support/AssembledDirectory.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/support/AssembledDirectory.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/support/AssembledDirectory.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -0,0 +1,271 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.support;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.jboss.classloader.plugins.ClassLoaderUtils;
+import org.jboss.deployers.vfs.plugins.structure.jar.JARStructure;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileAssembly;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VisitorAttributes;
+import org.jboss.vfs.util.FilterVirtualFileVisitor;
+import org.jboss.vfs.util.SuffixesExcludeFilter;
+
+/**
+ * Bridge class used to help migrate existing tests to use VirtualFileAssembly.
+ *  
+ * @author <a href="jbailey at redhat.com">John Bailey</a>
+ *
+ */
+public class AssembledDirectory
+{
+   private final VirtualFileAssembly assembly;
+   private final Class<?> testClass;
+   
+   public AssembledDirectory(Class<?> testClass, VirtualFileAssembly assembly)
+   {
+      this.testClass = testClass;
+      this.assembly = assembly;
+   }
+   
+   public AssembledDirectory add(VirtualFile virtualFile)
+   {
+      assembly.add(virtualFile);
+      return this;
+   }
+
+   public AssembledDirectory addPackage(Class<?> reference) throws Exception
+   {
+      return addPackage("", reference);
+   }
+   
+   public AssembledDirectory addPackage(String path, Class<?> reference) throws Exception
+   {
+      String packagePath = ClassLoaderUtils.packageNameToPath(reference.getName());
+      return addResources(path + "/" + packagePath, reference, new String[] {packagePath + "/*.class"}, new String[0]);
+   }
+
+   public AssembledDirectory addResources(String path, Class<?> reference, final String[] includes, final String[] excludes)
+   {
+      return addResources(path, reference, includes, excludes, reference.getClassLoader());
+   }
+
+   public AssembledDirectory addResources(String path, Class<?> reference, final String[] includes, final String[] excludes, ClassLoader loader)
+   {
+      String resource = reference.getName().replace('.', '/') + ".class";
+      URL url = loader.getResource(resource);
+      if (url == null)
+         throw new RuntimeException("Could not find baseResource: " + resource);
+
+      String urlString = url.toString();
+      int idx = urlString.lastIndexOf(resource);
+      urlString = urlString.substring(0, idx);
+
+      try
+      {
+         url = new URL(urlString);
+         final VirtualFile parent = VFS.getChild(url);
+
+         VisitorAttributes va = new VisitorAttributes();
+         va.setLeavesOnly(true);
+         va.setRecurseFilter(new SuffixesExcludeFilter(JARStructure.DEFAULT_JAR_SUFFIXES));
+
+         VirtualFileFilter filter = new VirtualFileFilter()
+         {
+            public boolean accepts(VirtualFile file)
+            {
+               boolean matched = false;
+               String path = file.getPathNameRelativeTo(parent);
+               for (String include : includes)
+               {
+                  if (antMatch(path, include))
+                  {
+                     matched = true;
+                     break;
+                  }
+               }
+               if (matched == false)
+                  return false;
+               if (excludes != null)
+               {
+                  for (String exclude : excludes)
+                  {
+                     if (antMatch(path, exclude))
+                        return false;
+                  }
+               }
+               return true;
+            }
+         };
+
+         FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(filter, va);
+         parent.visit(visitor);
+         List<VirtualFile> files = visitor.getMatched();
+         for (VirtualFile vf : files)
+         {
+            assembly.add(path + "/" + vf.getName(), vf);
+         }
+      }
+      catch (IOException e)
+      {
+         throw new RuntimeException(e);
+      }
+      catch (URISyntaxException e)
+      {
+         throw new RuntimeException(e);
+      }
+      return this;
+   }
+
+   public AssembledDirectory addPath(String existingPath) throws Exception
+   {
+      return addPath("", existingPath);
+   }
+   
+   public AssembledDirectory addPath(VirtualFile existingPath) throws Exception 
+   {
+      return addPath("", existingPath);
+   }
+   
+   public AssembledDirectory addPath(String assemblyPath, String existingPath) throws Exception 
+   {
+      return addPath(assemblyPath, getVirtualFile(existingPath));
+   }
+   
+   public AssembledDirectory addPath(String assemblyPath, VirtualFile existingPath) throws Exception
+   {
+      SuffixesExcludeFilter noJars = new SuffixesExcludeFilter(JARStructure.DEFAULT_JAR_SUFFIXES);
+      FilterVirtualFileVisitor visitor = new FilterVirtualFileVisitor(noJars);
+      existingPath.visit(visitor);
+      for (VirtualFile match : visitor.getMatched())
+      {
+         assembly.add(assemblyPath + "/" + match.getName(), match);
+      }
+      return this;
+   }
+
+   /**
+    * Create a regular expression pattern from an Ant file matching pattern
+    *
+    * @param matcher the matcher pattern
+    * @return the pattern instance
+    */
+   private Pattern getPattern(String matcher)
+   {
+      if (matcher == null)
+         throw new IllegalArgumentException("Null matcher");
+
+      matcher = matcher.replace(".", "\\.");
+      matcher = matcher.replace("*", ".*");
+      matcher = matcher.replace("?", ".{1}");
+      return Pattern.compile(matcher);
+   }
+
+   /**
+    * Determine whether a given file path matches an Ant pattern.
+    *
+    * @param path the path
+    * @param expression the expression
+    * @return true if we match
+    */
+   private boolean antMatch(String path, String expression)
+   {
+      if (path == null)
+         throw new IllegalArgumentException("Null path");
+      if (expression == null)
+         throw new IllegalArgumentException("Null expression");
+      if (path.startsWith("/"))
+         path = path.substring(1);
+      if (expression.endsWith("/"))
+         expression += "**";
+      String[] paths = path.split("/");
+      String[] expressions = expression.split("/");
+
+      int x = 0, p;
+      Pattern pattern = getPattern(expressions[0]);
+
+      for (p = 0; p < paths.length && x < expressions.length; p++)
+      {
+         if (expressions[x].equals("**"))
+         {
+            do
+            {
+               x++;
+            }
+            while (x < expressions.length && expressions[x].equals("**"));
+            if (x == expressions.length)
+               return true; // "**" with nothing after it
+            pattern = getPattern(expressions[x]);
+         }
+         String element = paths[p];
+         if (pattern.matcher(element).matches())
+         {
+            x++;
+            if (x < expressions.length)
+            {
+               pattern = getPattern(expressions[x]);
+            }
+         }
+         else if (!(x > 0 && expressions[x - 1].equals("**"))) // our previous isn't "**"
+         {
+            return false;
+         }
+      }
+      if (p < paths.length)
+         return false;
+      if (x < expressions.length)
+         return false;
+      return true;
+   }
+   
+   protected VirtualFile getVirtualFile(String path) throws URISyntaxException 
+   {
+      URL resource = getResource(path);
+      if(resource != null)
+         return VFS.getChild(resource);
+      return null;
+   }
+
+   
+   private URL getResource(final String name)
+   {
+      PrivilegedAction<URL> action = new PrivilegedAction<URL>()
+      {
+         public URL run()
+         {
+            return testClass.getResource(name);
+         }
+      };
+      return AccessController.doPrivileged(action);
+   }
+   
+}

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AbstractAnnotationsScanningUnitTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AbstractAnnotationsScanningUnitTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/AbstractAnnotationsScanningUnitTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -36,7 +36,8 @@
 import org.jboss.test.deployers.vfs.annotations.support.war.WebMarkOnClass;
 import org.jboss.test.deployers.vfs.annotations.support.war.impl.WebMarkOnClassImpl;
 import org.jboss.test.deployers.vfs.annotations.support.warlib.SomeUIClass;
-import org.jboss.virtual.AssembledDirectory;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
@@ -50,23 +51,18 @@
 
    public void testBasicScanning() throws Throwable
    {
-      AssembledDirectory ear = createTopLevelWithUtil();
+      VirtualFile ear = createTopLevelWithUtil();
+      createAssembledDirectory(ear.getChild("simple.jar"))
+        .addPackage(JarMarkOnClassImpl.class)
+        .addPackage(JarMarkOnClass.class)
+        .addPath("/annotations/basic-scan/jar");
+      
+      createAssembledDirectory(ear.getChild("simple.war"))
+         .addPackage("WEB-INF/classes", WebMarkOnClassImpl.class)
+         .addPackage("WEB-INF/classes", WebMarkOnClass.class)
+         .addPackage("WEB-INF/lib/ui.jar", SomeUIClass.class)
+         .addPath("/annotations/basic-scan/web");
 
-      AssembledDirectory jar = ear.mkdir("simple.jar");
-      addPackage(jar, JarMarkOnClassImpl.class);
-      addPackage(jar, JarMarkOnClass.class);
-      addPath(jar, "/annotations/basic-scan/jar", "META-INF");
-
-      AssembledDirectory war = ear.mkdir("simple.war");
-      AssembledDirectory webinf = war.mkdir("WEB-INF");
-      AssembledDirectory classes = webinf.mkdir("classes");
-      addPackage(classes, WebMarkOnClassImpl.class);
-      addPackage(classes, WebMarkOnClass.class);
-      AssembledDirectory lib = webinf.mkdir("lib");
-      AssembledDirectory uijar = lib.mkdir("ui.jar");
-      addPackage(uijar, SomeUIClass.class);
-      addPath(war, "/annotations/basic-scan/web", "WEB-INF");
-
       enableTrace("org.jboss.deployers");
 
       DeploymentUnit unit = assertDeploy(ear);
@@ -113,17 +109,15 @@
       assertEquals(fields.toString(), onFiled, fields.size());
    }
 
-   protected AssembledDirectory createTopLevelWithUtil() throws Exception
+   protected VirtualFile createTopLevelWithUtil() throws Exception
    {
-      AssembledDirectory topLevel = createAssembledDirectory("top-level.ear", "top-level.ear");
-      addPath(topLevel, "/annotations/basic-scan", "META-INF");
-      AssembledDirectory earLib = topLevel.mkdir("lib");
-      AssembledDirectory util = earLib.mkdir("util.jar");
-      addPackage(util, Util.class);
-      AssembledDirectory ext = earLib.mkdir("ext.jar");
-      addPackage(ext, External.class);
-      AssembledDirectory ann = earLib.mkdir("ann.jar");
-      addPackage(ann, NoExtRecurseFilter.class);
+      VirtualFile topLevel = VFS.getChild(getName()).getChild("top-level.ear");
+      
+      createAssembledDirectory(topLevel)
+         .addPath("/annotations/basic-scan")
+         .addPackage("lib/util.jar", Util.class)
+         .addPackage("lib/ext.jar", External.class)
+         .addPackage("lib/ann.jar", NoExtRecurseFilter.class);
       return topLevel;
    }
 }
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/ScanningMetaDataTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/ScanningMetaDataTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/annotations/test/ScanningMetaDataTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -37,7 +37,7 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.test.deployers.BaseDeployersVFSTest;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/ClassLoaderTestSuite.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/ClassLoaderTestSuite.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/ClassLoaderTestSuite.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -24,7 +24,6 @@
 import org.jboss.test.deployers.vfs.classloader.test.BootstrapDeployersSmokeTestUnitTestCase;
 import org.jboss.test.deployers.vfs.classloader.test.DeploymentDependsOnDeploymentClassLoaderUnitTestCase;
 import org.jboss.test.deployers.vfs.classloader.test.DeploymentDependsOnManualClassLoaderUnitTestCase;
-import org.jboss.test.deployers.vfs.classloader.test.InMemoryClasesUnitTestCase;
 import org.jboss.test.deployers.vfs.classloader.test.ManagedObjectClassLoadingParserUnitTestCase;
 import org.jboss.test.deployers.vfs.classloader.test.ManifestClassLoaderUnitTestCase;
 import org.jboss.test.deployers.vfs.classloader.test.ManualDependsOnDeploymentClassLoaderUnitTestCase;
@@ -60,7 +59,6 @@
       suite.addTest(BootstrapDeployersSmokeTestUnitTestCase.suite());
       suite.addTest(VFSClassLoaderDependenciesUnitTestCase.suite());
       suite.addTest(VFSUndeployOrderClassLoaderUnitTestCase.suite());
-      suite.addTest(InMemoryClasesUnitTestCase.suite());
       suite.addTest(DeploymentDependsOnManualClassLoaderUnitTestCase.suite());
       suite.addTest(ManualDependsOnDeploymentClassLoaderUnitTestCase.suite());
       suite.addTest(DeploymentDependsOnDeploymentClassLoaderUnitTestCase.suite());

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/support/TestMetaDataUrlIntegrationDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/support/TestMetaDataUrlIntegrationDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/support/TestMetaDataUrlIntegrationDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -25,7 +25,7 @@
 
 import org.jboss.deployers.vfs.plugins.classloader.MetaDataUrlIntegrationDeployer;
 import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.virtual.VFS;
+import org.jboss.vfs.VFS;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
@@ -36,8 +36,7 @@
    {
       super(KernelDeployment.class);
       setFiles(new String[]{"metadata-touch-beans.xml"});
-      VFS.init();
-      URL dynamicClassRoot = new URL("vfsmemory", "integration-test", "");
+      URL dynamicClassRoot = VFS.getChild("/integration-test").toURL();
       setIntegrationURL(dynamicClassRoot);
    }
 }
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/support/TestPathUrlIntegrationDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/support/TestPathUrlIntegrationDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/support/TestPathUrlIntegrationDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -25,7 +25,7 @@
 
 import org.jboss.deployers.vfs.plugins.classloader.PathUrlIntegrationDeployer;
 import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.virtual.VFS;
+import org.jboss.vfs.VFS;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
@@ -36,8 +36,7 @@
    {
       super(KernelDeployment.class);
       setFiles(new String[]{"data/path-touch-beans.xml"});
-      VFS.init();
-      URL dynamicClassRoot = new URL("vfsmemory", "integration-test", "");
+      URL dynamicClassRoot = VFS.getChild("/integration-test").toURL();
       setIntegrationURL(dynamicClassRoot);
    }
 }
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/BootstrapDeployersSmokeTestUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/BootstrapDeployersSmokeTestUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/BootstrapDeployersSmokeTestUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -33,7 +33,8 @@
 import org.jboss.test.deployers.BootstrapDeployersTest;
 import org.jboss.test.deployers.vfs.classloader.support.a.A;
 import org.jboss.test.deployers.vfs.classloader.support.b.B;
-import org.jboss.virtual.AssembledDirectory;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * BootstrapDeployersSmokeTestUnitTestCase.
@@ -111,9 +112,10 @@
    
    public void testAssembledDirectory() throws Exception
    {
-      AssembledDirectory dirA = createAssembledDirectory("a");
-      addPackage(dirA, A.class);
-      addPath(dirA, "/bootstrap/test-assembled", "META-INF");
+      VirtualFile dirA = VFS.getChild(getName()).getChild("/assembly");
+      createAssembledDirectory(dirA)
+         .addPackage(A.class)
+         .addPath("/bootstrap/test-assembled");
       VFSDeploymentUnit unitA = assertDeploy(dirA);
       try
       {
@@ -132,11 +134,11 @@
    
    public void testAssembledSubDirectory() throws Exception
    {
-      AssembledDirectory dirA = createAssembledDirectory("a");
-      addPackage(dirA, A.class);
-      AssembledDirectory dirB = dirA.mkdir("b");
-      addPackage(dirB, B.class);
-      addPath(dirB, "/bootstrap/test-assembled", "META-INF");
+      VirtualFile dirA = VFS.getChild(getName()).getChild("/assembly");
+      createAssembledDirectory(dirA)
+         .addPackage(A.class)
+         .addPackage("/b", B.class)
+         .addPath("/b", "/bootstrap/test-assembled");
       VFSDeploymentUnit unitA = assertDeploy(dirA);
       try
       {

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/InMemoryClasesUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/InMemoryClasesUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/InMemoryClasesUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,153 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.deployers.vfs.classloader.test;
-
-import java.net.URL;
-
-import junit.framework.Test;
-import org.jboss.classloader.plugins.jdk.AbstractJDKChecker;
-import org.jboss.classloader.plugins.system.DefaultClassLoaderSystem;
-import org.jboss.classloader.spi.ClassLoaderSystem;
-import org.jboss.classloader.spi.ParentPolicy;
-import org.jboss.classloading.spi.dependency.ClassLoading;
-import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
-import org.jboss.classloading.spi.version.Version;
-import org.jboss.deployers.client.spi.DeployerClient;
-import org.jboss.deployers.client.spi.Deployment;
-import org.jboss.deployers.spi.deployer.Deployer;
-import org.jboss.deployers.structure.spi.main.MainDeployerStructure;
-import org.jboss.deployers.vfs.plugins.classloader.InMemoryClassesDeployer;
-import org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer;
-import org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer;
-import org.jboss.deployers.vfs.plugins.classloader.DeploymentHostNameCreator;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.test.deployers.vfs.classloader.support.TestLevelClassLoaderSystemDeployer;
-import org.jboss.test.deployers.vfs.classloader.support.a.A;
-import org.jboss.virtual.MemoryFileFactory;
-import org.jboss.virtual.VirtualFile;
-
-/**
- * InMemoryClasesUnitTestCase.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- * @version $Revision: 1.1 $
- */
-public class InMemoryClasesUnitTestCase extends VFSClassLoaderDependenciesTest
-{
-   private InMemoryClassesDeployer inMemoryClassesDeployer = new InMemoryClassesDeployer();
-
-   public InMemoryClasesUnitTestCase(String name)
-   {
-      super(name);
-   }
-
-   public static Test suite()
-   {
-      return suite(InMemoryClasesUnitTestCase.class);
-   }
-
-   public void testInMemory() throws Exception
-   {
-      DeployerClient mainDeployer = getMainDeployer();
-      MainDeployerStructure main = (MainDeployerStructure) mainDeployer; 
-
-      Version v1 = Version.parseVersion("1");
-
-      Deployment ad = createDeployment("A");
-      ClassLoadingMetaData clmd = addClassLoadingMetaData(ad, v1, true, A.class);
-      clmd.setBlackListable(false);
-      assertDeploy(mainDeployer, ad);
-
-      VFSDeploymentUnit unit = (VFSDeploymentUnit) main.getDeploymentUnit("A");
-      VirtualFile file = unit.getAttachment(InMemoryClassesDeployer.DYNAMIC_CLASS_KEY, VirtualFile.class);
-      assertNotNull(file);
-      assertTrue("dynamic classes should be in the classpath", unit.getClassPath().contains(file));
-
-      URL root = unit.getAttachment(InMemoryClassesDeployer.DYNAMIC_CLASS_URL_KEY, URL.class);
-      assertNotNull(root);
-      
-      String aPackage = A.class.getPackage().getName();
-      aPackage = aPackage.replace(".", "/");
-      String resourceName = aPackage + "/TestInMemory";
-      URL testResource = new URL(root, resourceName);
-      ClassLoader cl = unit.getClassLoader();
-      assertNull(cl.getResource(resourceName));
-      
-      byte[] bytes = new byte[0];
-      MemoryFileFactory.putFile(testResource, bytes);
-      URL resource = cl.getResource(resourceName);
-      assertNotNull(resource);
-      // dunno why direct URL equals fails?
-      assertEquals(testResource.toExternalForm(), resource.toExternalForm());
-      
-      mainDeployer.undeploy(ad);
-      mainDeployer.checkComplete();
-      assertFalse("dynamic classes should NOT be in the classpath", unit.getClassPath().contains(file));
-   }
-
-   public void testHostNameCreator() throws Exception
-   {
-      DeployerClient mainDeployer = getMainDeployer();
-      MainDeployerStructure main = (MainDeployerStructure) mainDeployer;
-
-      Deployment ad = createDeployment("A");
-      Version v1 = Version.parseVersion("1");
-      ClassLoadingMetaData clmd = addClassLoadingMetaData(ad, v1, true, A.class);
-      clmd.setBlackListable(false);
-
-      inMemoryClassesDeployer.setHostNameCreator(new DeploymentHostNameCreator());
-      try
-      {
-         assertDeploy(mainDeployer, ad);
-
-         VFSDeploymentUnit unit = (VFSDeploymentUnit) main.getDeploymentUnit("A");
-         URL root = unit.getAttachment(InMemoryClassesDeployer.DYNAMIC_CLASS_URL_KEY, URL.class);
-         assertNotNull(root);
-         assertEquals("vfsmemory://in-memory-test-classes", root.toExternalForm());
-      }
-      finally
-      {
-         inMemoryClassesDeployer.setHostNameCreator(null);
-      }
-   }
-
-   protected DeployerClient getMainDeployer()
-   {
-      AbstractJDKChecker.getExcluded().add(VFSClassLoaderDependenciesTest.class);
-      
-      ClassLoading classLoading = new ClassLoading();
-      ClassLoaderSystem system = new DefaultClassLoaderSystem();
-      system.getDefaultDomain().setParentPolicy(ParentPolicy.BEFORE_BUT_JAVA_ONLY);
-
-      deployer1 = new VFSClassLoaderDescribeDeployer();
-      deployer1.setClassLoading(classLoading);
-
-      deployer2 = new TestLevelClassLoaderSystemDeployer();
-      deployer2.setClassLoading(classLoading);
-      deployer2.setSystem(system);
-      
-      Deployer deployer4 = new VFSClassLoaderClassPathDeployer();
-      
-      return createMainDeployer(deployer1, deployer2, inMemoryClassesDeployer, deployer4);
-   }
-}

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/IntegrationDeployerUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/IntegrationDeployerUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/IntegrationDeployerUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,16 +21,21 @@
  */
 package org.jboss.test.deployers.vfs.classloader.test;
 
-import java.io.ByteArrayOutputStream;
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileOutputStream;
 import java.io.InputStream;
 import java.net.URL;
+import java.util.concurrent.Executors;
 
 import junit.framework.Test;
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.test.deployers.BootstrapDeployersTest;
-import org.jboss.virtual.MemoryFileFactory;
-import org.jboss.virtual.VFS;
+import org.jboss.vfs.TempFileProvider;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * IntegrationDeployerUnitTestCase.
@@ -39,6 +44,8 @@
  */
 public class IntegrationDeployerUnitTestCase extends BootstrapDeployersTest
 {
+   private Closeable tmpDirHandle;
+   
    public static Test suite()
    {
       return suite(IntegrationDeployerUnitTestCase.class);
@@ -51,33 +58,38 @@
 
    protected void setUp() throws Exception
    {
-      VFS.init();
-
-      URL dynamicClassRoot = new URL("vfsmemory", "integration-test", "");
-      VFS vfs = MemoryFileFactory.createRoot(dynamicClassRoot);
-      System.setProperty("integration.test.url", vfs.getRoot().toURL().toExternalForm());
-
+      VirtualFile dynamicClassRoot = VFS.getChild("/integration-test");
+      tmpDirHandle = VFS.mountTemp(dynamicClassRoot, TempFileProvider.create("test", Executors.newSingleThreadScheduledExecutor()));
+      System.setProperty("integration.test.url", dynamicClassRoot.toURL().toExternalForm());
+      
       URL file = getResource("/org/jboss/test/deployers/vfs/classloader/test/Touch.class");
       assertNotNull(file);
-      ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+      File tempFile = dynamicClassRoot.getChild("Touch.class").getPhysicalFile();
+      
+      FileOutputStream os = new FileOutputStream(tempFile);
       InputStream is = file.openStream();
       try
       {
          int read = is.read();
          while(read >= 0)
          {
-            baos.write(read);
+            os.write(read);
             read = is.read();
          }
       }
       finally
       {
-         is.close();
+         VFSUtils.safeClose(is);
+         VFSUtils.safeClose(os);
       }
-      MemoryFileFactory.putFile(new URL(dynamicClassRoot.toExternalForm() + "/Touch.class"), baos.toByteArray());
-
       super.setUp();
    }
+   
+   protected void tearDown() throws Exception 
+   {
+      VFSUtils.safeClose(tmpDirHandle);
+   }
 
    public void testPath() throws Exception
    {

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/ManifestClassLoaderUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/ManifestClassLoaderUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/ManifestClassLoaderUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -30,7 +30,8 @@
 import org.jboss.test.deployers.BootstrapDeployersTest;
 import org.jboss.test.deployers.vfs.classloader.support.a.A;
 import org.jboss.test.deployers.vfs.classloader.support.usea.UseA;
-import org.jboss.virtual.AssembledDirectory;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * ManifestClassLoaderUnitTestCase.
@@ -52,10 +53,11 @@
 
    public void testBasicManifest() throws Exception
    {
-      AssembledDirectory topLevel = createTopLevelWithUtil();
-      AssembledDirectory sub = topLevel.mkdir("sub.jar");
-      addPackage(sub, UseA.class);
-      addPath(sub, "/classloader/manifest/basic", "META-INF");
+      VirtualFile topLevel = createTopLevelWithUtil();
+      VirtualFile sub = topLevel.getChild("sub.jar");
+      createAssembledDirectory(sub)
+         .addPackage(UseA.class)
+         .addPath("/classloader/manifest/basic");
       VFSDeploymentUnit unit = assertDeploy(topLevel);
       try
       {
@@ -72,10 +74,11 @@
 
    public void testScopedManifest() throws Exception
    {
-      AssembledDirectory topLevel = createTopLevelWithUtil();
-      AssembledDirectory sub = topLevel.mkdir("sub.jar");
-      addPackage(sub, UseA.class);
-      addPath(sub, "/classloader/manifest/scoped", "META-INF");
+      VirtualFile topLevel = createTopLevelWithUtil();
+      VirtualFile sub = topLevel.getChild("sub.jar");
+      createAssembledDirectory(sub)
+         .addPackage(UseA.class)
+         .addPath("/classloader/manifest/scoped");
       enableTrace("org.jboss.deployers");
       VFSDeploymentUnit unit = assertDeploy(topLevel);
       try
@@ -95,13 +98,15 @@
 
    public void testScopedManifests() throws Exception
    {
-      AssembledDirectory topLevel = createTopLevelWithUtil();
-      AssembledDirectory sub1 = topLevel.mkdir("sub1.jar");
-      addPackage(sub1, UseA.class);
-      addPath(sub1, "/classloader/manifest/scoped", "META-INF");
-      AssembledDirectory sub2 = topLevel.mkdir("sub2.jar");
-      addPackage(sub2, UseA.class);
-      addPath(sub2, "/classloader/manifest/scoped", "META-INF");
+      VirtualFile topLevel = createTopLevelWithUtil();
+      VirtualFile sub1 = topLevel.getChild("sub1.jar");
+      createAssembledDirectory(sub1)
+         .addPackage(UseA.class)
+         .addPath("/classloader/manifest/scoped");
+      VirtualFile sub2 = topLevel.getChild("sub2.jar");
+      createAssembledDirectory(sub2)
+         .addPackage(UseA.class)
+         .addPath("/classloader/manifest/scoped");
       VFSDeploymentUnit unit = assertDeploy(topLevel);
       try
       {
@@ -125,16 +130,20 @@
    public void testScopedManifestNotParent() throws Exception
    {
       // Dummy parent to create a different parent domain
-      AssembledDirectory dummyParent = createAssembledDirectory("dummyParent.jar");
-      addPath(dummyParent, "/classloader/manifest/dummyparent", "META-INF");
+      VirtualFile dummyParent = VFS.getChild(getName()).getChild("dummyParent.jar");
+      createAssembledDirectory(dummyParent)
+         .addPath("/classloader/manifest/dummyparent");
       VFSDeploymentUnit dummy = assertDeploy(dummyParent);
       try
       {
-         AssembledDirectory topLevel = createTopLevelWithUtil();
-         addPath(topLevel, "/classloader/manifest/topscoped", "META-INF");
-         AssembledDirectory sub = topLevel.mkdir("sub.jar");
-         addPackage(sub, UseA.class);
-         addPath(sub, "/classloader/manifest/scopednotparent", "META-INF");
+         VirtualFile topLevel = VFS.getChild(getName()).getChild("top-level.jar");
+         createAssembledDirectory(topLevel)
+            .addPackage("util.jar", A.class)
+            .addPath("/classloader/manifest/topscoped");
+         VirtualFile sub = topLevel.getChild("sub.jar");
+         createAssembledDirectory(sub)
+            .addPackage(UseA.class)
+            .addPath("/classloader/manifest/scopednotparent");
          VFSDeploymentUnit unit = assertDeploy(topLevel);
          try
          {
@@ -164,11 +173,11 @@
       return (Class) a.get(null);
    }
    
-   protected AssembledDirectory createTopLevelWithUtil() throws Exception
+   protected VirtualFile createTopLevelWithUtil() throws Exception
    {
-      AssembledDirectory topLevel = createAssembledDirectory("top-level.jar");
-      AssembledDirectory util = topLevel.mkdir("util.jar");
-      addPackage(util, A.class);
-      return topLevel;
+      VirtualFile virtualFile = VFS.getChild(getName()).getChild("top-level.jar");
+      createAssembledDirectory(virtualFile)
+         .addPackage("util.jar", A.class);
+      return virtualFile;
    }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/VFSClassLoaderDependenciesTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/VFSClassLoaderDependenciesTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/classloader/test/VFSClassLoaderDependenciesTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -54,8 +54,8 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
 import org.jboss.test.deployers.BaseDeployersVFSTest;
 import org.jboss.test.deployers.vfs.classloader.support.TestLevelClassLoaderSystemDeployer;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * ClassLoadersDependencies test.
@@ -103,7 +103,7 @@
    protected VFSDeployment createDeployment(String name) throws Exception
    {
       URL url = getClass().getProtectionDomain().getCodeSource().getLocation();
-      VirtualFile file = VFS.getRoot(url);
+      VirtualFile file = VFS.getChild(url);
       VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(file);
       DeploymentFactory factory = new DeploymentFactory();
       factory.addContext(deployment, "");

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/test/BeanScanningUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/test/BeanScanningUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/test/BeanScanningUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -49,6 +49,8 @@
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.test.deployers.vfs.deployer.AbstractDeployerUnitTest;
+import org.jboss.classloader.plugins.filter.JavaOnlyClassFilter;
+import org.jboss.classloader.plugins.filter.NothingClassFilter;
 
 /**
  * BeanScanningUnitTestCase.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/test/BookingUnitTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/test/BookingUnitTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/facelets/test/BookingUnitTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -45,10 +45,6 @@
 import org.jboss.test.deployers.vfs.deployer.AbstractDeployerUnitTest;
 import org.jboss.test.deployers.vfs.deployer.facelets.support.SearchDeployer;
 import org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.plugins.cache.IterableTimedVFSCache;
-import org.jboss.virtual.spi.cache.VFSCache;
-import org.jboss.virtual.spi.cache.VFSCacheFactory;
 
 /**
  * BookingUnitTestCase.
@@ -67,13 +63,7 @@
    protected void setUp() throws Exception
    {
       super.setUp();
-      // Uncomment this to test VFS nested jar copy handling
-      System.setProperty(VFSUtils.FORCE_COPY_KEY, "true");
 
-      VFSCache cache = new IterableTimedVFSCache();
-      cache.start();
-      VFSCacheFactory.setInstance(cache);
-
       addStructureDeployer(main, new WARStructure());
       addStructureDeployer(main, new MockEarStructureDeployer());
    }
@@ -81,7 +71,6 @@
    @Override
    protected void tearDown() throws Exception
    {
-      VFSCacheFactory.setInstance(null);
       super.tearDown();
    }
 

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/jaxp/support/TestXmlDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/jaxp/support/TestXmlDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/jaxp/support/TestXmlDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -2,7 +2,7 @@
 
 import org.jboss.deployers.vfs.spi.deployer.JAXPDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.w3c.dom.Document;
 
 /**

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/merge/support/TestBeanMergeDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/merge/support/TestBeanMergeDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/merge/support/TestBeanMergeDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -32,7 +32,7 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
 import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/nonmetadata/support/MockBshDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/nonmetadata/support/MockBshDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/nonmetadata/support/MockBshDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -28,7 +28,7 @@
 import org.jboss.deployers.vfs.spi.deployer.FileMatcher;
 import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Mock .bsh deployer.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVFSDeploymentContext.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVFSDeploymentContext.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVFSDeploymentContext.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -25,7 +25,7 @@
 import java.util.Collections;
 
 import org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/MyVirtualFile.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,206 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.deployers.vfs.deployer.validate.support;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URI;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import java.security.cert.Certificate;
-
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.spi.VirtualFileHandler;
-import org.jboss.virtual.spi.VFSContext;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class MyVirtualFile extends VirtualFile
-{
-   /**
-    * The serialVersionUID
-    */
-   private static final long serialVersionUID = 1L;
-
-   public MyVirtualFile()
-   {
-      super(getVirtualFileHandler());
-   }
-
-   public String getName()
-   {
-      return "";
-   }
-
-   public InputStream openStream() throws IOException
-   {
-      return null;
-   }
-
-   private static VirtualFileHandler getVirtualFileHandler()
-   {
-      return new VirtualFileHandler()
-      {
-         /**
-          * The serialVersionUID
-          */
-         private static final long serialVersionUID = 1L;
-
-         public String getName()
-         {
-            return null;
-         }
-
-         public String getPathName()
-         {
-            return null;
-         }
-
-         public URL toVfsUrl() throws MalformedURLException, URISyntaxException
-         {
-            return null;
-         }
-
-         public URI toURI() throws URISyntaxException
-         {
-            return null;
-         }
-
-         public URL toURL() throws MalformedURLException, URISyntaxException
-         {
-            return null;
-         }
-
-         public long getLastModified() throws IOException
-         {
-            return 0;
-         }
-
-         public boolean hasBeenModified() throws IOException
-         {
-            return false;
-         }
-
-         public long getSize() throws IOException
-         {
-            return 0;
-         }
-
-         public boolean exists() throws IOException
-         {
-            return false;
-         }
-
-         public boolean isLeaf() throws IOException
-         {
-            return true;
-         }
-
-         public boolean isArchive() throws IOException
-         {
-            return false;
-         }
-
-         public boolean isHidden() throws IOException
-         {
-            return false;
-         }
-
-         public String getLocalPathName()
-         {
-            return null;
-         }
-
-         public boolean isNested() throws IOException
-         {
-            return false;
-         }
-
-         public InputStream openStream() throws IOException
-         {
-            return null;
-         }
-
-         public VirtualFileHandler getParent() throws IOException
-         {
-            return null;
-         }
-
-         public List<VirtualFileHandler> getChildren(boolean ignoreErrors) throws IOException
-         {
-            return null;
-         }
-
-         public VirtualFileHandler getChild(String path) throws IOException
-         {
-            return null;
-         }
-
-         public VFSContext getVFSContext()
-         {
-            return null;
-         }
-
-         public VirtualFile getVirtualFile()
-         {
-            return null;
-         }
-
-         public void close()
-         {
-
-         }
-
-         public void replaceChild(VirtualFileHandler original, VirtualFileHandler replacement)
-         {
-
-         }
-
-         public boolean removeChild(String name) throws IOException
-         {
-            return false;
-         }
-
-         public boolean delete(int gracePeriod) throws IOException
-         {
-            return false;
-         }
-
-         public URL getRealURL() throws IOException, URISyntaxException
-         {
-            return null;
-         }
-
-         public void cleanup()
-         {
-         }
-
-         public Certificate[] getCertificates()
-         {
-            return null;
-         }
-      };
-   }
-}

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/TestXmlDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/TestXmlDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/support/TestXmlDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -24,7 +24,7 @@
 import org.jboss.test.deployers.vfs.deployer.jaxp.support.SomeBean;
 import org.jboss.deployers.vfs.spi.deployer.JAXPDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.w3c.dom.Document;
 
 /**

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/DeployersValidateInputTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,8 +21,12 @@
 */
 package org.jboss.test.deployers.vfs.deployer.validate.test;
 
+import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
+import java.security.CodeSigner;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import junit.framework.Test;
@@ -35,9 +39,10 @@
 import org.jboss.test.BaseTestCase;
 import org.jboss.test.deployers.vfs.deployer.nonmetadata.support.MockBshDeployer;
 import org.jboss.test.deployers.vfs.deployer.validate.support.MyVFSDeploymentContext;
-import org.jboss.test.deployers.vfs.deployer.validate.support.MyVirtualFile;
 import org.jboss.test.deployers.vfs.deployer.validate.support.TestXmlDeployer;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.spi.FileSystem;
 import org.jboss.xb.binding.JBossXBException;
 
 /**
@@ -69,14 +74,14 @@
       map.put(xmlDeployer, RuntimeException.class);
       map.put(new SchemaResolverDeployer<Object>(Object.class), JBossXBException.class);
 
-      VirtualFile root = new MyVirtualFile();
+      VirtualFile root = getNullStreamFile();
       AbstractVFSDeploymentContext context = new MyVFSDeploymentContext(root, "");
       DeploymentUnit unit = context.getDeploymentUnit();
 
       for(AbstractVFSParsingDeployer<?> deployer : map.keySet())
       {
          // set name to "" to match in deployment
-         deployer.setName("");
+         deployer.setName("nullfile");
          try
          {
             deployer.deploy(unit);
@@ -93,4 +98,73 @@
          }
       }
    }
+   
+   public VirtualFile getNullStreamFile() throws IOException 
+   {
+      VirtualFile file = VFS.getChild("/nullfile");
+      
+      VFS.mount(file, new FileSystem()
+      {
+         public InputStream openInputStream(VirtualFile mountPoint, VirtualFile target) throws IOException
+         {
+            return null;
+         }
+         
+         public boolean isReadOnly()
+         {
+            return false;
+         }
+         
+         public boolean isFile(VirtualFile mountPoint, VirtualFile target)
+         {
+            return true;
+         }
+         
+         public boolean isDirectory(VirtualFile mountPoint, VirtualFile target)
+         {
+            return false;
+         }
+         
+         public long getSize(VirtualFile mountPoint, VirtualFile target)
+         {
+            return 0;
+         }
+         
+         public long getLastModified(VirtualFile mountPoint, VirtualFile target)
+         {
+            return 0;
+         }
+         
+         public File getFile(VirtualFile mountPoint, VirtualFile target) throws IOException
+         {
+            return null;
+         }
+         
+         public List<String> getDirectoryEntries(VirtualFile mountPoint, VirtualFile target)
+         {
+            return null;
+         }
+         
+         public CodeSigner[] getCodeSigners(VirtualFile mountPoint, VirtualFile target)
+         {
+            return null;
+         }
+         
+         public boolean exists(VirtualFile mountPoint, VirtualFile target)
+         {
+            return true;
+         }
+         
+         public boolean delete(VirtualFile mountPoint, VirtualFile target)
+         {
+            return false;
+         }
+         
+         public void close() throws IOException
+         {
+         }
+      });
+      
+      return file;
+   }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/ObjectMFDTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/ObjectMFDTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/validate/test/ObjectMFDTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -32,7 +32,7 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.test.deployers.BaseDeployersVFSTest;
 import org.jboss.test.deployers.vfs.deployer.validate.support.StructureOMFDeployer;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Validate omfd deployer.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deploymentfactory/test/VFSDeploymentFactoryUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deploymentfactory/test/VFSDeploymentFactoryUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deploymentfactory/test/VFSDeploymentFactoryUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,7 +21,7 @@
 */
 package org.jboss.test.deployers.vfs.deploymentfactory.test;
 
-import java.io.IOException;
+import java.net.URISyntaxException;
 import java.net.URL;
 
 import junit.framework.Test;
@@ -32,8 +32,8 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
 import org.jboss.test.deployers.deploymentfactory.AbstractDeploymentFactoryTest;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * VFSDeploymentFactoryUnitTestCase.
@@ -94,9 +94,9 @@
       {
          resource = getResource("/dummy");
          assertNotNull(resource);
-         return VFS.getRoot(resource);
+         return VFS.getChild(resource);
       }
-      catch (IOException e)
+      catch (URISyntaxException e)
       {
          throw new RuntimeException("Failed to get resource: " + resource, e);
       }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/matchers/support/FeedbackDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/matchers/support/FeedbackDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/matchers/support/FeedbackDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -27,7 +27,7 @@
 
 import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Gather feedback from deployer units.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/metadata/support/ServicesFilter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/metadata/support/ServicesFilter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/metadata/support/ServicesFilter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,9 +21,9 @@
  */
 package org.jboss.test.deployers.vfs.metadata.support;
 
-import org.jboss.virtual.plugins.vfs.helpers.AbstractVirtualFileFilterWithAttributes;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.util.AbstractVirtualFileFilterWithAttributes;
+import org.jboss.vfs.VisitorAttributes;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/metadata/test/MetaDataUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/metadata/test/MetaDataUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/metadata/test/MetaDataUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -31,8 +31,8 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.test.deployers.BaseDeployersVFSTest;
 import org.jboss.test.deployers.vfs.metadata.support.ServicesFilter;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * MetaDataUnitTestCase.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/parsing/test/DeployersAltDDTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/parsing/test/DeployersAltDDTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/parsing/test/DeployersAltDDTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,24 +21,14 @@
 */
 package org.jboss.test.deployers.vfs.parsing.test;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.List;
-import java.security.cert.Certificate;
-
 import junit.framework.Test;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentContext;
 import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.test.BaseTestCase;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.spi.VFSContext;
-import org.jboss.virtual.spi.VirtualFileHandler;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * alt-dd tests.
@@ -84,142 +74,6 @@
 
    private static VirtualFile getMockVF()
    {
-      return new VirtualFile(new VirtualFileHandler()
-      {
-         private static final long serialVersionUID = 1L;
-
-         public void close()
-         {
-         }
-
-         public boolean exists() throws IOException
-         {
-            return false;
-         }
-
-         public VirtualFileHandler getChild(String arg0) throws IOException
-         {
-            return null;
-         }
-
-         public List<VirtualFileHandler> getChildren(boolean arg0) throws IOException
-         {
-            return null;
-         }
-
-         public long getLastModified() throws IOException
-         {
-            return 0;
-         }
-
-         public String getName()
-         {
-            return null;
-         }
-
-         public VirtualFileHandler getParent() throws IOException
-         {
-            return null;
-         }
-
-         public String getPathName()
-         {
-            return null;
-         }
-
-         public long getSize() throws IOException
-         {
-            return 0;
-         }
-
-         public VFSContext getVFSContext()
-         {
-            return null;
-         }
-
-         public VirtualFile getVirtualFile()
-         {
-            return null;
-         }
-
-         public boolean hasBeenModified() throws IOException
-         {
-            return false;
-         }
-
-         public boolean isHidden() throws IOException
-         {
-            return false;
-         }
-
-         public boolean isLeaf() throws IOException
-         {
-            return false;
-         }
-
-         public boolean isArchive() throws IOException
-         {
-            return false;
-         }
-
-         public String getLocalPathName()
-         {
-            return null;
-         }
-
-         public boolean isNested() throws IOException
-         {
-            return false;
-         }
-
-         public InputStream openStream() throws IOException
-         {
-            return null;
-         }
-
-         public URI toURI() throws URISyntaxException
-         {
-            return null;
-         }
-
-         public URL toURL() throws MalformedURLException, URISyntaxException
-         {
-            return null;
-         }
-
-         public URL toVfsUrl() throws MalformedURLException, URISyntaxException
-         {
-            return null;
-         }
-
-         public void replaceChild(VirtualFileHandler original, VirtualFileHandler replacement)
-         {
-
-         }
-
-         public boolean removeChild(String name) throws IOException
-         {
-            return false;
-         }
-
-         public boolean delete(int gracePeriod) throws IOException
-         {
-            return false;
-         }
-
-         public URL getRealURL() throws IOException, URISyntaxException
-         {
-            return null;
-         }
-
-         public void cleanup()
-         {
-         }
-
-         public Certificate[] getCertificates()
-         {
-            return null;
-         }
-      });
+      return VFS.getChild("/mock/file");
    }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/ClassPoolTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/ClassPoolTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/ClassPoolTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -33,7 +33,7 @@
 import org.jboss.reflect.spi.TypeInfoFactory;
 import org.jboss.test.deployers.vfs.reflect.support.jar.PlainJavaBean;
 import org.jboss.test.deployers.vfs.reflect.support.web.AnyServlet;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Abstract test for ClassPool.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/ReflectTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/ReflectTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/ReflectTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -42,6 +42,7 @@
 import org.jboss.reflect.spi.TypeInfo;
 import org.jboss.reflect.spi.TypeInfoFactory;
 import org.jboss.test.deployers.BootstrapDeployersTest;
+import org.jboss.test.deployers.support.AssembledDirectory;
 import org.jboss.test.deployers.vfs.reflect.support.crm.CrmFacade;
 import org.jboss.test.deployers.vfs.reflect.support.ejb.MySLSBean;
 import org.jboss.test.deployers.vfs.reflect.support.ext.External;
@@ -51,8 +52,8 @@
 import org.jboss.test.deployers.vfs.reflect.support.ui.UIBean;
 import org.jboss.test.deployers.vfs.reflect.support.util.SomeUtil;
 import org.jboss.test.deployers.vfs.reflect.support.web.AnyServlet;
-import org.jboss.virtual.AssembledDirectory;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Abstract test for Reflect.
@@ -90,31 +91,31 @@
 
    public void testJar() throws Exception
    {
-      AssembledDirectory directory = createJar();
+      VirtualFile directory = createJar();
       assertReflect(directory, PlainJavaBean.class);
    }
 
    public void testEjbJar() throws Exception
    {
-      AssembledDirectory directory = createEjbJar();
+      VirtualFile directory = createEjbJar();
       assertReflect(directory, MySLSBean.class);
    }
 
    public void testWar() throws Exception
    {
-      AssembledDirectory directory = createWar();
+      VirtualFile directory = createWar();
       assertReflect(directory, AnyServlet.class);
    }
 
    public void testSar() throws Exception
    {
-      AssembledDirectory directory = createSar();
+      VirtualFile directory = createSar();
       assertReflect(directory, SomeMBean.class);
    }
 
    public void testBasicEar() throws Exception
    {
-      AssembledDirectory directory = createBasicEar();
+      VirtualFile directory = createBasicEar();
       Map<Class<?>, String> classes = new HashMap<Class<?>, String>();
       classes.put(SomeUtil.class, null);
       classes.put(PlainJavaBean.class, null);
@@ -129,25 +130,25 @@
 
    public void testTopLevelWithUtil() throws Exception
    {
-      AssembledDirectory directory = createTopLevelWithUtil("/reflect/earutil");
+      VirtualFile directory = createTopLevelWithUtil("/reflect/earutil");
       assertReflect(directory, SomeUtil.class, External.class);
    }
 
    public void testWarInEar() throws Exception
    {
-      AssembledDirectory directory = createWarInEar();
+      VirtualFile directory = createWarInEar();
       assertReflect(directory, Collections.<Class<?>, String>singletonMap(AnyServlet.class, "simple.war"));
    }
 
    public void testJarInEar() throws Exception
    {
-      AssembledDirectory directory = createJarInEar();
+      VirtualFile directory = createJarInEar();
       assertReflect(directory, PlainJavaBean.class);
    }
 
    public void testHierarchyCLUsage() throws Exception
    {
-      AssembledDirectory directory = createBasicEar();
+      VirtualFile directory = createBasicEar();
       DeploymentUnit unit = assertDeploy(directory);
       try
       {
@@ -188,29 +189,18 @@
 
    public void testEar2War() throws Exception
    {
-      AssembledDirectory ear = createAssembledDirectory("ptd-ear-1.0-SNAPSHOT.ear", "ptd-ear-1.0-SNAPSHOT.ear");
-      addPath(ear, "/reflect/ear2war", "META-INF");
-      AssembledDirectory lib = ear.mkdir("lib");
-      AssembledDirectory common = lib.mkdir("common.jar");
-      addPackage(common, PlainJavaBean.class);
+      VirtualFile earFile = VFS.getChild(getName()).getChild("ptd-ear-1.0-SNAPSHOT.ear");
+      createAssembledDirectory(earFile)
+         .addPath("META-INF", "/reflect/ear2war/META-INF")
+         .addPackage("lib/common.jar", PlainJavaBean.class)
+         .addPath("ptd-jsf-1.0-SNAPSHOT.war", "/reflect/ear2war/war1")
+         .addPackage("ptd-jsf-1.0-SNAPSHOT.war/WEB-INF/lib/wj1.jar", AnyServlet.class)
+         .addPath("ptd-jsf-1.0-SNAPSHOT.war/WEB-INF/lib/wj1.jar", "/reflect/ear2war/manifest")
+         .addPath("ptd-ws-1.0-SNAPSHOT.war", "/reflect/ear2war/war2")
+         .addPackage("ptd-ws-1.0-SNAPSHOT.war/WEB-INF/lib/wj2.jar", AnyServlet.class)
+         .addPath("ptd-ws-1.0-SNAPSHOT.war/WEB-INF/lib/wj2.jar", "/reflect/ear2war/manifest");
 
-      AssembledDirectory war1 = ear.mkdir("ptd-jsf-1.0-SNAPSHOT.war");
-      AssembledDirectory webinf1 = war1.mkdir("WEB-INF");
-      addPath(war1, "/reflect/ear2war/war1/", "WEB-INF");
-      AssembledDirectory lib1 = webinf1.mkdir("lib");
-      AssembledDirectory wj1 = lib1.mkdir("wj1.jar");
-      addPackage(wj1, AnyServlet.class);
-      addPath(wj1, "/reflect/ear2war/manifest/", "META-INF");
-
-      AssembledDirectory war2 = ear.mkdir("ptd-ws-1.0-SNAPSHOT.war");
-      AssembledDirectory webinf2 = war2.mkdir("WEB-INF");
-      addPath(war2, "/reflect/ear2war/war2/", "WEB-INF");
-      AssembledDirectory lib2 = webinf2.mkdir("lib");
-      AssembledDirectory wj2 = lib2.mkdir("wj2.jar");
-      addPackage(wj2, AnyServlet.class);
-      addPath(wj2, "/reflect/ear2war/manifest/", "META-INF");
-
-      Deployment deployment = createVFSDeployment(ear);
+      Deployment deployment = createVFSDeployment(earFile);
       String top = deployment.getName();
       String left = top + "ptd-jsf-1.0-SNAPSHOT.war/";
       String right = top + "ptd-ws-1.0-SNAPSHOT.war/";
@@ -223,10 +213,12 @@
       System.setProperty("jboss.tests.url", location.toExternalForm());
       try
       {
-         AssembledDirectory jar = createJar();
-         addPath(jar, "/reflect/module", "META-INF");
+         VirtualFile jarFile = VFS.getChild(getName()).getChild("simple.jar");
+         createAssembledDirectory(jarFile)
+            .addPackage(PlainJavaBean.class)
+            .addPath("/reflect/module");
 
-         Deployment deployment = createVFSDeployment(jar);
+         Deployment deployment = createVFSDeployment(jarFile);
          DeployerClient main = getDeployerClient();
          main.deploy(deployment);
          try
@@ -281,10 +273,13 @@
       System.setProperty("jboss.tests.url", location.toExternalForm());
       try
       {
-         AssembledDirectory jar = createJar();
-         addPath(jar, "/reflect/" + name, "META-INF");
+         VirtualFile jarFile = VFS.getChild(getName()).getChild("simple.jar");
+         createAssembledDirectory(jarFile)
+            .addPackage(PlainJavaBean.class)
+            .addPath("/reflect/module")
+            .addPath("/reflect/" + name);
 
-         Deployment deployment = createVFSDeployment(jar);
+         Deployment deployment = createVFSDeployment(jarFile);
          DeployerClient main = getDeployerClient();
          main.deploy(deployment);
          try
@@ -407,127 +402,110 @@
       return assertChild(parent, name);
    }
 
-   protected AssembledDirectory createJar() throws Exception
+   protected VirtualFile createJar() throws Exception
    {
       return createJar("simple.jar", PlainJavaBean.class);
    }
 
-   protected AssembledDirectory createJar(String name, Class<?> reference) throws Exception
+   protected VirtualFile createJar(String name, Class<?> reference) throws Exception
    {
-      AssembledDirectory jar = createAssembledDirectory(name, name);
-      addPackage(jar, reference);
-      return jar;
+      VirtualFile jarFile = VFS.getChild(getName()).getChild(name);
+      createAssembledDirectory(jarFile)
+         .addPackage(reference);
+      return jarFile;
    }
 
-   protected AssembledDirectory createEjbJar() throws Exception
+   protected VirtualFile createEjbJar() throws Exception
    {
-      AssembledDirectory jar = createAssembledDirectory("ejbs.jar", "ejbs.jar");
-      addPackage(jar, MySLSBean.class);
-
-      addPath(jar, "/reflect/ejb", "META-INF");
-      return jar;
+      VirtualFile jarFile = VFS.getChild(getName()).getChild("ejbs.jar");
+      createAssembledDirectory(jarFile)
+         .addPackage(MySLSBean.class)
+         .addPath("/reflect/ejb");
+      return jarFile;
    }
 
-   protected AssembledDirectory createWar() throws Exception
+   protected VirtualFile createWar() throws Exception
    {
-      AssembledDirectory war = createAssembledDirectory("simple.war", "simple.war");
-      AssembledDirectory webinf = war.mkdir("WEB-INF");
-      AssembledDirectory classes = webinf.mkdir("classes");
-      addPackage(classes, AnyServlet.class);
-      addPath(war, "/reflect/web", "WEB-INF");
-      return war;
+      VirtualFile warFile = VFS.getChild(getName()).getChild("simple.war");
+      createAssembledDirectory(warFile)
+         .addPackage("WEB-INF/classes", AnyServlet.class)
+         .addPath("/reflect/web");
+      return warFile;
    }
 
-   protected AssembledDirectory createSar() throws Exception
+   protected VirtualFile createSar() throws Exception
    {
-      AssembledDirectory sar = createAssembledDirectory("simple.sar", "simple.sar");
-      addPackage(sar, SomeMBean.class);
-      return sar;
+      VirtualFile sarFile = VFS.getChild(getName()).getChild( "simple.sar");
+      createAssembledDirectory(sarFile)
+         .addPackage(SomeMBean.class);
+      return sarFile;
    }
 
-   protected AssembledDirectory createBasicEar() throws Exception
+   protected VirtualFile createBasicEar() throws Exception
    {
-      AssembledDirectory ear = createTopLevelWithUtil("/reflect/simple");
+      VirtualFile ear = createTopLevelWithUtil("/reflect/simple");
+      
+      VirtualFile jarFile = ear.getChild("simple.jar");
+      createAssembledDirectory(jarFile)
+         .addPackage(PlainJavaBean.class);
 
-      AssembledDirectory jar = ear.mkdir("simple.jar");
-      addPackage(jar, PlainJavaBean.class);
+      VirtualFile ejbsFile = ear.getChild("ejbs.jar");
+      createAssembledDirectory(ejbsFile)
+         .addPackage(MySLSBean.class)
+         .addPath("/reflect/ejb");
 
-      AssembledDirectory ejbs = ear.mkdir("ejbs.jar");
-      addPackage(ejbs, MySLSBean.class);
-      addPath(ejbs, "/reflect/ejb", "META-INF");
+      
+      VirtualFile warFile = ear.getChild("simple.war");
+      createAssembledDirectory(warFile)
+         .addPackage("WEB-INF/classes", AnyServlet.class)
+         .addPath("/reflect/web")
+         .addPackage("WEB-INF/lib/ui.jar", UIBean.class);
 
-      AssembledDirectory war = ear.mkdir("simple.war");
-      AssembledDirectory webinf = war.mkdir("WEB-INF");
-      AssembledDirectory classes = webinf.mkdir("classes");
-      addPackage(classes, AnyServlet.class);
-      addPath(war, "/reflect/web", "WEB-INF");
-
-      AssembledDirectory lib = webinf.mkdir("lib");
-
-      AssembledDirectory uijar = lib.mkdir("ui.jar");
-      addPackage(uijar, UIBean.class);
-
       // another war
-      war = ear.mkdir("jsfapp.war");
-      webinf = war.mkdir("WEB-INF");
-      addPath(war, "/reflect/web", "WEB-INF");
-      classes = webinf.mkdir("classes");
-      addPackage(classes, JsfBean.class);
+      warFile = ear.getChild("jsfapp.war");
+      createAssembledDirectory(warFile)
+         .addPath("/reflect/web")
+         .addPackage("WEB-INF/classes", JsfBean.class)
+         .addPackage("WEB-INF/lib/ui_util.jar", CrmFacade.class);
 
-      lib = webinf.mkdir("lib");
-
-      uijar = lib.mkdir("ui_util.jar");
-      addPackage(uijar, CrmFacade.class);
-
       // a sar
-      AssembledDirectory sar = ear.mkdir("simple.sar");
-      addPackage(sar, SomeMBean.class);
-      addPath(war, "/reflect/sar", "META-INF");
+      VirtualFile sarFile = ear.getChild("simple.sar");
+      createAssembledDirectory(sarFile)
+         .addPackage(SomeMBean.class)
+         .addPath("/reflect/sar");
 
       enableTrace("org.jboss.deployers");
 
       return ear;
    }
 
-   protected AssembledDirectory createTopLevelWithUtil(String path) throws Exception
+   protected VirtualFile createTopLevelWithUtil(String path) throws Exception
    {
-      AssembledDirectory topLevel = createAssembledDirectory("top-level.ear", "top-level.ear");
-      addPath(topLevel, path, "META-INF");
-
-      AssembledDirectory earLib = topLevel.mkdir("lib");
-
-      AssembledDirectory util = earLib.mkdir("util.jar");
-      addPackage(util, SomeUtil.class);
-
-      AssembledDirectory ext = earLib.mkdir("ext.jar");
-      addPackage(ext, External.class);
-
-      return topLevel;
+      VirtualFile earFile = VFS.getChild(getName()).getChild("top-level.ear");
+      createAssembledDirectory(earFile)
+         .addPath(path)
+         .addPackage("lib/util.jar", SomeUtil.class)
+         .addPackage("lib/ext.jar", External.class);
+      return earFile;
    }
 
-   protected AssembledDirectory createWarInEar() throws Exception
+   protected VirtualFile createWarInEar() throws Exception
    {
-      AssembledDirectory ear = createAssembledDirectory("war-in-ear.ear", "war-in-ear.ear");
-      addPath(ear, "/reflect/warinear", "META-INF");
-
-      AssembledDirectory war = ear.mkdir("simple.war");
-      AssembledDirectory webinf = war.mkdir("WEB-INF");
-      AssembledDirectory classes = webinf.mkdir("classes");
-      addPackage(classes, AnyServlet.class);
-      addPath(war, "/reflect/web", "WEB-INF");
-
-      return ear;
+      VirtualFile earFile = VFS.getChild(getName()).getChild("war-in-ear.ear");
+      createAssembledDirectory(earFile)
+         .addPath("/reflect/warinear")
+         .addPackage("simple.war/WEB-INF/classes", AnyServlet.class)
+         .addPath("simple.war", "/reflect/web");
+      return earFile;
    }
 
-   protected AssembledDirectory createJarInEar() throws Exception
+   protected VirtualFile createJarInEar() throws Exception
    {
-      AssembledDirectory ear = createAssembledDirectory("jar-in-ear.ear", "jar-in-ear.ear");
-      addPath(ear, "/reflect/jarinear", "META-INF");
-
-      AssembledDirectory jar = ear.mkdir("simple.jar");
-      addPackage(jar, PlainJavaBean.class);
-
-      return ear;
+      VirtualFile earFile = VFS.getChild(getName()).getChild("jar-in-ear.ear"); 
+      createAssembledDirectory(earFile)
+         .addPath("/reflect/jarinear")
+         .addPackage("simple.jar", PlainJavaBean.class);
+      return earFile;
    }
 
    protected Deployment createIsolatedDeployment(String name) throws Exception
@@ -542,7 +520,7 @@
 
    protected Deployment createIsolatedDeployment(String name, String parentDomain, Class<?> reference, ClassLoadingMetaData clmd) throws Exception
    {
-      AssembledDirectory jar = createJar(name, reference);
+      VirtualFile jar = createJar(name, reference);
       Deployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(jar);
 
       if (clmd == null)

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/TypeInfoTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/TypeInfoTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/reflect/test/TypeInfoTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -26,7 +26,7 @@
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.jboss.reflect.spi.TypeInfo;
 import org.jboss.reflect.spi.TypeInfoFactory;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.jboss.test.deployers.vfs.reflect.support.web.AnyServlet;
 import org.jboss.test.deployers.vfs.reflect.support.jar.PlainJavaBean;
 

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/AbstractStructureTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/AbstractStructureTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/AbstractStructureTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -39,9 +39,9 @@
 import org.jboss.deployers.vfs.spi.structure.StructureDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.test.BaseTestCase;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VFSUtils;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * AbstractStructureUnitTestCase.
@@ -57,12 +57,6 @@
       super(name);
    }
 
-   protected void assertUnpacked(VirtualFile file) throws Exception
-   {
-      VirtualFile modified = VFSUtils.unpack(file);
-      assertTrue(VFSUtils.isTemporaryFile(modified));
-   }
-
    protected void assertNoChildContexts(VFSDeploymentContext context)
    {
       assertChildContexts(context);
@@ -167,7 +161,7 @@
    {
       VirtualFile root = context.getRoot();
       List<VirtualFile> metaDataLocation = context.getMetaDataLocations(filter);
-      VirtualFile expected = root.findChild(metaDataPath);
+      VirtualFile expected = root.getChild(metaDataPath);
       assertNotNull(metaDataLocation);
       assertEquals(1, metaDataLocation.size());
       assertEquals(expected, metaDataLocation.get(0));
@@ -186,7 +180,7 @@
       int i = 0;
       for(String path : metaDataPath)
       {
-         VirtualFile expected = root.findChild(path);
+         VirtualFile expected = root.getChild(path);
          assertEquals(expected, metaDataLocations.get(i++));
       }
    }
@@ -227,7 +221,7 @@
       for (String path : paths)
       {
          VirtualFile ref = reference.getRoot();
-         VirtualFile expected = ref.findChild(path);
+         VirtualFile expected = ref.getChild(path);
          assertTrue("Expected " + expected +" in " + classPath, classPath.contains(expected));
       }
    }
@@ -306,6 +300,7 @@
    {
       VFSDeploymentContext result = assertDeploy(context, path);
       assertNoChildContexts(result);
+      result.cleanup();
       return result;
    }
    
@@ -332,7 +327,8 @@
    protected VirtualFile getVirtualFile(String root, String path) throws Exception
    {
       URL url = getResource(root);
-      return VFS.getVirtualFile(url, path);
+      VirtualFile rootFile = VFS.getChild(url);
+      return rootFile.getChild(path);
    }
 
    @Override

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/VFSStructureTestSuite.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/VFSStructureTestSuite.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/VFSStructureTestSuite.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -43,7 +43,6 @@
 import org.jboss.test.deployers.vfs.structure.modified.test.DirRemovalModificationTestCase;
 import org.jboss.test.deployers.vfs.structure.modified.test.MetaDataStructureModificationTestCase;
 import org.jboss.test.deployers.vfs.structure.modified.test.MetaDataStructureModificationTreeCacheTestCase;
-import org.jboss.test.deployers.vfs.structure.modified.test.SynchModificationTestCase;
 import org.jboss.test.deployers.vfs.structure.test.StructureDeployerContextClassLoaderTestCase;
 import org.jboss.test.deployers.vfs.structure.test.TerminateStructureTestCase;
 import org.jboss.test.deployers.vfs.structure.war.test.CombinedWARStructureUnitTestCase;
@@ -91,7 +90,6 @@
       suite.addTest(EsbStructureUnitTestCase.suite());
       suite.addTest(MetaDataStructureModificationTestCase.suite());
       suite.addTest(MetaDataStructureModificationTreeCacheTestCase.suite());
-      suite.addTest(SynchModificationTestCase.suite());
       suite.addTest(DirRemovalModificationTestCase.suite());
 
       return suite;

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/dir/test/EsbStructureUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/dir/test/EsbStructureUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/dir/test/EsbStructureUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -28,8 +28,8 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.test.deployers.vfs.structure.AbstractStructureTest;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * Esb example test.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/dir/test/GroupingStructureUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/dir/test/GroupingStructureUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/dir/test/GroupingStructureUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -27,8 +27,8 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Test grouping examples.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/support/MockEarStructureDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/support/MockEarStructureDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/support/MockEarStructureDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -34,15 +34,17 @@
 
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.spi.structure.ContextInfo;
-import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSArchiveStructureDeployer;
 import org.jboss.deployers.vfs.spi.structure.CandidateAnnotationsCallback;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.plugins.vfs.helpers.SuffixMatchFilter;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.util.automount.Automounter;
+import org.jboss.vfs.util.SuffixMatchFilter;
 import org.jboss.mcann.AnnotationRepository;
+import org.jboss.mcann.AnnotationRepository;
 
 /**
  * A mock ear structure deployer that illustrates concepts involved with an ear
@@ -52,7 +54,7 @@
  * @author Ales.Justin at jboss.org
  * @version $Revision:$
  */
-public class MockEarStructureDeployer extends AbstractVFSStructureDeployer
+public class MockEarStructureDeployer extends AbstractVFSArchiveStructureDeployer
 {
    /**
     * The default ear/lib filter
@@ -93,28 +95,34 @@
       this.earLibFilter = earLibFilter;
    }
 
-   public boolean determineStructure(StructureContext structureContext) throws DeploymentException
+   
+   @Override
+   protected boolean hasValidSuffix(String name)
    {
+      return name.endsWith(".ear");
+   }
+
+   public boolean doDetermineStructure(StructureContext structureContext) throws DeploymentException
+   {
       ContextInfo context;
       boolean valid;
       VirtualFile file = structureContext.getFile();
       try
       {
-         if (file.isLeaf() == true || file.getName().endsWith(".ear") == false)
+         if (hasValidSuffix(file.getName()) == false)
             return false;
 
          context = createContext(structureContext, "META-INF");
-
-         VirtualFile applicationProps = getMetaDataFile(file, "META-INF/application.properties");
-         VirtualFile jbossProps = getMetaDataFile(file, "META-INF/jboss-application.properties");
+         VirtualFile applicationProps = file.getChild("META-INF/application.properties");
+         VirtualFile jbossProps = file.getChild("META-INF/jboss-application.properties");
          boolean scan = true;
          List<EarModule> modules = new ArrayList<EarModule>();
-         if (applicationProps != null)
+         if (applicationProps.exists())
          {
             scan = false;
             readAppXml(applicationProps, modules);
          }
-         if (jbossProps != null)
+         if (jbossProps.exists())
          {
             readAppXml(jbossProps, modules);
          }
@@ -122,11 +130,14 @@
          try
          {
             VirtualFile lib = file.getChild("lib");
-            if (lib != null)
+            if (lib.exists())
             {
                List<VirtualFile> archives = lib.getChildren(earLibFilter);
                for (VirtualFile archive : archives)
+               {
+                  Automounter.mount(file, archive);
                   addClassPath(structureContext, archive, true, true, context);
+               }
             }
          }
          catch (IOException ignored)
@@ -146,28 +157,19 @@
             String fileName = mod.getFileName();
             if (fileName != null && (fileName = fileName.trim()).length() > 0)
             {
-               try
+               VirtualFile module = file.getChild(fileName);
+               if (! module.exists())
                {
-                  VirtualFile module = file.getChild(fileName);
-                  if (module == null)
-                  {
-                     throw new RuntimeException(fileName
-                           + " module listed in application.xml does not exist within .ear "
-                           + file.getName());
-                  }
-                  // Ask the deployers to analyze this
-                  if (structureContext.determineChildStructure(module) == false)
-                  {
-                     throw new RuntimeException(fileName
-                           + " module listed in application.xml is not a recognized deployment, .ear: "
-                           + file.getName());
-                  }
+                  throw new RuntimeException(fileName
+                        + " module listed in application.xml does not exist within .ear "
+                        + file.getName());
                }
-               catch (IOException e)
+               // Ask the deployers to analyze this
+               if (structureContext.determineChildStructure(module) == false)
                {
                   throw new RuntimeException(fileName
-                        + " module listed in application.xml does not exist within .ear "
-                        + file.getName(), e);
+                        + " module listed in application.xml is not a recognized deployment, .ear: "
+                        + file.getName());
                }
             }
          }
@@ -296,17 +298,17 @@
       else if (path.endsWith(".jar"))
       {
          // Look for a META-INF/application-client.xml
-         VirtualFile mfFile = getMetaDataFile(archive, "META-INF/MANIFEST.MF");
-         VirtualFile clientXml = getMetaDataFile(archive, "META-INF/application-client.xml");
-         VirtualFile ejbXml = getMetaDataFile(archive, "META-INF/ejb-jar.xml");
-         VirtualFile jbossXml = getMetaDataFile(archive, "META-INF/jboss.xml");
-         //VirtualFile seamXml = getMetaDataFile(archive, "META-INF/components.xml");
+         VirtualFile mfFile = archive.getChild("META-INF/MANIFEST.MF");
+         VirtualFile clientXml = archive.getChild("META-INF/application-client.xml");
+         VirtualFile ejbXml = archive.getChild("META-INF/ejb-jar.xml");
+         VirtualFile jbossXml = archive.getChild("META-INF/jboss.xml");
+         //VirtualFile seamXml = archive.getChild("META-INF/components.xml");
 
-         if (clientXml != null)
+         if (clientXml.exists())
          {
             type = J2eeModuleMetaData.CLIENT;
          }
-         else if (mfFile != null)
+         else if (mfFile.exists())
          {
             Manifest mf = VFSUtils.readManifest(mfFile);
             Attributes attrs = mf.getMainAttributes();
@@ -319,7 +321,7 @@
                determineType(context, archive);
             }
          }
-         else if (ejbXml != null || jbossXml != null) // || seamXml != null)
+         else if (ejbXml.exists() || jbossXml.exists()) // || seamXml.exists())
          {
             type = J2eeModuleMetaData.EJB;
          }
@@ -344,19 +346,6 @@
       return tmp.toString();
    }
 
-   private VirtualFile getMetaDataFile(VirtualFile file, String path)
-   {
-      VirtualFile metaFile = null;
-      try
-      {
-         metaFile = file.getChild(path);
-      }
-      catch (IOException ignored)
-      {
-      }
-      return metaFile;
-   }
-
    private static class EarCandidateAnnotationsCallback implements CandidateAnnotationsCallback
    {
       private static final Logger log = Logger.getLogger(EarCandidateAnnotationsCallback.class);

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/support/SimpleVFSResourceLoader.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/support/SimpleVFSResourceLoader.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/support/SimpleVFSResourceLoader.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -23,7 +23,7 @@
 
 import java.net.URL;
 
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
@@ -43,7 +43,7 @@
       try
       {
          VirtualFile child = root.getChild(name);
-         if (child != null)
+         if (child.exists())
             return child.toURL();
          else
             return null;

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/test/AbstractEARStructureTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/test/AbstractEARStructureTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/test/AbstractEARStructureTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -36,7 +36,6 @@
 import org.jboss.test.deployers.vfs.structure.ear.support.Service;
 import org.jboss.test.deployers.vfs.structure.ear.support.Servlet;
 import org.jboss.test.deployers.vfs.structure.ear.support.Stateless;
-import org.jboss.virtual.plugins.context.jar.JarUtils;
 
 /**
  * Abstract ear structure deployer tests
@@ -64,7 +63,7 @@
 
    protected VFSDeploymentContext determineStructure(VFSDeployment deployment) throws Exception
    {
-      Set<String> defaultSuffixes = JarUtils.getSuffixes();
+      Set<String> defaultSuffixes = JARStructure.DEFAULT_JAR_SUFFIXES;
       JARStructure jarStructure = new JARStructure();
       jarStructure.setSupportsCandidateAnnotations(true);
       jarStructure.addCandidateAnnotation(Stateless.class);

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/test/InnerModificationUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/test/InnerModificationUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/ear/test/InnerModificationUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -65,6 +65,6 @@
    {
       VFSDeploymentContext root = assertDeploy("/structure/explicit", "explicit.ear");
       assertChildContexts(root, "inner.war");
-      assertUnpacked(root.getRoot().findChild("inner.war"));
+      assertTrue(root.getRoot().getChild("inner.war").isDirectory());
    }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/explicit/test/ModificationTypeUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/explicit/test/ModificationTypeUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/explicit/test/ModificationTypeUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -65,6 +65,6 @@
    {
       VFSDeploymentContext root = assertDeploy("/structure/explicit", "explicit.ear");
       assertChildContexts(root, "inner.war");
-      assertUnpacked(root.getRoot().findChild("inner.war"));
+      assertTrue(root.getRoot().getChild("inner.war").isDirectory());
    }
 }
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/explicit/test/MultipleMetadataStructureUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/explicit/test/MultipleMetadataStructureUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/explicit/test/MultipleMetadataStructureUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -29,7 +29,7 @@
 import org.jboss.deployers.vfs.plugins.structure.explicit.DeclaredStructure;
 import org.jboss.deployers.vfs.plugins.structure.jar.JARStructure;
 import org.jboss.deployers.vfs.plugins.structure.file.FileStructure;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/support/BshFileMatcher.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/support/BshFileMatcher.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/support/BshFileMatcher.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,7 +22,7 @@
 package org.jboss.test.deployers.vfs.structure.file.support;
 
 import org.jboss.deployers.vfs.spi.deployer.FileMatcher;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/support/TmpFileStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/support/TmpFileStructure.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/support/TmpFileStructure.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,7 +22,7 @@
 package org.jboss.test.deployers.vfs.structure.file.support;
 
 import org.jboss.deployers.vfs.plugins.structure.file.FileStructure;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/test/FileMatcherTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/test/FileMatcherTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/file/test/FileMatcherTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -42,9 +42,8 @@
 import org.jboss.test.BaseTestCase;
 import org.jboss.test.deployers.vfs.structure.file.support.BshFileMatcher;
 import org.jboss.test.deployers.vfs.structure.file.support.TmpFileStructure;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.spi.VFSContext;
-import org.jboss.virtual.spi.VirtualFileHandler;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * FileMatcherTestCase.
@@ -65,7 +64,7 @@
 
    protected VirtualFile getVirtualFile() throws Throwable
    {
-      return new MyVirtualFile();
+      return VFS.getChild("somefile.bsh");
    }
 
    public void testMatcher() throws Throwable
@@ -100,162 +99,162 @@
       }
    }
 
-   private static class MyVirtualFile extends VirtualFile
-   {
-      /** The serialVersionUID */
-      private static final long serialVersionUID = 1L;
-
-      public MyVirtualFile()
-      {
-         super(getVirtualFileHandler());
-      }
-
-      private static VirtualFileHandler getVirtualFileHandler()
-      {
-         return new VirtualFileHandler()
-         {
-            /** The serialVersionUID */
-            private static final long serialVersionUID = 1L;
-
-            public String getName()
-            {
-               return null;
-            }
-
-            public String getPathName()
-            {
-               return null;
-            }
-
-            public URL toVfsUrl() throws MalformedURLException, URISyntaxException
-            {
-               return null;
-            }
-
-            public URI toURI() throws URISyntaxException
-            {
-               return null;
-            }
-
-            public URL toURL() throws MalformedURLException, URISyntaxException
-            {
-               return null;
-            }
-
-            public long getLastModified() throws IOException
-            {
-               return 0;
-            }
-
-            public boolean hasBeenModified() throws IOException
-            {
-               return false;
-            }
-
-            public long getSize() throws IOException
-            {
-               return 0;
-            }
-
-            public boolean exists() throws IOException
-            {
-               return false;
-            }
-
-            public boolean isLeaf() throws IOException
-            {
-               return false;
-            }
-
-            public boolean isArchive() throws IOException
-            {
-               return false;
-            }
-
-            public boolean isHidden() throws IOException
-            {
-               return false;
-            }
-
-            public String getLocalPathName()
-            {
-               return null;
-            }
-
-            public boolean isNested() throws IOException
-            {
-               return false;
-            }
-
-            public InputStream openStream() throws IOException
-            {
-               return null;
-            }
-
-            public VirtualFileHandler getParent() throws IOException
-            {
-               return null;
-            }
-
-            public List<VirtualFileHandler> getChildren(boolean ignoreErrors) throws IOException
-            {
-               return null;
-            }
-
-            public VirtualFileHandler getChild(String path) throws IOException
-            {
-               return null;
-            }
-
-            public VFSContext getVFSContext()
-            {
-               return null;
-            }
-
-            public VirtualFile getVirtualFile()
-            {
-               return null;
-            }
-
-            public void close()
-            {
-               
-            }
-
-            public void replaceChild(VirtualFileHandler original, VirtualFileHandler replacement)
-            {
-               
-            }
-
-            public boolean removeChild(String name) throws IOException
-            {
-               return false;
-            }
-
-            public boolean delete(int gracePeriod) throws IOException
-            {
-               return false;
-            }
-
-            public URL getRealURL() throws IOException, URISyntaxException
-            {
-               return null;
-            }
-
-            public void cleanup()
-            {
-            }
-
-            public Certificate[] getCertificates()
-            {
-               return null;
-            }
-         };
-      }
-
-      public String getName()
-      {
-         return "somefile.bsh";
-      }
-   }
+//   private static class MyVirtualFile extends VirtualFile
+//   {
+//      /** The serialVersionUID */
+//      private static final long serialVersionUID = 1L;
+//
+//      public MyVirtualFile()
+//      {
+//         super(getVirtualFileHandler());
+//      }
+//
+//      private static VirtualFileHandler getVirtualFileHandler()
+//      {
+//         return new VirtualFileHandler()
+//         {
+//            /** The serialVersionUID */
+//            private static final long serialVersionUID = 1L;
+//
+//            public String getName()
+//            {
+//               return null;
+//            }
+//
+//            public String getPathName()
+//            {
+//               return null;
+//            }
+//
+//            public URL toVfsUrl() throws MalformedURLException, URISyntaxException
+//            {
+//               return null;
+//            }
+//
+//            public URI toURI() throws URISyntaxException
+//            {
+//               return null;
+//            }
+//
+//            public URL toURL() throws MalformedURLException, URISyntaxException
+//            {
+//               return null;
+//            }
+//
+//            public long getLastModified() throws IOException
+//            {
+//               return 0;
+//            }
+//
+//            public boolean hasBeenModified() throws IOException
+//            {
+//               return false;
+//            }
+//
+//            public long getSize() throws IOException
+//            {
+//               return 0;
+//            }
+//
+//            public boolean exists() throws IOException
+//            {
+//               return false;
+//            }
+//
+//            public boolean isLeaf() throws IOException
+//            {
+//               return false;
+//            }
+//
+//            public boolean isArchive() throws IOException
+//            {
+//               return false;
+//            }
+//
+//            public boolean isHidden() throws IOException
+//            {
+//               return false;
+//            }
+//
+//            public String getLocalPathName()
+//            {
+//               return null;
+//            }
+//
+//            public boolean isNested() throws IOException
+//            {
+//               return false;
+//            }
+//
+//            public InputStream openStream() throws IOException
+//            {
+//               return null;
+//            }
+//
+//            public VirtualFileHandler getParent() throws IOException
+//            {
+//               return null;
+//            }
+//
+//            public List<VirtualFileHandler> getChildren(boolean ignoreErrors) throws IOException
+//            {
+//               return null;
+//            }
+//
+//            public VirtualFileHandler getChild(String path) throws IOException
+//            {
+//               return null;
+//            }
+//
+//            public VFSContext getVFSContext()
+//            {
+//               return null;
+//            }
+//
+//            public VirtualFile getVirtualFile()
+//            {
+//               return null;
+//            }
+//
+//            public void close()
+//            {
+//               
+//            }
+//
+//            public void replaceChild(VirtualFileHandler original, VirtualFileHandler replacement)
+//            {
+//               
+//            }
+//
+//            public boolean removeChild(String name) throws IOException
+//            {
+//               return false;
+//            }
+//
+//            public boolean delete(int gracePeriod) throws IOException
+//            {
+//               return false;
+//            }
+//
+//            public URL getRealURL() throws IOException, URISyntaxException
+//            {
+//               return null;
+//            }
+//
+//            public void cleanup()
+//            {
+//            }
+//
+//            public Certificate[] getCertificates()
+//            {
+//               return null;
+//            }
+//         };
+//      }
+//
+//      public String getName()
+//      {
+//         return "somefile.bsh";
+//      }
+//   }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/jar/test/ConfiguredSuffixJARStructureUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/jar/test/ConfiguredSuffixJARStructureUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/jar/test/ConfiguredSuffixJARStructureUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -28,7 +28,6 @@
 import junit.framework.TestSuite;
 import org.jboss.deployers.vfs.plugins.structure.jar.JARStructure;
 import org.jboss.test.BaseTestCase;
-import org.jboss.virtual.plugins.context.jar.JarUtils;
 
 /**
  * ConfiguredSuffixJARStructureUnitTestCase.
@@ -40,8 +39,8 @@
 public class ConfiguredSuffixJARStructureUnitTestCase extends BaseTestCase
 {
    /** The file structure deployer */
-   private static final Set<String> defaultSuffixes = JarUtils.getSuffixes();
-
+   private static final Set<String> defaultSuffixes = JARStructure.DEFAULT_JAR_SUFFIXES;
+   
    public static Test suite()
    {
       return new TestSuite(ConfiguredSuffixJARStructureUnitTestCase.class);
@@ -73,24 +72,17 @@
    
    public void testOverwriteDefaults() throws Exception
    {
-      try
-      {
-         Set<String> newSuffixes = new HashSet<String>();
-         newSuffixes.add(".bar");
-         newSuffixes.add(".tar");
-         newSuffixes.add(".far");
-         
-         JARStructure structure = new JARStructure(newSuffixes);
-         Set<String> suffixes = structure.getSuffixes();
-         assertNotNull(suffixes);
-         assertEquals(3, suffixes.size());
-         assertTrue(suffixes.contains(".bar"));
-         assertTrue(suffixes.contains(".tar"));
-         assertTrue(suffixes.contains(".far"));
-      }
-      finally
-      {
-         JarUtils.setJarSuffixes(defaultSuffixes);
-      }
+      Set<String> newSuffixes = new HashSet<String>();
+      newSuffixes.add(".bar");
+      newSuffixes.add(".tar");
+      newSuffixes.add(".far");
+      
+      JARStructure structure = new JARStructure(newSuffixes);
+      Set<String> suffixes = structure.getSuffixes();
+      assertNotNull(suffixes);
+      assertEquals(3, suffixes.size());
+      assertTrue(suffixes.contains(".bar"));
+      assertTrue(suffixes.contains(".tar"));
+      assertTrue(suffixes.contains(".far"));
    }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/jar/test/JARStructureUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/jar/test/JARStructureUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/jar/test/JARStructureUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -48,6 +48,6 @@
 
    protected VFSDeploymentContext determineStructure(VFSDeployment deployment) throws Exception
    {
-      return determineStructureWithStructureDeployer(deployment, new JARStructure());
+      return determineStructureWithStructureDeployers(deployment, false, new JARStructure());
    }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/EsbModificationTypeMatcher.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/EsbModificationTypeMatcher.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/EsbModificationTypeMatcher.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -29,7 +29,7 @@
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
 import org.jboss.deployers.vfs.spi.structure.StructureDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSStructuralDeployers;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Esb use case.
@@ -48,7 +48,7 @@
          if (root.getName().endsWith(".esb"))
          {
             VirtualFile wars = root.getChild("wars");
-            if (wars != null)
+            if (wars.exists())
             {
                List<VirtualFile> children = wars.getChildren();
                for (VirtualFile war : children)

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/XmlIncludeVirtualFileFilter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/XmlIncludeVirtualFileFilter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/XmlIncludeVirtualFileFilter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,8 +21,8 @@
  */
 package org.jboss.test.deployers.vfs.structure.modified.support;
 
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Include only .xml files.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractStructureCacheTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractStructureCacheTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractStructureCacheTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -25,8 +25,8 @@
 
 import org.jboss.deployers.vfs.spi.structure.modified.StructureCache;
 import org.jboss.test.deployers.BootstrapDeployersTest;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * AbstractStructureCache tests.

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.deployers.vfs.structure.modified.test;
-
-import org.jboss.deployers.structure.spi.main.MainDeployerInternals;
-import org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker;
-import org.jboss.deployers.vfs.spi.structure.modified.StructureModificationChecker;
-import org.jboss.deployers.vfs.spi.structure.modified.SynchAdapter;
-import org.jboss.deployers.vfs.spi.structure.modified.SynchWrapperModificationChecker;
-import org.jboss.test.deployers.BootstrapDeployersTest;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-
-/**
- * AbstractSynchTest.
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public abstract class AbstractSynchTest extends BootstrapDeployersTest
-{
-   protected AbstractSynchTest(String name)
-   {
-      super(name);
-   }
-
-   protected StructureModificationChecker createStructureModificationChecker()
-   {
-      MainDeployerInternals mainDeployerInternals = getMainDeployerInternals();
-      VirtualFileFilter filter = createFilter();
-      VirtualFileFilter recurseFilter = createRecurseFilter();
-      SynchAdapter synchAdapter = createSynchAdapter();
-
-      MetaDataStructureModificationChecker mdsmc = new MetaDataStructureModificationChecker(mainDeployerInternals);
-      mdsmc.setFilter(filter);
-
-      SynchWrapperModificationChecker synch = new SynchWrapperModificationChecker(mdsmc, synchAdapter);
-
-      VisitorAttributes attributes = new VisitorAttributes();
-      attributes.setLeavesOnly(true);
-      attributes.setRecurseFilter(recurseFilter);
-
-      synch.setOriginalAttributes(attributes);
-      synch.setTempAttributes(attributes);
-
-      return synch;
-   }
-
-   protected abstract VirtualFileFilter createFilter();
-
-   protected abstract VirtualFileFilter createRecurseFilter();
-
-   protected abstract SynchAdapter createSynchAdapter();
-}
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/DirRemovalModificationTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/DirRemovalModificationTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/DirRemovalModificationTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -30,9 +30,9 @@
 import org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker;
 import org.jboss.deployers.vfs.spi.structure.modified.StructureCache;
 import org.jboss.deployers.vfs.spi.structure.modified.StructureModificationChecker;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * Test JBDEPLOY-207, Rob's dir removal.
@@ -94,7 +94,7 @@
       File tmpParent = tmpFile.getParentFile();
       tmpDir = new File(tmpParent, "tmp-dir");
       assertTrue(tmpDir.mkdir());
-      return VFS.createNewRoot(tmpDir.toURI());
+      return VFS.getChild(tmpDir.toURI());
    }
 
    protected void testStructureModified(VirtualFile root, StructureModificationChecker checker, VFSDeploymentUnit deploymentUnit) throws Exception
@@ -107,7 +107,7 @@
       assertTrue(tmpDir.delete());
       tmpDir = new File(parentDir, "tmp-dir");
       assertTrue(tmpDir.mkdir());
-      root = VFS.createNewRoot(tmpDir.toURI());
+      root = VFS.getChild(tmpDir.toURI());
 
       assertTrue("We created new directory, expecting modified root.", checker.hasStructureBeenModified(root));
    }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -30,11 +30,11 @@
 import org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker;
 import org.jboss.deployers.vfs.spi.structure.modified.StructureCache;
 import org.jboss.deployers.vfs.spi.structure.modified.StructureModificationChecker;
+import org.jboss.test.deployers.support.AssembledDirectory;
 import org.jboss.test.deployers.vfs.structure.modified.support.XmlIncludeVirtualFileFilter;
-import org.jboss.virtual.AssembledDirectory;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * Test StructureModificationChecker.
@@ -79,8 +79,8 @@
       // already cached run 
       assertFalse(checker.hasStructureBeenModified(root));
 
-      AssembledDirectory jar = (AssembledDirectory)ear.getChild("simple.jar");
-      AssembledDirectory jarMD = (AssembledDirectory)jar.getChild("META-INF");
+      VirtualFile jar = ear.getChild("simple.jar");
+      VirtualFile jarMD = jar.getChild("META-INF");
 
       // 'update' web-beans.xml
       URL url = getResource("/webbeans/simple/jar/META-INF/web-beans.xml");
@@ -91,38 +91,46 @@
       // should be the same
       assertFalse(checker.hasStructureBeenModified(root));
 
+      AssembledDirectory jarMDAssembly = createAssembledDirectory(jarMD);
+      
       // add new xml
       url = getResource("/scanning/smoke/META-INF/jboss-scanning.xml");
       assertNotNull(url);
-      jarMD.addChild(VFS.createNewRoot(url));
+      jarMDAssembly.add(VFS.getChild(url));
       assertTrue(checker.hasStructureBeenModified(root));
       // should be the same
       assertFalse(checker.hasStructureBeenModified(root));
 
       // 'remove' new xml
-      jarMD = jar.mkdir("META-INF");
+      
+      closeAssembly(jarMD);
+      jarMDAssembly = createAssembledDirectory(jarMD);
       url = getResource("/dependency/module/META-INF/jboss-dependency.xml");
       assertNotNull(url);
-      jarMD.addChild(VFS.createNewRoot(url));
+      jarMDAssembly.add(VFS.getChild(url));
       url = getResource("/webbeans/simple/ejb/META-INF/web-beans.xml");
       assertNotNull(url);
-      jarMD.addChild(VFS.createNewRoot(url));
+      jarMDAssembly.add(VFS.getChild(url));
       assertTrue(checker.hasStructureBeenModified(root));
       // should be the same
       assertFalse(checker.hasStructureBeenModified(root));
 
       // 'remove' whole metadata dir
-      jar.mkdir("META-INF");
+      closeAssembly(jarMD);
+      jarMDAssembly = createAssembledDirectory(jarMD);
       assertTrue(checker.hasStructureBeenModified(root));
    }
 
    public void testInitialEmptyDir() throws Exception
    {
-      AssembledDirectory top = createAssembledDirectory("top.jar", "top.jar");
-      AssembledDirectory metainf = top.mkdir("META-INF");
+      VirtualFile topJar = VFS.getChild(getName()).getChild("top.jar");
+      createAssembledDirectory(topJar);
+      VirtualFile metaInf = topJar.getChild("META-INF");
+      AssembledDirectory metaInfAssembly = createAssembledDirectory(metaInf);
+      
       StructureModificationChecker checker = createStructureModificationChecker();
 
-      VFSDeploymentUnit vdu = assertDeploy(top);
+      VFSDeploymentUnit vdu = assertDeploy(topJar);
       try
       {
          VirtualFile root = vdu.getRoot();
@@ -130,7 +138,7 @@
 
          URL url = getResource("/scanning/smoke/META-INF/jboss-scanning.xml");
          assertNotNull(url);
-         metainf.addChild(VFS.createNewRoot(url));
+         metaInfAssembly.add(VFS.getChild(url));
          assertTrue(checker.hasStructureBeenModified(root));
       }
       finally
@@ -141,11 +149,13 @@
 
    public void testMultipleChanges() throws Exception
    {
-      AssembledDirectory top = createAssembledDirectory("top.jar", "top.jar");
-      AssembledDirectory metainf = top.mkdir("META-INF");
+      VirtualFile topJar = VFS.getChild(getName()).getChild("top.jar");
+      createAssembledDirectory(topJar);
+      VirtualFile metaInf = topJar.getChild("META-INF");
+      AssembledDirectory metaInfAssembly = createAssembledDirectory(metaInf);
       StructureModificationChecker checker = createStructureModificationChecker();
 
-      VFSDeploymentUnit vdu = assertDeploy(top);
+      VFSDeploymentUnit vdu = assertDeploy(topJar);
       try
       {
          VirtualFile root = vdu.getRoot();
@@ -153,10 +163,10 @@
 
          URL url1 = getResource("/scanning/smoke/META-INF/jboss-scanning.xml");
          assertNotNull(url1);
-         metainf.addChild(VFS.createNewRoot(url1));
+         metaInfAssembly.add(VFS.getChild(url1));
          URL url2 = getResource("/dependency/module/META-INF/jboss-dependency.xml");
          assertNotNull(url2);
-         metainf.addChild(VFS.createNewRoot(url2));
+         metaInfAssembly.add(VFS.getChild(url2));
 
          assertTrue(checker.hasStructureBeenModified(root));
          assertFalse(checker.hasStructureBeenModified(root));

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -25,8 +25,8 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.deployers.vfs.spi.structure.modified.StructureModificationChecker;
 import org.jboss.test.deployers.vfs.webbeans.test.AbstractWebBeansTest;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * Test StructureModificationChecker.

Deleted: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,216 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.deployers.vfs.structure.modified.test;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.net.URI;
-import java.net.URL;
-
-import junit.framework.Test;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.deployers.vfs.spi.structure.modified.OverrideSynchAdapter;
-import org.jboss.deployers.vfs.spi.structure.modified.StructureModificationChecker;
-import org.jboss.deployers.vfs.spi.structure.modified.SynchAdapter;
-import org.jboss.test.deployers.vfs.structure.modified.support.XmlIncludeVirtualFileFilter;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-
-/**
- * Test file synch.
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public class SynchModificationTestCase extends AbstractSynchTest
-{
-   public SynchModificationTestCase(String name)
-   {
-      super(name);
-   }
-
-   public static Test suite()
-   {
-      return suite(SynchModificationTestCase.class);
-   }
-
-   protected VirtualFileFilter createFilter()
-   {
-      return new XmlIncludeVirtualFileFilter();
-   }
-
-   protected VirtualFileFilter createRecurseFilter()
-   {
-      return new VirtualFileFilter()
-      {
-         public boolean accepts(VirtualFile file)
-         {
-            try
-            {
-               URL url = file.toURL();
-               String path = url.toExternalForm();
-               // only wars, but not its classes
-               return (path.contains(".war") && path.contains("/WEB-INF/classes") == false);
-            }
-            catch (Exception e)
-            {
-               throw new RuntimeException(e);
-            }
-         }
-      };
-   }
-
-   protected SynchAdapter createSynchAdapter()
-   {
-      return new OverrideSynchAdapter();
-   }
-
-   public void testWAR() throws Exception
-   {
-      VirtualFile originalRoot = createDeploymentRoot("/synch/war", "simple.war");
-      VFSDeploymentUnit deploymentUnit = assertDeploy(originalRoot);
-      try
-      {
-         VirtualFile tempRoot = deploymentUnit.getRoot();
-         StructureModificationChecker checker = createStructureModificationChecker();
-         assertFalse(checker.hasStructureBeenModified(originalRoot));
-
-         // add new file
-         URI rootURI = VFSUtils.getRealURL(originalRoot).toURI();
-         File rootFile = new File(rootURI);
-         File newFile = newFile(rootFile, "newfile.txt");
-         try
-         {
-            assertNull(tempRoot.getChild("newfile.txt"));                        
-            assertFalse(checker.hasStructureBeenModified(originalRoot));
-            assertNotNull(tempRoot.getChild("newfile.txt"));
-
-            // try deleting this one now
-            assertTrue(newFile.delete());
-            assertFalse(checker.hasStructureBeenModified(originalRoot));
-            assertNull(tempRoot.getChild("newfile.txt"));
-         }
-         finally
-         {
-            if (newFile.exists())
-               assertTrue(newFile.delete());
-         }
-
-         // update some file
-         File updateFile = new File(rootFile, "test.jsp");
-         assertTrue(updateFile.exists());
-         assertTrue(updateFile.setLastModified(System.currentTimeMillis() + 1500l));
-         @SuppressWarnings("deprecation")
-         VirtualFile testJsp = tempRoot.findChild("test.jsp");
-         long tempTimestamp = testJsp.getLastModified();
-         // Platform dependent precision for last modified, let's wait a minimum of 1 sec
-         Thread.sleep(1500l);
-         assertFalse(checker.hasStructureBeenModified(originalRoot));
-         long lastModified = testJsp.getLastModified();
-         long diff = lastModified - tempTimestamp;
-         assertTrue("Last modified diff is not bigger then 0, diff: " + diff, diff > 0);
-
-         // update something outside recurse filter
-         VirtualFile someProps = originalRoot.getChild("WEB-INF/classes/some.properties");
-         assertNotNull(someProps);
-         updateFile = new File(VFSUtils.getRealURL(someProps).toURI());
-         assertTrue(updateFile.exists());
-         assertTrue(updateFile.setLastModified(System.currentTimeMillis() + 1500l));
-         @SuppressWarnings("deprecation")
-         VirtualFile tempProps = tempRoot.findChild("WEB-INF/classes/some.properties");
-         tempTimestamp = tempProps.getLastModified();
-         // Platform dependent precision for last modified, let's wait a minimum of 1 sec
-         Thread.sleep(1500l);
-         assertFalse(checker.hasStructureBeenModified(originalRoot));
-         assertEquals(tempTimestamp, tempProps.getLastModified());
-
-         // add new file into WEB-INF
-         VirtualFile webInfo = originalRoot.getChild("WEB-INF");
-         File webInfFile = new File(VFSUtils.getCompatibleURI(webInfo));
-         File newWebInfFile = newFile(webInfFile, "newfile.txt");
-         try
-         {
-            assertNull(tempRoot.getChild("WEB-INF/newfile.txt"));
-            assertFalse(checker.hasStructureBeenModified(originalRoot));
-            assertNotNull(tempRoot.getChild("WEB-INF/newfile.txt"));
-            assertFalse(checker.hasStructureBeenModified(originalRoot));
-
-            // try deleting this one now
-            assertTrue(newWebInfFile.delete());
-            assertFalse(checker.hasStructureBeenModified(originalRoot));
-            assertNull(tempRoot.getChild("WEB-INF/newfile.txt"));
-         }
-         finally
-         {
-            if (newWebInfFile.exists())
-               assertTrue(newWebInfFile.delete());
-         }
-
-         // check we don't update for nothing
-         @SuppressWarnings("deprecation")
-         VirtualFile xhtml = tempRoot.findChild("test.xhtml");
-         long xhtmlTimestamp = xhtml.getLastModified();
-         // Platform dependent precision for last modified, let's wait a minimum of 1 sec
-         Thread.sleep(1500l);
-         assertFalse(checker.hasStructureBeenModified(originalRoot));
-         assertEquals(xhtmlTimestamp, xhtml.getLastModified());
-      }
-      finally
-      {
-         undeploy(deploymentUnit);
-      }
-   }
-
-   public void testEAR() throws Exception
-   {
-      VFSDeploymentUnit deploymentUnit = assertDeploy("/synch/ear", "simple.ear");
-      try
-      {
-         VirtualFile root = deploymentUnit.getRoot();
-         StructureModificationChecker checker = createStructureModificationChecker();
-         assertFalse(checker.hasStructureBeenModified(root));
-      }
-      finally
-      {
-         undeploy(deploymentUnit);
-      }
-   }
-
-   protected File newFile(File parent, String name) throws IOException
-   {
-      File newFile = new File(parent, name);
-      FileOutputStream fos = new FileOutputStream(newFile);
-      BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(fos));
-      try
-      {
-         writer.write("sometext");
-         return newFile;
-      }
-      finally
-      {
-         writer.close();
-      }
-   }
-}
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/support/MockWarStructureDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/support/MockWarStructureDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/support/MockWarStructureDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -29,10 +29,11 @@
 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.automount.Automounter;
+import org.jboss.vfs.util.SuffixMatchFilter;
 
 /**
  * MockWarStructure.
@@ -116,24 +117,16 @@
             // We require either a WEB-INF or the name ends in .war
             if (file.getName().endsWith(".war") == false)
             {
-               try
+               VirtualFile child = file.getChild("WEB-INF");
+               if (child.exists())
                {
-                  VirtualFile child = file.getChild("WEB-INF");
-                  if (child != 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;
                }
             }
@@ -147,26 +140,17 @@
 
             // 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
-               if (classes != null)
-                  metaDataLocations.add("WEB-INF/classes/META-INF");
-            }
-            catch(IOException e)
-            {
-               log.warn("Exception while looking for classes, " + file.getPathName() + ", " + e);
-            }
-
+            // The classpath contains WEB-INF/classes
+            classes = file.getChild("WEB-INF/classes");
+            // Check for a META-INF for metadata
+            if (classes.exists())
+               metaDataLocations.add("WEB-INF/classes/META-INF");
             // 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
@@ -190,7 +174,7 @@
             addClassPath(structureContext, file, false, true, context);
 
             // Add WEB-INF/classes if present
-            if (classes != null)
+            if (classes.exists())
                addClassPath(structureContext, classes, true, false, context);
             else if (trace)
                log.trace("No WEB-INF/classes for: " + file.getPathName());
@@ -199,7 +183,10 @@
             if (archives != null)
             {
                for (VirtualFile jar : archives)
+               {
+                  Automounter.mount(file, jar);
                   addClassPath(structureContext, jar, true, true, context);
+               }
             }
             else if (trace)
             {

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/test/AbstractWARStructureTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/test/AbstractWARStructureTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/test/AbstractWARStructureTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -25,7 +25,7 @@
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.test.deployers.vfs.structure.AbstractStructureTest;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * AbstractWARStructureTest.
@@ -74,11 +74,11 @@
       assertNotNull("classpath", classpath);
       assertEquals("classpath.size = 3", 3, classpath.size());
       VirtualFile warFile = war.getRoot();
-      VirtualFile classes = warFile.findChild("WEB-INF/classes");
+      VirtualFile classes = warFile.getChild("WEB-INF/classes");
       assertTrue("WEB-INF/classes in classpath", classpath.contains(classes));
-      VirtualFile j0 = warFile.findChild("WEB-INF/lib/j0.jar");
+      VirtualFile j0 = warFile.getChild("WEB-INF/lib/j0.jar");
       assertTrue("WEB-INF/lib/j0.jar in classpath", classpath.contains(j0));
-      VirtualFile j1 = warFile.findChild("WEB-INF/lib/j1.jar");
+      VirtualFile j1 = warFile.getChild("WEB-INF/lib/j1.jar");
       assertTrue("WEB-INF/lib/j1.jar in classpath", classpath.contains(j1));
    }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/test/WARUnpackUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/test/WARUnpackUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/war/test/WARUnpackUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -23,12 +23,13 @@
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
+
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.test.deployers.vfs.structure.AbstractStructureTest;
 import org.jboss.test.deployers.vfs.structure.support.WarUnpackStructure;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.util.automount.Automounter;
 
 /**
  * WARUnpackUnitTestCase.
@@ -56,6 +57,13 @@
    {
       VFSDeploymentContext root = assertDeploy("/structure/war/simple", "simple.war");
       VirtualFile file = root.getRoot();
-      assertSame(file, VFSUtils.unpack(file));
+      try {
+         Automounter.mount(file);
+         assertSame(root.getRoot(), file);
+      }
+      finally 
+      {
+         Automounter.cleanup(file);
+      }
    }
 }
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/support/ChildFileStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/support/ChildFileStructure.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/support/ChildFileStructure.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,7 +22,7 @@
 package org.jboss.test.deployers.vfs.structurebuilder.support;
 
 import org.jboss.deployers.vfs.plugins.structure.file.FileStructure;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/test/VFSStructureBuilderUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/test/VFSStructureBuilderUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structurebuilder/test/VFSStructureBuilderUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,7 +21,7 @@
 */
 package org.jboss.test.deployers.vfs.structurebuilder.test;
 
-import java.io.IOException;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.List;
 
@@ -37,9 +37,10 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
+import org.jboss.deployers.vfs.spi.structure.helpers.AbstractStructureDeployer;
 import org.jboss.test.deployers.structure.structurebuilder.StructureBuilderTest;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * VFSStructureBuilderUnitTestCase.
@@ -69,10 +70,10 @@
       URL url = getDeploymentURL();
       try
       {
-         VirtualFile file = VFS.getRoot(url);
+         VirtualFile file = VFS.getChild(url);
          return new AbstractVFSDeployment(file);
       }
-      catch (IOException e)
+      catch (URISyntaxException e)
       {
          throw new RuntimeException("Failed to get virtual file " + url + " for " + getName());
       }
@@ -116,7 +117,7 @@
       else
       {
          VirtualFile root = context.getRoot();
-         VirtualFile expected = root.findChild(metaDataPaths.get(0).getPath());
+         VirtualFile expected = root.getChild(metaDataPaths.get(0).getPath());
          assertEquals(1, metaDataLocations.size());
          assertEquals(expected, metaDataLocations.get(0));
       }
@@ -139,12 +140,13 @@
             ClassPathEntry entry = classPathEntries.get(i);
             VirtualFile file = (i < cpSize) ? classPath.get(i) : null;
             String path = entry.getPath();
+            String relativeFilePath = AbstractStructureDeployer.getRelativePath(context.getTopLevel().getRoot(), file);
             if ("".equals(path))
-               assertTrue(file == null || "".equals(file.getPathName()));
+               assertTrue("".equals(relativeFilePath));
             else
             {
                assertNotNull(file);
-               assertEquals(path, file.getPathName());
+               assertEquals(path, relativeFilePath);
             }
          }
       }

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structureprocessor/test/VFSStructureProcessorUnitTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structureprocessor/test/VFSStructureProcessorUnitTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structureprocessor/test/VFSStructureProcessorUnitTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -37,8 +37,8 @@
 import org.jboss.deployers.vfs.plugins.structure.modify.ModificationTypeStructureProcessor;
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.util.automount.Automounter;
 
 /**
  * VFSStructureProcessorUnitTestCase.
@@ -109,7 +109,7 @@
       {
          VFSDeploymentContext vdc = getTopDeploymentContext(main, path);
          VirtualFile root = vdc.getRoot();
-         assertTrue("Should be temp", VFSUtils.isTemporaryFile(root));
+         assertTrue("Should be temp", root.isDirectory());
       }
       finally
       {
@@ -141,11 +141,11 @@
          VirtualFile file = root.getChild("tempchild.jar");
          try
          {
-            assertTrue("Should be temp", VFSUtils.isTemporaryFile(file));
+            assertTrue("Should be temp", file.isDirectory());
          }
          finally
          {
-            file.cleanup();
+            Automounter.cleanup(root);
          }
       }
       finally

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/JBossWebBeansMetaData.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/JBossWebBeansMetaData.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/JBossWebBeansMetaData.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -24,7 +24,7 @@
 import java.io.Serializable;
 import java.net.URL;
 
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * JBoss WebBeans custom meta data

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/JBossWebBeansMetaDataDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/JBossWebBeansMetaDataDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/JBossWebBeansMetaDataDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -23,7 +23,7 @@
 
 import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * JBoss WBD deployer.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscoveryDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscoveryDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/support/WebBeanDiscoveryDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -34,7 +34,7 @@
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.vfs.spi.deployer.AbstractOptionalVFSRealDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * WBD deployer.
@@ -72,7 +72,7 @@
          for (VirtualFile cp : classpaths)
          {
             VirtualFile wbXml = cp.getChild("META-INF/web-beans.xml");
-            if (wbXml != null)
+            if (wbXml.exists())
             {
                // add url
                wbdi.addWebBeansXmlURL(wbXml.toURL());

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/AbstractWebBeansTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/AbstractWebBeansTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/AbstractWebBeansTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -31,7 +31,8 @@
 import org.jboss.test.deployers.vfs.webbeans.support.util.SomeUtil;
 import org.jboss.test.deployers.vfs.webbeans.support.web.ServletWebBean;
 import org.jboss.test.deployers.vfs.webbeans.support.crm.CrmWebBean;
-import org.jboss.virtual.AssembledDirectory;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * AbstractWebBeansTest.
@@ -66,62 +67,48 @@
       super.tearDown();
    }
 
-   protected AssembledDirectory createBasicEar() throws Exception
+   protected VirtualFile createBasicEar() throws Exception
    {
-      AssembledDirectory ear = createTopLevelWithUtil();
+      VirtualFile ear = createTopLevelWithUtil();
 
-      AssembledDirectory jar = ear.mkdir("simple.jar");
-      addPackage(jar, PlainJavaBean.class);
-      addPath(jar, "/webbeans/simple/jar", "META-INF");
+      VirtualFile jar = ear.getChild("simple.jar");
+      createAssembledDirectory(jar)
+         .addPackage(PlainJavaBean.class)
+         .addPath("/webbeans/simple/jar");
 
-      AssembledDirectory ejbs = ear.mkdir("ejbs.jar");
-      addPackage(ejbs, MySLSBean.class);
-      addPath(ejbs, "/webbeans/simple/ejb", "META-INF");
+      VirtualFile ejbs = ear.getChild("ejbs.jar");
+      createAssembledDirectory(ejbs)
+         .addPackage(MySLSBean.class)
+         .addPath("/webbeans/simple/ejb");
 
-      AssembledDirectory war = ear.mkdir("simple.war");
-      AssembledDirectory webinf = war.mkdir("WEB-INF");
-      AssembledDirectory classes = webinf.mkdir("classes");
-      addPackage(classes, ServletWebBean.class);
-      addPath(war, "/webbeans/simple/web", "WEB-INF");
+      
+      VirtualFile war = ear.getChild("simple.war");
+      createAssembledDirectory(war)
+         .addPackage("WEB-INF/classes", ServletWebBean.class)
+         .addPath("/webbeans/simple/web")
+         .addPackage("WEB-INF/lib/ui.jar", UIWebBean.class)
+         .addPath("WEB-INF/lib/ui.jar", "/webbeans/simple/ui");
 
-      AssembledDirectory lib = webinf.mkdir("lib");
-
-      AssembledDirectory uijar = lib.mkdir("ui.jar");
-      addPackage(uijar, UIWebBean.class);
-      addPath(uijar, "/webbeans/simple/ui", "META-INF");
-
       // war w/o web-beans.xml
+      war = ear.getChild("crm.war");
+      createAssembledDirectory(war)
+         .addPackage("WEB-INF/classes", NotWBJsfBean.class)
+         .addPackage("WEB-INF/lib/crm.jar", CrmWebBean.class)
+         .addPath("WEB-INF/lib/crm.jar", "/webbeans/simple/crm");
 
-      war = ear.mkdir("crm.war");
-      webinf = war.mkdir("WEB-INF");
-      classes = webinf.mkdir("classes");
-      addPackage(classes, NotWBJsfBean.class);
-
-      lib = webinf.mkdir("lib");
-
-      uijar = lib.mkdir("crm.jar");
-      addPackage(uijar, CrmWebBean.class);
-      addPath(uijar, "/webbeans/simple/crm", "META-INF");
-
       enableTrace("org.jboss.deployers");
 
       return ear;
    }
 
-   protected AssembledDirectory createTopLevelWithUtil() throws Exception
+   protected VirtualFile createTopLevelWithUtil() throws Exception
    {
-      AssembledDirectory topLevel = createAssembledDirectory("top-level.ear", "top-level.ear");
-      addPath(topLevel, "/webbeans/simple", "META-INF");
-
-      AssembledDirectory earLib = topLevel.mkdir("lib");
-
-      AssembledDirectory util = earLib.mkdir("util.jar");
-      addPackage(util, SomeUtil.class);
-
-      AssembledDirectory ext = earLib.mkdir("ext.jar");
-      addPackage(ext, ExternalWebBean.class);
-      addPath(ext, "/webbeans/simple/ext", "META-INF");
-
-      return topLevel;
+      VirtualFile earFile = VFS.getChild(getName()).getChild("top-level.ear");
+      createAssembledDirectory(earFile)
+         .addPath("/webbeans/simple")
+         .addPackage("lib/util.jar", SomeUtil.class)
+         .addPackage("lib/ext.jar", ExternalWebBean.class)
+         .addPath("lib/ext.jar", "/webbeans/simple/ext");
+      return earFile;
    }
 }
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/webbeans/test/WebBeanDiscoveryTestCase.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -36,7 +36,7 @@
 import org.jboss.test.deployers.vfs.webbeans.support.jar.PlainJavaBean;
 import org.jboss.test.deployers.vfs.webbeans.support.ui.UIWebBean;
 import org.jboss.test.deployers.vfs.webbeans.support.web.ServletWebBean;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * WebBeanDiscoveryTestCase.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/xb/test/AbstractSchemaResolverXBTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/xb/test/AbstractSchemaResolverXBTest.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/xb/test/AbstractSchemaResolverXBTest.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -29,8 +29,8 @@
 import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.test.deployers.vfs.xb.XBDeployersTest;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Abstract schema resolver JBossXB test.
@@ -61,7 +61,7 @@
       String common = "/org/jboss/test/deployers/vfs/xb/test/deployment";
       URL url = getClass().getResource(common);
       assertNotNull(url);
-      VirtualFile file = VFS.getRoot(url);
+      VirtualFile file = VFS.getChild(url);
       assertNotNull(file);
 
       VFSDeploymentContext context = new AbstractVFSDeploymentContext(file, "");

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/bootstrap/bootstrap.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/bootstrap/bootstrap.xml	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/bootstrap/bootstrap.xml	2010-02-16 19:28:23 UTC (rev 101038)
@@ -52,7 +52,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: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/client/VFSDeployment.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/client/VFSDeployment.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/client/VFSDeployment.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,7 +22,7 @@
 package org.jboss.deployers.vfs.spi.client;
 
 import org.jboss.deployers.client.spi.Deployment;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * VFSDeployment.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/client/VFSDeploymentFactory.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/client/VFSDeploymentFactory.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/client/VFSDeploymentFactory.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,7 +22,7 @@
 package org.jboss.deployers.vfs.spi.client;
 
 import org.jboss.deployers.client.spi.DeploymentFactory;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * VFSDeploymentFactory.
@@ -54,13 +54,36 @@
    {
       return VFSDeploymentBuilder.getInstance().newVFSDeployment(root);
    }
+   
+   /**
+    * Create a new VFS deployment with a specific name 
+    * 
+    * @param name deployment name
+    * @param root the root virtual file
+    * @return the deployment
+    * @throws IllegalArgumentException for a null root
+    */
+   public VFSDeployment createVFSDeployment(String name, VirtualFile root)
+   {
+      return VFSDeploymentBuilder.getInstance().newVFSDeployment(name, root);
+   }
 
    /**
+    * Create a new VFS deployment with a specific name
+    * 
+    * @param root the root virtual file
+    * @return the deployment
+    * @throws IllegalArgumentException for a null root
+    */
+   protected abstract VFSDeployment newVFSDeployment(VirtualFile root);
+   
+   /**
     * Create a new VFS deployment 
     * 
+    * @param name deployment name
     * @param root the root virtual file
     * @return the deployment
     * @throws IllegalArgumentException for a null root
     */
-   protected abstract VFSDeployment newVFSDeployment(VirtualFile root);
+   protected abstract VFSDeployment newVFSDeployment(String name, VirtualFile root);
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/AbstractVFSParsingDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/AbstractVFSParsingDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/AbstractVFSParsingDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -35,7 +35,7 @@
 import org.jboss.deployers.spi.structure.MetaDataTypeFilter;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * AbstractVFSParsingDeployer.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/FileMatcher.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/FileMatcher.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/FileMatcher.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,7 +21,7 @@
 */
 package org.jboss.deployers.vfs.spi.deployer;
 
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Matches virtual file to check if it can be deployed.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/JAXBDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/JAXBDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/JAXBDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -29,8 +29,8 @@
 import javax.xml.validation.Schema;
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VFSInputSource;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFSInputSource;
+import org.jboss.vfs.VirtualFile;
 import org.xml.sax.InputSource;
 
 /**

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/JAXPDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/JAXPDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/JAXPDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -27,8 +27,8 @@
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.virtual.VFSInputSource;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFSInputSource;
+import org.jboss.vfs.VirtualFile;
 import org.w3c.dom.Document;
 import org.xml.sax.InputSource;
 

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/ManifestDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/ManifestDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/ManifestDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -24,8 +24,8 @@
 import java.util.jar.Manifest;
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Parse manifest.mf file.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleObjectModelFactoryDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleObjectModelFactoryDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleObjectModelFactoryDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -23,8 +23,8 @@
 
 import java.util.Map;
 
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VFSInputSource;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VFSInputSource;
 import org.jboss.xb.binding.ObjectModelFactory;
 import org.xml.sax.InputSource;
 

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleSchemaResolverDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleSchemaResolverDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleSchemaResolverDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -26,8 +26,8 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VFSInputSource;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VFSInputSource;
 import org.jboss.xb.annotations.JBossXmlConstants;
 import org.jboss.xb.util.JBossXBHelper;
 import org.xml.sax.InputSource;

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleVFSParsingDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleVFSParsingDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/MultipleVFSParsingDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -29,7 +29,7 @@
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Multiple VFS parsing deployer.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/ObjectModelFactoryDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/ObjectModelFactoryDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/ObjectModelFactoryDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,8 +22,8 @@
 package org.jboss.deployers.vfs.spi.deployer;
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VFSInputSource;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VFSInputSource;
 import org.jboss.xb.binding.ObjectModelFactory;
 import org.xml.sax.InputSource;
 

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,8 +22,8 @@
 package org.jboss.deployers.vfs.spi.deployer;
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VFSInputSource;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VFSInputSource;
 import org.jboss.xb.annotations.JBossXmlConstants;
 import org.jboss.xb.util.JBossXBHelper;
 import org.xml.sax.InputSource;

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/SecurityActions.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/SecurityActions.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/SecurityActions.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -29,7 +29,7 @@
 import java.security.PrivilegedExceptionAction;
 import java.security.PrivilegedAction;
 
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author Scott.Stark at jboss.org

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/XSLDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/XSLDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/deployer/XSLDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -34,7 +34,7 @@
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.util.xml.DOMWriter;
 import org.jboss.util.xml.JBossErrorHandler;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 import org.w3c.dom.Document;
 
 /**

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/CandidateAnnotationsCallback.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/CandidateAnnotationsCallback.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/CandidateAnnotationsCallback.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -24,7 +24,7 @@
 import java.lang.annotation.Annotation;
 
 import org.jboss.mcann.AnnotationRepository;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * CandidateAnnotationsCallback.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/StructureContext.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/StructureContext.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/StructureContext.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -28,7 +28,7 @@
 import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.deployers.spi.structure.ContextInfo;
 import org.jboss.deployers.spi.structure.StructureMetaData;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * StructureContext.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentContext.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentContext.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentContext.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -26,8 +26,8 @@
 import org.jboss.deployers.spi.structure.MetaDataEntry;
 import org.jboss.deployers.spi.structure.MetaDataTypeFilter;
 import org.jboss.deployers.structure.spi.DeploymentContext;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * VFSDeploymentContext.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentResourceLoader.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentResourceLoader.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentResourceLoader.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,7 +22,7 @@
 package org.jboss.deployers.vfs.spi.structure;
 
 import org.jboss.deployers.structure.spi.DeploymentResourceLoader;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * VFSDeploymentResourceLoader.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentUnit.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentUnit.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSDeploymentUnit.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -25,8 +25,8 @@
 
 import org.jboss.deployers.spi.structure.MetaDataTypeFilter;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * VFSDeploymentUnit.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSStructuralDeployers.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSStructuralDeployers.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/VFSStructuralDeployers.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,7 +22,7 @@
 package org.jboss.deployers.vfs.spi.structure;
 
 import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * VFSStructuralDeployers.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractCandidateStructureVisitor.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractCandidateStructureVisitor.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractCandidateStructureVisitor.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,16 +21,14 @@
 */
 package org.jboss.deployers.vfs.spi.structure.helpers;
 
-import java.io.IOException;
-
 import org.jboss.deployers.spi.structure.ContextInfo;
 import org.jboss.deployers.spi.structure.StructureMetaData;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.plugins.vfs.helpers.AbstractVirtualFileVisitor;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VisitorAttributes;
+import org.jboss.vfs.util.AbstractVirtualFileVisitor;
 
 /**
  * Visits the structure and creates candidates
@@ -136,17 +134,8 @@
       if (contextInfo == null)
       {
          // Ignore directories when asked
-         try
-         {
-            if (ignoreDirectories && SecurityActions.isLeaf(file) == false)
-               return;
-         }
-         catch (IOException e)
-         {
-            log.debugf("Ignoring %1s reason=%2s", file, e);
+         if (ignoreDirectories && file.isDirectory())
             return;
-         }
-         
          // Apply any filter
          if (filter != null && filter.accepts(file) == false)
             return;

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -41,10 +41,10 @@
 import org.jboss.logging.Logger;
 import org.jboss.mcann.AnnotationRepository;
 import org.jboss.util.collection.CollectionsFactory;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileVisitor;
-import org.jboss.virtual.VisitorAttributes;
+import org.jboss.vfs.VFSUtils;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileVisitor;
+import org.jboss.vfs.VisitorAttributes;
 
 /**
  * AbstractStructureDeployer.<p>
@@ -58,7 +58,7 @@
 public abstract class AbstractStructureDeployer implements StructureDeployer
 {
    /** The log */
-   protected Logger log = Logger.getLogger(getClass());
+   protected static final Logger log = Logger.getLogger("org.jboss.deployers.vfs.structure");
    
    /** The relative order */
    private int relativeOrder = Integer.MAX_VALUE;
@@ -82,7 +82,7 @@
     * @param child the child
     * @return the relative path
     */
-   public static final String getRelativePath(StructureContext context, VirtualFile child)
+   public static String getRelativePath(StructureContext context, VirtualFile child)
    {
       if (context == null)
          throw new IllegalArgumentException("Null context");
@@ -97,7 +97,7 @@
     * @param child the child
     * @return the relative path
     */
-   public static final String getRelativePath(VirtualFile parent, VirtualFile child)
+   public static String getRelativePath(VirtualFile parent, VirtualFile child)
    {
       if (child == null)
          throw new IllegalArgumentException("Null child");
@@ -131,9 +131,9 @@
       return relativeOrder;
    }
    
-   public void setRelativeOrder(int order)
+   public void setRelativeOrder(int relativeOrder)
    {
-      this.relativeOrder = order;
+      this.relativeOrder = relativeOrder;
    }
 
    public void setContextInfoOrder(Integer contextInfoOrder)
@@ -223,7 +223,7 @@
     * @param context - the context to populate
     * @throws IOException on any IO error
     */
-   protected void addClassPath(StructureContext structureContext, VirtualFile entry, boolean includeEntry, boolean includeRootManifestCP, ContextInfo context) throws IOException
+   protected void addClassPath(StructureContext structureContext, VirtualFile entry, boolean includeEntry, boolean includeRootManifestCP, ContextInfo context)
    {
       boolean trace = log.isTraceEnabled();
       
@@ -234,7 +234,7 @@
          paths.add(entry);
 
       // Add the manifest locations
-      if (includeRootManifestCP && isLeaf(entry) == false)
+      if (includeRootManifestCP && entry.isDirectory())
       {
          try
          {
@@ -376,7 +376,7 @@
     * @return true when it is a leaf
     * @throws IOException for any error
     */
-   protected static boolean isLeaf(VirtualFile file) throws IOException
+   protected static boolean isLeaf(VirtualFile file)
    {
       return SecurityActions.isLeaf(file);
    }
@@ -424,17 +424,9 @@
       if (metaDataPath != null)
       {
          VirtualFile root = context.getFile();
-         try
-         {
-            VirtualFile child = root.getChild(metaDataPath);
-            if (child == null)
-               metaDataPath = null;
-         }
-         catch (IOException e)
-         {
-            log.warn("Not using metadata path " + metaDataPath + " for " + root.getName() + " reason: " + e.getMessage());
+         VirtualFile child = root.getChild(metaDataPath);
+         if (! child.exists())
             metaDataPath = null;
-         }
       }
 
       // Create and link the context
@@ -482,15 +474,8 @@
    protected void addMetaDataPath(StructureContext context, ContextInfo info, String path, MetaDataType type)
    {
       VirtualFile root = context.getFile();
-      try
-      {
-         if (root.getChild(path) != null)
-            info.addMetaDataPath(createMetaDataEntry(path, type));
-      }
-      catch (IOException e)
-      {
-         log.warn("Not using metadata path " + path + " for " + root.getName() + " reason: " + e.getMessage());
-      }
+      if (root.getChild(path).exists())
+         info.addMetaDataPath(createMetaDataEntry(path, type));
    }
 
    /**
@@ -512,16 +497,9 @@
       {
          for(String path : metaDataPaths)
          {
-            try
-            {
-               VirtualFile child = root.getChild(path);
-               if (child != null)
-                  metaDataPath.add(path);
-            }
-            catch (IOException e)
-            {
-               log.warn("Not using metadata path " + path + " for " + root.getName() + " reason: " + e.getMessage());
-            }
+            VirtualFile child = root.getChild(path);
+            if (child.exists())
+               metaDataPath.add(path);
          }
       }
 
@@ -563,7 +541,7 @@
    {
       if (result != null && contextInfoOrder != null)
       {
-         result.setRelativeOrder(contextInfoOrder);
+         result.setRelativeOrder(contextInfoOrder.intValue());
       }
    }
 }

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/CandidateStructureVisitorFactory.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/CandidateStructureVisitorFactory.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/CandidateStructureVisitorFactory.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,8 +22,8 @@
 package org.jboss.deployers.vfs.spi.structure.helpers;
 
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
-import org.jboss.virtual.VirtualFileVisitor;
-import org.jboss.virtual.VisitorAttributes;
+import org.jboss.vfs.VirtualFileVisitor;
+import org.jboss.vfs.VisitorAttributes;
 
 /**
  * CandidateStructureVisitorFactory.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/ClassPathVisitor.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/ClassPathVisitor.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/ClassPathVisitor.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -30,7 +30,7 @@
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.jboss.deployers.structure.spi.DeploymentUnitVisitor;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Collects all the classpath elements

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/DefaultCandidateStructureVisitorFactory.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/DefaultCandidateStructureVisitorFactory.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/DefaultCandidateStructureVisitorFactory.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,9 +22,9 @@
 package org.jboss.deployers.vfs.spi.structure.helpers;
 
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VirtualFileVisitor;
-import org.jboss.virtual.VisitorAttributes;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.VirtualFileVisitor;
+import org.jboss.vfs.VisitorAttributes;
 
 /**
  * DefaultCandidateStructureVisitorFactory.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/SecurityActions.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/SecurityActions.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/SecurityActions.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,13 +21,10 @@
  */
 package org.jboss.deployers.vfs.spi.structure.helpers;
 
-import java.io.IOException;
-import java.lang.reflect.UndeclaredThrowableException;
 import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
+import java.security.PrivilegedAction;
 
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * @author Scott.Stark at jboss.org
@@ -35,6 +32,10 @@
  */
 public class SecurityActions
 {
+   private SecurityActions()
+   {
+   }
+
    /**
     * Actions for File access 
     */
@@ -42,44 +43,31 @@
    { 
       FileActions PRIVILEGED = new FileActions() 
       { 
-         public Boolean isLeaf(final VirtualFile f) throws IOException
+         public boolean isLeaf(final VirtualFile f)
          {
-            try 
-            { 
-               return AccessController.doPrivileged(new PrivilegedExceptionAction<Boolean>()
+            return AccessController.doPrivileged(new PrivilegedAction<Boolean>()
+            {
+               public Boolean run()
                {
-                  public Boolean run() throws Exception
-                  {
-                     return f.isLeaf();
-                  }
-               });
-            }
-            catch(PrivilegedActionException e) 
-            { 
-               Exception ex = e.getException();
-               if( ex instanceof IOException ) 
-                  throw (IOException) ex; 
-               else if( ex instanceof RuntimeException )
-                  throw (RuntimeException) ex;
-               else
-                  throw new UndeclaredThrowableException(ex); 
-            } 
+                  return Boolean.valueOf(f.isFile());
+               }
+            }).booleanValue();
          }
       }; 
 
       FileActions NON_PRIVILEGED = new FileActions() 
       {
-         public Boolean isLeaf(VirtualFile f) throws IOException
+         public boolean isLeaf(VirtualFile f)
          {
-            return f.isLeaf();
+            return f.isFile();
          }
          
       };
 
-      public Boolean isLeaf(VirtualFile f) throws IOException;
+      boolean isLeaf(VirtualFile f);
    } 
 
-   static boolean isLeaf(VirtualFile f) throws IOException
+   static boolean isLeaf(VirtualFile f)
    {
       SecurityManager sm = System.getSecurityManager();
       if( sm != null )

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VirtualFileDeploymentUnitFilter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VirtualFileDeploymentUnitFilter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/VirtualFileDeploymentUnitFilter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -22,8 +22,8 @@
 package org.jboss.deployers.vfs.spi.structure.helpers;
 
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * VirtualFileDeploymentUnitFilter.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureCache.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureCache.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureCache.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -23,7 +23,7 @@
 
 import java.util.List;
 
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Abstract structure cache.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureModificationChecker.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureModificationChecker.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureModificationChecker.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -30,7 +30,7 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
 import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * AbstractStructureModificationChecker.
@@ -146,10 +146,36 @@
       return (VFSDeploymentContext) deploymentContext;
    }
 
+   public boolean hasStructureBeenModified(String name, VirtualFile root) throws IOException
+   {
+      return hasStructureBeenModified(root, getDeploymentContext(name));
+   }
+   
    public boolean hasStructureBeenModified(VirtualFile root) throws IOException
    {
+      VFSDeploymentContext deploymentContext = null;
+      try
+      {
+         String name = root.toURI().toString();
+         deploymentContext = getDeploymentContext(name);
+      }
+      catch (URISyntaxException ignore)
+      {
+      }
+      if(deploymentContext == null)
+      {
+         log.trace("Falling back to root name: " + root);
+         deploymentContext = getDeploymentContext(root.getName());
+      }
+      return hasStructureBeenModified(root, deploymentContext);
+   }
+   
+   protected boolean hasStructureBeenModified(VirtualFile root, VFSDeploymentContext deploymentContext) throws IOException
+   {
       if (root == null)
          throw new IllegalArgumentException("Null root");
+      if (deploymentContext == null)
+         return false;
 
       // skip vfs deployment context lookup accepted by filter
       if (getRootFilter().accepts(root))
@@ -163,76 +189,8 @@
             return result;
          }
       }
-
-      VFSDeploymentContext deploymentContext;
-      try
-      {
-         String name = root.toURI().toString();
-         deploymentContext = getDeploymentContext(name);
-         if (deploymentContext != null)
-            return hasStructureBeenModified(deploymentContext, false);
-      }
-      catch (URISyntaxException ignore)
-      {
-      }
-
-      log.trace("Falling back to root name: " + root);
-      deploymentContext = getDeploymentContext(root.getName());
-      if (deploymentContext != null)
-         return hasStructureBeenModified(deploymentContext, false);
-
-      return false;
-   }
-
-   public boolean hasStructureBeenModified(VFSDeployment deployment) throws IOException
-   {
-      if (deployment == null)
-         throw new IllegalArgumentException("Null deployment");
-
-      VFSDeploymentContext deploymentContext = getDeploymentContext(deployment.getName());
-      return deploymentContext != null && hasStructureBeenModified(deploymentContext);
-   }
-
-   public boolean hasStructureBeenModified(VFSDeploymentContext deploymentContext) throws IOException
-   {
-      return hasStructureBeenModified(deploymentContext, true);
-   }
-
-   /**
-    * Has structure been modified.
-    *
-    * @param deploymentContext the deployment context
-    * @param checkRoot should we check root
-    * @return true if modifed, false otherwise
-    * @throws IOException for any error
-    */
-   protected boolean hasStructureBeenModified(VFSDeploymentContext deploymentContext, boolean checkRoot) throws IOException
-   {
-      Deployment deployment = deploymentContext.getDeployment();
-      if (deployment == null || deployment instanceof VFSDeployment == false)
-      {
-         log.warn("Deployment is not VFS or not top level.");
-         return false;
-      }
-
-      VFSDeployment vfsDeployment = VFSDeployment.class.cast(deployment);
-      VirtualFile root = vfsDeployment.getRoot();
-
-      boolean result = false;
-      boolean skip = false; // skip futher check
-
-      if (checkRoot && getRootFilter().accepts(root))
-      {
-         result = hasRootBeenModified(root);
-         if (result || getRootFilter().checkRootOnly(root))
-            skip = true;
-      }
-
-      if (skip == false)
-      {
-         result = hasStructureBeenModifed(root, deploymentContext);
-      }
-
+      
+      boolean result = hasDeploymentContextBeenModified(root, deploymentContext);
       if (result)
       {
          getCache().invalidateCache(root);
@@ -247,11 +205,7 @@
     * @return true if modified, false otherwise
     * @throws IOException for any error
     */
-   protected boolean hasRootBeenModified(VirtualFile root) throws IOException
-   {
-      // for back compatibility
-      return root.hasBeenModified();
-   }
+   protected abstract boolean hasRootBeenModified(VirtualFile root) throws IOException;
 
    /**
     * Has structure been modified.
@@ -261,8 +215,9 @@
     * @return true if modifed, false otherwise
     * @throws IOException for any error
     */
-   protected abstract boolean hasStructureBeenModifed(VirtualFile root, VFSDeploymentContext deploymentContext) throws IOException;
+   protected abstract boolean hasDeploymentContextBeenModified(VirtualFile root, VFSDeploymentContext deploymentContext) throws IOException;
 
+   
    public void addStructureRoot(VirtualFile root)
    {
       if (root == null)
@@ -286,14 +241,7 @@
    {
       public boolean accepts(VirtualFile file)
       {
-         try
-         {
-            return file.isLeaf() || file.isArchive();
-         }
-         catch (IOException e)
-         {
-            throw new RuntimeException(e);
-         }
+         return ! file.isDirectory();
       }
 
       public boolean checkRootOnly(VirtualFile root)

Deleted: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractSynchAdapter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractSynchAdapter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractSynchAdapter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.deployers.vfs.spi.structure.modified;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.jboss.logging.Logger;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-
-/**
- * Abstract synch adapter.
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public abstract class AbstractSynchAdapter implements SynchAdapter
-{
-   /** The log */
-   protected static Logger log = Logger.getLogger(AbstractSynchAdapter.class);
-
-   public long add(VirtualFile fileToAdd, VirtualFile tempRoot, String pathToFile) throws IOException
-   {
-      try
-      {
-         URL realURL = VFSUtils.getRealURL(tempRoot);
-         File rootDir = new File(realURL.toURI());
-         File newFile = new File(rootDir, pathToFile);
-         return copy(fileToAdd, newFile);
-      }
-      catch (URISyntaxException e)
-      {
-         IOException ioe = new IOException();
-         ioe.initCause(e);
-         throw ioe;
-      }
-   }
-
-   /**
-    * Do copy.
-    *
-    * @param fileToAdd file to add
-    * @param newFile new file location
-    * @return new timestamp
-    * @throws IOException for any error
-    */
-   protected static long copy(VirtualFile fileToAdd, File newFile) throws IOException
-   {
-      FileOutputStream out = new FileOutputStream(newFile);
-      VFSUtils.copyStreamAndClose(fileToAdd.openStream(), out);
-      return newFile.lastModified();
-   }
-
-   public boolean delete(VirtualFile fileToDelete) throws IOException
-   {
-      return fileToDelete.delete();
-   }
-
-   /**
-    * Merge exception
-    */
-   static class MergeException extends IOException
-   {
-      /** The serialVersionUID */
-      private static final long serialVersionUID = 5228888050899870372L;
-
-      MergeException(VirtualFile dest, VirtualFile source, Exception cause)
-      {
-         super("Conflict merging files, dest: " + dest + ", source: " + source);
-         initCause(cause);
-      }
-   }
-}

Deleted: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AddVisitor.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AddVisitor.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AddVisitor.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.deployers.vfs.spi.structure.modified;
-
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-
-/**
- * Synch on add file visitor.
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public class AddVisitor extends SynchVisitor
-{
-   private VirtualFile tempRoot;
-   private int initialPathLenght;
-
-   public AddVisitor(VisitorAttributes attributes, StructureCache<Long> cache, SynchAdapter synchAdapter, VirtualFile tempRoot, int initialPathLenght)
-   {
-      this(null, attributes, cache, synchAdapter, tempRoot, initialPathLenght);
-   }
-
-   public AddVisitor(VirtualFileFilter filter, VisitorAttributes attributes, StructureCache<Long> cache, SynchAdapter synchAdapter, VirtualFile tempRoot, int initialPathLenght)
-   {
-      super(filter, attributes, cache, synchAdapter);
-      if (tempRoot == null)
-         throw new IllegalArgumentException("Null temp root");
-      if (initialPathLenght < 0)
-         throw new IllegalArgumentException("Initial path length is negative: " + initialPathLenght);
-
-      this.tempRoot = tempRoot;
-      this.initialPathLenght = initialPathLenght;
-   }
-
-   public void doVisit(VirtualFile file) throws Exception
-   {
-      String originalPathName = file.getPathName();
-      String pathName = originalPathName.substring(initialPathLenght);
-      VirtualFile child = tempRoot.getChild(pathName);
-      if (child == null)
-      {
-         // original was added
-         long timestamp = getSynchAdapter().add(file, tempRoot, pathName);
-         getCache().putCacheValue(file, timestamp);
-      }
-   }
-}
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DefaultStructureCache.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DefaultStructureCache.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DefaultStructureCache.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -29,8 +29,8 @@
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * Default structure cache.
@@ -58,29 +58,22 @@
 
    public List<VirtualFile> getLeaves(VirtualFile file, VirtualFileFilter filter)
    {
-      try
+      List<VirtualFile> result = null;
+      for (VirtualFile key : map.keySet())
       {
-         List<VirtualFile> result = null;
-         for (VirtualFile key : map.keySet())
+         VirtualFile parent = key.getParent();
+         if (parent != null && parent.equals(file) && (filter == null || filter.accepts(key)))
          {
-            VirtualFile parent = key.getParent();
-            if (parent != null && parent.equals(file) && (filter == null || filter.accepts(key)))
-            {
-               if (result == null)
-                  result = new ArrayList<VirtualFile>();
+            if (result == null)
+               result = new ArrayList<VirtualFile>();
 
-               result.add(key);
-            }
+            result.add(key);
          }
-         if (result != null)
-            return result;
-         else
-            return (map.containsKey(file) ? Collections.<VirtualFile>emptyList() : null);
       }
-      catch (IOException e)
-      {
-         throw new RuntimeException(e);
-      }
+      if (result != null)
+         return result;
+      else
+         return (map.containsKey(file) ? Collections.<VirtualFile>emptyList() : null);
    }
 
    public void invalidateCache(VirtualFile file)
@@ -124,21 +117,14 @@
     */
    protected boolean isAncestorOrEquals(VirtualFile ref, VirtualFile file)
    {
-      try
+      while(file != null)
       {
-         while(file != null)
-         {
-            if (file.equals(ref))
-               return true;
+         if (file.equals(ref))
+            return true;
 
-            file = file.getParent();
-         }
-         return false;
+         file = file.getParent();
       }
-      catch (IOException e)
-      {
-         throw new RuntimeException(e);
-      }
+      return false;
    }
 
    public void flush()

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DirModificationCheckerFilter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DirModificationCheckerFilter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DirModificationCheckerFilter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,10 +21,8 @@
  */
 package org.jboss.deployers.vfs.spi.structure.modified;
 
-import java.io.IOException;
+import org.jboss.vfs.VirtualFile;
 
-import org.jboss.virtual.VirtualFile;
-
 /**
  * Directory ModificationCheckerFilter.
  *
@@ -42,14 +40,7 @@
 
    public boolean checkRootOnly(VirtualFile root)
    {
-      try
-      {
-         // if file or archive, no point in checking fwd
-         return root.isArchive() || root.isLeaf();
-      }
-      catch (IOException e)
-      {
-         return true; // true, as we don't wanna go fwd with broken check
-      }
+      // only proceed if root is a directory
+      return ! root.isDirectory();
    }
 }
\ No newline at end of file

Deleted: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MergeOverrideSynchAdapter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MergeOverrideSynchAdapter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MergeOverrideSynchAdapter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.deployers.vfs.spi.structure.modified;
-
-import java.io.IOException;
-
-import org.jboss.virtual.VirtualFile;
-
-/**
- * Try merge first, fallback to override.
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public class MergeOverrideSynchAdapter extends AbstractSynchAdapter
-{
-   public long update(VirtualFile fileToUpdate, VirtualFile modifiedFile) throws IOException
-   {
-      try
-      {
-         return MergeSynchAdapter.merge(fileToUpdate, modifiedFile);
-      }
-      catch (MergeException e)
-      {
-         return OverrideSynchAdapter.override(fileToUpdate, modifiedFile);
-      }
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MergeSynchAdapter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MergeSynchAdapter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MergeSynchAdapter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.deployers.vfs.spi.structure.modified;
-
-import java.io.IOException;
-
-import org.jboss.virtual.VirtualFile;
-
-/**
- * Merge synch adapter.
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public class MergeSynchAdapter extends AbstractSynchAdapter
-{
-   public long update(VirtualFile fileToUpdate, VirtualFile modifiedFile) throws IOException
-   {
-      return merge(fileToUpdate, modifiedFile);
-   }
-
-   /**
-    * Do merge changes.
-    *
-    * @param fileToOverride the file to override
-    * @param modifiedFile the modifed file
-    * @return new timestamp
-    * @throws MergeException for possible merge conflict
-    * @throws java.io.IOException for any error
-    */
-   static long merge(VirtualFile fileToOverride, VirtualFile modifiedFile) throws IOException
-   {
-      return 0; // TODO
-   }
-}
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MetaDataStructureModificationChecker.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MetaDataStructureModificationChecker.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/MetaDataStructureModificationChecker.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -32,8 +32,8 @@
 import org.jboss.deployers.spi.structure.StructureMetaData;
 import org.jboss.deployers.structure.spi.main.MainDeployerInternals;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * MetaDataStructureModificationChecker.
@@ -79,7 +79,7 @@
       }
    }
 
-   protected boolean hasStructureBeenModifed(VirtualFile root, VFSDeploymentContext deploymentContext) throws IOException
+   protected boolean hasDeploymentContextBeenModified(VirtualFile root, VFSDeploymentContext deploymentContext) throws IOException
    {
       StructureMetaData structureMetaData = deploymentContext.getTransientManagedObjects().getAttachment(StructureMetaData.class);
       return hasStructureBeenModified(root, structureMetaData, null);
@@ -132,7 +132,7 @@
    {
       String path = contextInfo.getPath();
       VirtualFile contextRoot = root.getChild(path);
-      if (contextRoot != null)
+      if (contextRoot.exists())
       {
          List<MetaDataEntry> metadataPaths = contextInfo.getMetaDataPath();
          if (metadataPaths != null && metadataPaths.isEmpty() == false)
@@ -144,7 +144,7 @@
 
                String metaDataPath = entry.getPath();
                VirtualFile mdpVF = contextRoot.getChild(metaDataPath);
-               if (mdpVF != null)
+               if (mdpVF.exists())
                {
                   List<VirtualFile> children = mdpVF.getChildren(filter);
                   List<VirtualFile> leaves = getCache().getLeaves(mdpVF, filter);

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/ModificationCheckerFilter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/ModificationCheckerFilter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/ModificationCheckerFilter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,8 +21,8 @@
  */
 package org.jboss.deployers.vfs.spi.structure.modified;
 
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * ModificationCheckerFilter.

Deleted: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/OverrideSynchAdapter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/OverrideSynchAdapter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/OverrideSynchAdapter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.deployers.vfs.spi.structure.modified;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VFSUtils;
-
-/**
- * Override synch adapter.
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public class OverrideSynchAdapter extends AbstractSynchAdapter
-{
-   public long update(VirtualFile fileToUpdate, VirtualFile modifiedFile) throws IOException
-   {
-      return override(fileToUpdate, modifiedFile);
-   }
-
-   /**
-    * Do override.
-    *
-    * @param fileToOverride the file to override
-    * @param modifiedFile the modifed file
-    * @return new timestamp
-    * @throws IOException for any error
-    */
-   static long override(VirtualFile fileToOverride, VirtualFile modifiedFile) throws IOException
-   {
-      try
-      {
-         // get uri before we delete the file
-         URI uri = VFSUtils.getRealURL(fileToOverride).toURI();
-         if (fileToOverride.delete())
-         {
-            File newFile = new File(uri);
-            return copy(modifiedFile, newFile);
-         }
-         else
-         {
-            log.warn("Could not delete previous file: " + fileToOverride + ", no change applied: " + modifiedFile);
-            return fileToOverride.getLastModified();
-         }
-      }
-      catch (URISyntaxException e)
-      {
-         IOException ioe = new IOException();
-         ioe.initCause(e);
-         throw ioe;
-      }
-   }
-}
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureCache.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureCache.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureCache.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -23,8 +23,8 @@
 
 import java.util.List;
 
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
 
 /**
  * Simple structure cache.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureListener.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureListener.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureListener.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,7 +21,7 @@
  */
 package org.jboss.deployers.vfs.spi.structure.modified;
 
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * StructureListener.

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureModificationChecker.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureModificationChecker.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/StructureModificationChecker.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -23,9 +23,7 @@
 
 import java.io.IOException;
 
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.vfs.VirtualFile;
 
 /**
  * Simple structure modification checker interface.
@@ -44,20 +42,14 @@
    boolean hasStructureBeenModified(VirtualFile root) throws IOException;
 
    /**
-    * Has structure been modified.
-    *
-    * @param deployment the vfs deployment
-    * @return true if structure has been modified, false otherwise
-    * @throws IOException for any error
+    * Has structure been modified.  This method is used for cases when the DeploymentContext name is not 
+    * guaranteed to be the root path. 
+    * 
+    * @param name context name
+    * @param root
+    * @return
+    * @throws IOException
     */
-   boolean hasStructureBeenModified(VFSDeployment deployment) throws IOException;
+   boolean hasStructureBeenModified(String deploymentName, VirtualFile root) throws IOException;
 
-   /**
-    * Has structure been modified.
-    *
-    * @param deploymentContext the vfs deployment context
-    * @return true if structure has been modified, false otherwise
-    * @throws IOException for any error
-    */
-   boolean hasStructureBeenModified(VFSDeploymentContext deploymentContext) throws IOException;
 }
\ No newline at end of file

Deleted: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchAdapter.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchAdapter.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchAdapter.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.deployers.vfs.spi.structure.modified;
-
-import java.io.IOException;
-
-import org.jboss.virtual.VirtualFile;
-
-/**
- * Synch adapter.
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public interface SynchAdapter
-{
-   /**
-    * Add new file to temp.
-    *
-    * @param fileToAdd file to add
-    * @param tempRoot temp root
-    * @param pathToFile the path to file
-    * @return addition timestamp
-    * @throws IOException for any error
-    */
-   long add(VirtualFile fileToAdd, VirtualFile tempRoot, String pathToFile) throws IOException;
-
-   /**
-    * Update file.
-    *
-    * @param fileToUpdate file to update
-    * @param modifiedFile the modified file
-    * @return the update timestamp
-    * @throws IOException for any error
-    */
-   long update(VirtualFile fileToUpdate, VirtualFile modifiedFile) throws IOException;
-
-   /**
-    * Add new file to temp.
-    *
-    * @param fileToDelete file to delete
-    * @throws IOException for any error
-    * @return true if deleted, false otherwise
-    */
-   boolean delete(VirtualFile fileToDelete) throws IOException;
-}
\ No newline at end of file

Deleted: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchVisitor.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchVisitor.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchVisitor.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,112 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.deployers.vfs.spi.structure.modified;
-
-import org.jboss.logging.Logger;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.VirtualFileVisitor;
-
-/**
- * Synch file visitor.
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public abstract class SynchVisitor implements VirtualFileVisitor
-{
-   protected final Logger log = Logger.getLogger(getClass());
-
-   private VirtualFileFilter filter;
-   private VisitorAttributes attributes;
-   private StructureCache<Long> cache;
-   private SynchAdapter synchAdapter;
-
-   protected SynchVisitor(VisitorAttributes attributes, StructureCache<Long> cache, SynchAdapter synchAdapter)
-   {
-      this(null, attributes, cache, synchAdapter);
-   }
-
-   protected SynchVisitor(VirtualFileFilter filter, VisitorAttributes attributes, StructureCache<Long> cache, SynchAdapter synchAdapter)
-   {
-      if (cache == null)
-         throw new IllegalArgumentException("Null cache");
-      if (synchAdapter == null)
-         throw new IllegalArgumentException("Null synch adapter");
-
-      this.filter = filter;
-      if (attributes != null)
-         this.attributes = attributes;
-      else
-         this.attributes = VisitorAttributes.RECURSE_LEAVES_ONLY;
-      this.cache = cache;
-      this.synchAdapter = synchAdapter;
-   }
-
-   public VisitorAttributes getAttributes()
-   {
-      return attributes;
-   }
-
-   public void visit(VirtualFile file)
-   {
-      try
-      {
-         if (filter == null || filter.accepts(file))
-         {
-            doVisit(file);
-         }
-      }
-      catch (Exception e)
-      {
-         log.warn("Exception synching file: " + file + ", cause: " + e);
-      }
-   }
-
-   /**
-    * Visit a virtual file
-    *
-    * @param file the virtual file being visited
-    * @throws Exception for any error
-    */
-   protected abstract void doVisit(VirtualFile file) throws Exception;
-
-   /**
-    * Get cache.
-    *
-    * @return the cache
-    */
-   protected StructureCache<Long> getCache()
-   {
-      return cache;
-   }
-
-   /**
-    * Get synch adapter.
-    *
-    * @return the syncj adapter
-    */
-   protected SynchAdapter getSynchAdapter()
-   {
-      return synchAdapter;
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchWrapperModificationChecker.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchWrapperModificationChecker.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/SynchWrapperModificationChecker.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,141 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.deployers.vfs.spi.structure.modified;
-
-import java.io.IOException;
-
-import org.jboss.deployers.structure.spi.main.MainDeployerInternals;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentContext;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-
-/**
- * Synch wrapper modification checker.
- *
- * If there is no modification, we check if the deployment is perhaps a temp,
- * only then checking if we need to update some resource.
- * e.g. some .jsp or .xhtml file for JBossWeb to pick up the change
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public class SynchWrapperModificationChecker extends AbstractStructureModificationChecker<Long>
-{
-   /** The true checker delegate */
-   private AbstractStructureModificationChecker<Long> delegate;
-
-   /** The filter */
-   private VirtualFileFilter filter;
-
-   /** The synch adapter */
-   private SynchAdapter synchAdapter;
-
-   /** the visitor attributes */
-   private VisitorAttributes originalAttributes;
-   private VisitorAttributes tempAttributes;
-
-   public SynchWrapperModificationChecker(AbstractStructureModificationChecker<Long> delegate, SynchAdapter synchAdapter)
-   {
-      if (delegate == null)
-         throw new IllegalArgumentException("Null delegate");
-      if (synchAdapter == null)
-         throw new IllegalArgumentException("Null synch adapter");
-
-      this.delegate = delegate;
-      this.synchAdapter = synchAdapter;
-   }
-
-   @Override
-   protected StructureCache<Long> getCache()
-   {
-      return delegate.getCache();
-   }
-
-   @Override
-   protected MainDeployerInternals getMainDeployerInternals()
-   {
-      return delegate.getMainDeployerInternals();
-   }
-
-   @Override
-   protected boolean hasRootBeenModified(VirtualFile root) throws IOException
-   {
-      return delegate.hasRootBeenModified(root);
-   }
-
-   protected boolean hasStructureBeenModifed(VirtualFile root, VFSDeploymentContext deploymentContext) throws IOException
-   {
-      boolean modified = delegate.hasStructureBeenModifed(root, deploymentContext);
-      // it was not modifed & we're actually temped
-      if (modified == false && root != deploymentContext.getRoot())
-      {
-         // check for update or delete
-         UpdateDeleteVisitor udVisitor = new UpdateDeleteVisitor(filter, tempAttributes, getCache(), synchAdapter, root);
-         VirtualFile tempRoot = deploymentContext.getRoot();
-         tempRoot.visit(udVisitor);
-         // check for addition
-         AddVisitor addVisitor = new AddVisitor(filter, originalAttributes, getCache(), synchAdapter, tempRoot, root.getPathName().length());
-         root.visit(addVisitor);
-      }
-      return modified;
-   }
-
-   public void addStructureRoot(VirtualFile root)
-   {
-      delegate.addStructureRoot(root);
-   }
-
-   public void removeStructureRoot(VirtualFile root)
-   {
-      delegate.removeStructureRoot(root);
-   }
-
-   /**
-    * Set the filter.
-    *
-    * @param filter the filter
-    */
-   public void setFilter(VirtualFileFilter filter)
-   {
-      this.filter = filter;
-   }
-
-   /**
-    * Set original visitor attributes.
-    *
-    * @param attributes the attributes
-    */
-   public void setOriginalAttributes(VisitorAttributes attributes)
-   {
-      this.originalAttributes = attributes;
-   }
-
-   /**
-    * Set temp visitor attributes.
-    *
-    * @param attributes the attributes
-    */
-   public void setTempAttributes(VisitorAttributes attributes)
-   {
-      this.tempAttributes = attributes;
-   }
-}
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/TreeStructureCache.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/TreeStructureCache.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/TreeStructureCache.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,7 +21,6 @@
  */
 package org.jboss.deployers.vfs.spi.structure.modified;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -31,9 +30,9 @@
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.plugins.vfs.helpers.PathTokenizer;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.vfs.VirtualFileFilter;
+import org.jboss.vfs.util.PathTokenizer;
 
 /**
  * Tree base structure cache.
@@ -189,20 +188,13 @@
     */
    protected List<VirtualFile> tokens(VirtualFile file)
    {
-      try
+      List<VirtualFile> tokens = new ArrayList<VirtualFile>();
+      while(file != null)
       {
-         List<VirtualFile> tokens = new ArrayList<VirtualFile>();
-         while(file != null)
-         {
-            tokens.add(0, file);
-            file = file.getParent();
-         }
-         return tokens;
+         tokens.add(0, file);
+         file = file.getParent();
       }
-      catch (IOException e)
-      {
-         throw new RuntimeException(e);
-      }
+      return tokens;
    }
 
    /**

Deleted: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/UpdateDeleteVisitor.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/UpdateDeleteVisitor.java	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/UpdateDeleteVisitor.java	2010-02-16 19:28:23 UTC (rev 101038)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.deployers.vfs.spi.structure.modified;
-
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VisitorAttributes;
-
-/**
- * Synch on update and delete file visitor.
- *
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public class UpdateDeleteVisitor extends SynchVisitor
-{
-   private VirtualFile originalRoot;
-   private String initialPath;
-
-   public UpdateDeleteVisitor(VisitorAttributes attributes, StructureCache<Long> cache, SynchAdapter synchAdapter, VirtualFile originalRoot)
-   {
-      this(null, attributes, cache, synchAdapter, originalRoot);
-   }
-
-   public UpdateDeleteVisitor(VirtualFileFilter filter, VisitorAttributes attributes, StructureCache<Long> cache, SynchAdapter synchAdapter, VirtualFile originalRoot)
-   {
-      super(filter, attributes, cache, synchAdapter);
-      if (originalRoot == null)
-         throw new IllegalArgumentException("Null original root");
-
-      this.originalRoot = originalRoot;
-      initialPath = originalRoot.getPathName();
-      if (initialPath.endsWith("/") == false)
-         initialPath += "/";
-   }
-
-   protected void doVisit(VirtualFile file) throws Exception
-   {
-      String pathName = file.getPathName();
-      String originalPathName = initialPath + pathName;
-      VirtualFile child = originalRoot.getChild(pathName);
-      if (child == null)
-      {
-         // original was deleted, try deleting the temp
-         if (getSynchAdapter().delete(file))
-         {
-            getCache().removeCache(originalRoot, originalPathName);
-         }
-      }
-      else
-      {
-         Long previous = getCache().getCacheValue(child);
-         long lastModified = child.getLastModified();
-
-         boolean updateCache = false;
-         if (previous == null)
-         {
-            updateCache = true;
-         }
-         else if (lastModified > previous)
-         {
-            lastModified = getSynchAdapter().update(file, child);
-            updateCache = true;
-         }
-
-         if (updateCache)
-         {
-            getCache().putCacheValue(child, lastModified);
-         }
-      }
-   }
-}
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/pom.xml
===================================================================
--- projects/jboss-deployers/trunk/pom.xml	2010-02-16 19:12:03 UTC (rev 101037)
+++ projects/jboss-deployers/trunk/pom.xml	2010-02-16 19:28:23 UTC (rev 101038)
@@ -21,13 +21,13 @@
   </scm>
 
   <properties>
-    <version.jboss.vfs>2.2.0.Alpha2</version.jboss.vfs>
+    <version.jboss.vfs>3.0.0.CR1</version.jboss.vfs>
     <version.jboss.reflect>2.2.0.Alpha2</version.jboss.reflect>
     <version.jboss.classpool>1.0.0.Alpha2</version.jboss.classpool>
     <version.jboss.man>2.1.1.SP1</version.jboss.man>
     <version.jboss.mdr>2.2.0.Alpha1</version.jboss.mdr>
     <version.jboss.kernel>2.2.0.Alpha1</version.jboss.kernel>
-    <version.jboss.classloader>2.2.0-SNAPSHOT</version.jboss.classloader>
+    <version.jboss.classloader>2.2.0.Alpha3</version.jboss.classloader>
     <version.jboss.classloading.spi>5.1.0.SP1</version.jboss.classloading.spi>
     <version.jboss.common.core>2.2.17.GA</version.jboss.common.core>
     <version.jboss.logging.spi>2.2.0.CR1</version.jboss.logging.spi>
@@ -40,7 +40,7 @@
     <version.stax.staxapi>1.0</version.stax.staxapi>
     <version.ant.junit>1.6.5</version.ant.junit>
     <version.jboss.byteman>1.0.3.CP01</version.jboss.byteman>
-    <version.jboss.mcann>1.0.0.Alpha1</version.jboss.mcann>
+    <version.jboss.mcann>1.0.0.Alpha2</version.jboss.mcann>
   </properties>
 
   <modules>




More information about the jboss-cvs-commits mailing list