Examples of AssembledDirectory


Examples of org.jboss.virtual.AssembledDirectory

      }
   }

   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");
      enableTrace("org.jboss.deployers");
      VFSDeploymentUnit unit = assertDeploy(topLevel);
      try
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

      }
   }

   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");
      VFSDeploymentUnit unit = assertDeploy(topLevel);
      try
      {
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

   }

   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");
      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");
         VFSDeploymentUnit unit = assertDeploy(topLevel);
         try
         {
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

      return (Class) a.get(null);
   }
  
   protected AssembledDirectory createTopLevelWithUtil() throws Exception
   {
      AssembledDirectory topLevel = createAssembledDirectory("top-level.jar");
      AssembledDirectory util = topLevel.mkdir("util.jar");
      addPackage(util, A.class);
      return topLevel;
   }
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

      super(name);
   }

   public void testBasicScanning() throws Throwable
   {
      AssembledDirectory ear = createTopLevelWithUtil();

      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");
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

      assertEquals(onFiled, fields.size());
   }

   protected AssembledDirectory 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);
      return topLevel;
   }
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

      }
   }
  
   public void testAssembledDirectory() throws Exception
   {
      AssembledDirectory dirA = createAssembledDirectory("a");
      addPackage(dirA, A.class);
      addPath(dirA, "/bootstrap/test-assembled", "META-INF");
      VFSDeploymentUnit unitA = assertDeploy(dirA);
      try
      {
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

      }
   }
  
   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");
      VFSDeploymentUnit unitA = assertDeploy(dirA);
      try
      {
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

   protected abstract VirtualFileFilter createFilter();

   public void testDoBasicTest() throws Exception
   {
      AssembledDirectory ear = createBasicEar();
      StructureModificationChecker checker = createStructureModificationChecker();

      VFSDeploymentUnit deploymentUnit = assertDeploy(ear);
      try
      {
View Full Code Here

Examples of org.jboss.virtual.AssembledDirectory

      // initial run
      assertFalse(checker.hasStructureBeenModified(root));
      // already cached run
      assertFalse(checker.hasStructureBeenModified(root));

      AssembledDirectory jar = (AssembledDirectory)ear.getChild("simple.jar");
      AssembledDirectory jarMD = (AssembledDirectory)jar.getChild("META-INF");

      // 'update' web-beans.xml
      URL url = getResource("/webbeans/simple/jar/META-INF/web-beans.xml");
      assertNotNull(url);
      File file = new File(url.toURI());
      assertTrue(file.setLastModified(System.currentTimeMillis()));
      assertTrue(checker.hasStructureBeenModified(root));
      // should be the same
      assertFalse(checker.hasStructureBeenModified(root));

      // add new xml
      url = getResource("/scanning/smoke/META-INF/jboss-scanning.xml");
      assertNotNull(url);
      jarMD.addChild(VFS.createNewRoot(url));
      assertTrue(checker.hasStructureBeenModified(root));
      // should be the same
      assertFalse(checker.hasStructureBeenModified(root));

      // 'remove' new xml
      jarMD = jar.mkdir("META-INF");
      url = getResource("/dependency/module/META-INF/jboss-dependency.xml");
      assertNotNull(url);
      jarMD.addChild(VFS.createNewRoot(url));
      url = getResource("/webbeans/simple/ejb/META-INF/web-beans.xml");
      assertNotNull(url);
      jarMD.addChild(VFS.createNewRoot(url));
      assertTrue(checker.hasStructureBeenModified(root));
      // should be the same
      assertFalse(checker.hasStructureBeenModified(root));

      // 'remove' whole metadata dir
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.