Package org.jboss.vfs

Examples of org.jboss.vfs.VirtualFile


               + ", metaDataCompleteIsDefault="+metaDataCompleteIsDefault
               );
         return;
      }
     
      VirtualFile root = unit.getRoot();
      if(root.isLeaf())
         return;

      List<VirtualFile> classpath = unit.getClassPath();
      if(classpath == null || classpath.isEmpty())
         return;
View Full Code Here


    * @throws IOException for any error
    */
   protected String getMainClassName(VFSDeploymentUnit unit)
      throws IOException
   {
      VirtualFile file = unit.getMetaDataFile("MANIFEST.MF");
      if (log.isTraceEnabled())
         log.trace("parsing " + file);

      if(file == null)
      {
View Full Code Here

    * @param unit the current deployment unit
    * @throws DeploymentException for any error
    */
   public void deploy(VFSDeploymentUnit unit) throws DeploymentException
   {
      VirtualFile root = unit.getRoot();
      String relativePath = unit.getRelativePath();
      VirtualFile ear = unit.getFile(relativePath);
      if (ear == null)
         throw new DeploymentException("No such ear file, relative path: '" + relativePath + "', root: " + root);

      deploy(unit, root, ear);
   }
View Full Code Here

      else if( path.endsWith(".sar") )
         type = J2eeModuleMetaData.SERVICE;
      else if( path.endsWith(".jar") )
      {
         // Look for a META-INF/application-client.xml
         VirtualFile mfFile = unit.getMetaDataFile("MANIFEST.MF");
         VirtualFile clientXml = unit.getMetaDataFile("application-client.xml");
         VirtualFile ejbXml = unit.getMetaDataFile("ejb-jar.xml");
         VirtualFile jbossXml = unit.getMetaDataFile("jboss.xml");

         if( clientXml != null )
         {
            type = J2eeModuleMetaData.CLIENT;
         }
View Full Code Here

      return createBasicEar(SomeUtil.class);
   }

   protected VirtualFile createBasicEar(Class<?> utilClass) throws Exception
   {
      VirtualFile ear = createTopLevelWithUtil(utilClass);

      VirtualFile jar = ear.getChild("simple.jar");
      createAssembledDirectory(jar)
         .addPackage(PlainJavaBean.class)
         .addPath("/weld/simple/jar");

      VirtualFile ejbs = ear.getChild("ejbs.jar");
      createAssembledDirectory(ejbs)
         .addPackage(MySLSBean.class)
         .addPath("/weld/simple/ejb");

      VirtualFile war = ear.getChild("simple.war");
      createAssembledDirectory(war)
         .addPackage("WEB-INF/classes", ServletWebBean.class)
         .addPath("/weld/simple/web")
         .addPackage("WEB-INF/lib/ui.jar", UIWebBean.class)
         .addPath("WEB-INF/lib/ui.jar", "/weld/simple/ui");
View Full Code Here

      return createTopLevelWithUtil(path, SomeUtil.class);
   }

   protected VirtualFile createTopLevelWithUtil(String path, Class<?> utilClass) throws Exception
   {
      VirtualFile earFile = VFS.getChild("top-level.ear");
      createAssembledDirectory(earFile)
         .addPath(path)
         .addPackage("lib/util.jar", utilClass)
         .addPackage("lib/ext.jar", ExternalWebBean.class)
         .addPath("lib/ext.jar", "/weld/simple/ext");
View Full Code Here

      return earFile;
   }

   protected VirtualFile createWarInEar() throws Exception
   {
      VirtualFile earFile = VFS.getChild("war-in-ear.ear");
      createAssembledDirectory(earFile)
         .addPath("/weld/warinear")
         .addPackage("simple.war/WEB-INF/classes", ServletWebBean.class)
         .addPath("simple.war", "/weld/simple/web");
      return earFile;
View Full Code Here

      return earFile;
   }

   protected VirtualFile createJarInEar() throws Exception
   {
      VirtualFile earFile = VFS.getChild("jar-in-ear.ear");
      createAssembledDirectory(earFile)
         .addPath("/weld/jarinear")
         .addPackage("simple.jar", PlainJavaBean.class)
         .addPath("simple.jar", "/weld/simple/jar");
      return earFile;
View Full Code Here

      return earFile;
   }

   protected VirtualFile createWar(String warName, Class<?> reference) throws Exception
   {
      VirtualFile warFile = VFS.getChild(warName);
      createAssembledDirectory(warFile)
         .addPackage("WEB-INF/classes", reference)
         .addPath("/weld/simple/web");
      return warFile;
   }
View Full Code Here

      return warFile;
   }

   protected VirtualFile createEjbJar(String jarName, Class<?> reference) throws Exception
   {
      VirtualFile jarFile = VFS.getChild(jarName);
      createAssembledDirectory(jarFile)
         .addPackage(reference)
         .addPath("/weld/simple/ejb");
      return jarFile;
   }
View Full Code Here

TOP

Related Classes of org.jboss.vfs.VirtualFile

Copyright © 2018 www.massapicom. 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.