Examples of VFSDeploymentUnit


Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

   @Override
   protected T parse(DeploymentUnit unit, String name, T root) throws Exception
   {
      // Try to find the metadata
      VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;

      VirtualFile file = getMetadataFile(vfsDeploymentUnit, getOutput(), name, true);
      if(file == null)
            return null;
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

   protected T parse(DeploymentUnit unit, Set<String> names, T root) throws Exception
   {
      if (names == null || names.isEmpty())
         throw new IllegalArgumentException("Null or empty names.");

      VFSDeploymentUnit  vfsDeploymentUnit = (VFSDeploymentUnit)unit;

      List<VirtualFile> files = new ArrayList<VirtualFile>();
      Set<String> missingFiles = new HashSet<String>();

      for (String name : names)
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

      // The infrastructure will only check leafs anyway so no need to check here
      if (name == null && isIncludeDeploymentFile())
         name = unit.getName();
     
      // Try to find the metadata
      VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;

      // let's check altDD first
      VirtualFile file = getMetadataFile(vfsDeploymentUnit, getOutput(), name, false);
      if (file != null)
         return parseAndInit(vfsDeploymentUnit, file, root);

      // try all name+suffix matches
      List<VirtualFile> files = vfsDeploymentUnit.getMetaDataFiles(name, suffix);
      switch (files.size())
      {
         case 0 :
            return null;
         case 1 :
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

   protected T parse(DeploymentUnit unit, Set<String> names, String suffix, T root) throws Exception
   {
      if (names == null || names.isEmpty())
         throw new IllegalArgumentException("Null or empty names.");

      VFSDeploymentUnit  vfsDeploymentUnit = (VFSDeploymentUnit)unit;

      List<VirtualFile> files = new ArrayList<VirtualFile>();
      Set<String> missingFiles = new HashSet<String>();

      for (String name : names)
      {
         // try finding altDD file
         VirtualFile file = getMetadataFile(vfsDeploymentUnit, matchFileToClass(unit, name), name, false);
         if (file == null)
         {
            List<VirtualFile> matched = vfsDeploymentUnit.getMetaDataFiles(name, suffix);
            if (matched != null && matched.isEmpty() == false)
               files.addAll(matched);
            else
               missingFiles.add(name);
         }
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

   public void deploy(DeploymentUnit unit, T deployment) throws DeploymentException
   {
      if (unit instanceof VFSDeploymentUnit == false)
         return;
     
      VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;
      deploy(vfsDeploymentUnit, deployment);
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

   public void undeploy(DeploymentUnit unit, T deployment)
   {
      if (unit instanceof VFSDeploymentUnit == false)
         return;
     
      VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit) unit;
      undeploy(vfsDeploymentUnit, deployment);
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

     
      // This part of the deployment wants its own classloader
      if (unit != initial && unit.getAttachment(ClassLoadingMetaData.class) != null)
         return;
     
      VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit) unit;
      List<VirtualFile> paths = vfsUnit.getClassPath();
      if (paths != null)
         classPath.addAll(paths);
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

       * deployment UCL.
       */
      List<URL> classpath = unit.getAttachment("org.jboss.web.expandedWarClasspath", List.class);
      if (classpath == null && unit instanceof VFSDeploymentUnit)
      {
         VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)unit;
         try
         {
            VirtualFile classes = vfsUnit.getFile("WEB-INF/classes");
            // Tomcat can't handle the vfs urls yet
            URL vfsURL = classes.toURL();
            String vfsurl = vfsURL.toString();
            if (vfsurl.startsWith("vfs"))
               vfsURL = new URL(vfsurl.substring(3));
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

            if (local)
            {
               DeploymentUnit localUnit = deploymentUnitLocal.get();
               if (localUnit instanceof VFSDeploymentUnit)
               {
                  VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)localUnit;
                  VirtualFile vf = vfsUnit.getFile(resourceName);
                  if (vf != null)
                     is = vf.openStream();
               }
            }
View Full Code Here

Examples of org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit

     
      // Locate the parent class path
      List<VirtualFile> parentClassPath = null;
      Set<VirtualFile> parentExcludes = null;

      VFSDeploymentUnit parent = unit.getParent();
      while (parent != null)
      {
         parentClassPath = parent.getAttachment(VFS_CLASS_PATH, List.class);
         if (parentClassPath != null)
         {
            parentExcludes = parent.getAttachment(VFS_EXCLUDES, Set.class);
            break;
         }
         else
            parent = parent.getParent();
      }
     
      // Get our classpath
      ClassPathVisitor visitor = new ClassPathVisitor(unit);
      unit.visit(visitor);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.