Examples of DeploymentMetaData


Examples of org.apache.aries.application.DeploymentMetadata

    }
  }
 
  private DeploymentMetadata createUpdateDepMf()
  {
    DeploymentMetadata depMf = Skeleton.newMock(DeploymentMetadata.class);
    Skeleton.getSkeleton(depMf).setReturnValue(new MethodCall(DeploymentMetadata.class, "getApplicationSymbolicName"), "org.apache.aries.application.management.test");
    Skeleton.getSkeleton(depMf).setReturnValue(new MethodCall(DeploymentMetadata.class, "getApplicationVersion"), new Version("1.0.0"));

    return depMf;
  }
View Full Code Here

Examples of org.apache.aries.application.DeploymentMetadata

    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("demo.eba")));
    //installing requires a valid url for the bundle in repository.xml.
   
    app = manager.resolve(app);
   
    DeploymentMetadata depMeta = app.getDeploymentMetadata();
   
    List<DeploymentContent> provision = depMeta.getApplicationProvisionBundles();
    Collection<DeploymentContent> useBundles = depMeta.getDeployedUseBundle();
    Collection<Content> importPackages = depMeta.getImportPackage();
    assertEquals(provision.toString(), 2, provision.size());
    assertEquals(useBundles.toString(), 1, useBundles.size());
    assertEquals(importPackages.toString(), 4, importPackages.size());
   
    List<String> bundleSymbolicNames = new ArrayList<String>();
View Full Code Here

Examples of org.apache.aries.application.DeploymentMetadata

    writer.close();
    repositoryAdmin.addRepository(new File("twitterRepo.xml").toURI().toURL());
    AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
    AriesApplication app = manager.createApplication(twitterEbaUrl);
    app = manager.resolve(app);
    DeploymentMetadata depMeta = app.getDeploymentMetadata();
    List<DeploymentContent> provision = depMeta.getApplicationProvisionBundles();
    Collection<DeploymentContent> useBundles = depMeta.getDeployedUseBundle();
    Collection<DeploymentContent> appContent = depMeta.getApplicationDeploymentContents();
    // We cannot be sure whether there are two or three provision bundles pulled in by Felix OBR as there is an outstanding defect
    // https://issues.apache.org/jira/browse/FELIX-2672
    // The workaround is to check we get the two bundles we are looking for, instead of insisting on just having two bundles.
   
    List<String> provisionBundleSymbolicNames = new ArrayList<String>();
View Full Code Here

Examples of org.apache.aries.application.DeploymentMetadata

    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
    //installing requires a valid url for the bundle in repository.xml.
   
    app = manager.resolve(app);
   
    DeploymentMetadata depMeta = app.getDeploymentMetadata();
   
    List<DeploymentContent> provision = depMeta.getApplicationProvisionBundles();
   
    assertEquals(provision.toString(), 3, provision.size());
   
    List<String> bundleSymbolicNames = new ArrayList<String>();
   
View Full Code Here

Examples of org.jboss.as.ee.deployment.spi.DeploymentMetaData

        URL descriptorURL = getClass().getClassLoader().getResource("jsr88/" + jbossDescriptorName);
        File jbossDescriptorFile = new File(descriptorURL.getPath());
        JarUtils.addJarEntry(plan, "!/" + jbossDescriptorName, new FileInputStream(jbossDescriptorFile));

        // Setup deployment plan meta data with propriatary descriptor
        DeploymentMetaData metaData = new DeploymentMetaData(deploymentFile);

        String[] strs = jbossDescriptorName.split("/");
        metaData.addEntry(deploymentFile, strs[strs.length - 1]);

        // Add the meta data to the deployment plan
        String metaStr = metaData.toXMLString();
        JarUtils.addJarEntry(plan, DeploymentMetaData.ENTRY_NAME, new ByteArrayInputStream(metaStr.getBytes()));

        plan.flush();
        plan.close();
View Full Code Here

Examples of org.jboss.as.ee.deployment.spi.DeploymentMetaData

        URL descriptorURL = getClass().getClassLoader().getResource(DeploymentTestCase.class.getPackage().getName().replace(".", "/") + "/" + jbossDescriptorName);
        File jbossDescriptorFile = new File(descriptorURL.getPath());
        JarUtils.addJarEntry(plan, "!/" + (webInf ? "WEB-INF/" : "META-INF/") + jbossDescriptorName, new FileInputStream(jbossDescriptorFile));

        // Setup deployment plan meta data with propriatary descriptor
        DeploymentMetaData metaData = new DeploymentMetaData(deploymentFile);

        metaData.addEntry(deploymentFile, jbossDescriptorName);

        // Add the meta data to the deployment plan
        String metaStr = metaData.toXMLString();
        JarUtils.addJarEntry(plan, DeploymentMetaData.ENTRY_NAME, new ByteArrayInputStream(metaStr.getBytes()));

        plan.flush();
        plan.close();
View Full Code Here

Examples of org.jboss.as.ee.deployment.spi.DeploymentMetaData

    public void save(OutputStream stream) throws ConfigurationException {
        JarOutputStream jos;

        // Setup deployment plan meta data with proprietary descriptor (jboss-web.xml)
        DeploymentMetaData metaData = new DeploymentMetaData("WRONG.war");

        try {
            jos = new JarOutputStream(stream);
        } catch (Exception e) {
            return;
        }
        if (jos == null)
            return;

        Iterator setIterator = configBeans.keySet().iterator();
        while (setIterator.hasNext()) {
            String key = (String) setIterator.next();
            JBossConfigBeanProxy val = (JBossConfigBeanProxy) configBeans.get(key);
            val.save(jos, metaData);
        }
        String metaStr = metaData.toXMLString();
        try {
            JarUtils.addJarEntry(jos, DeploymentMetaData.ENTRY_NAME, new ByteArrayInputStream(metaStr.getBytes()));
            jos.flush();
            jos.close();
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.deployers.spi.classloading.DeploymentMetaData

    * @return the lifecycle
    */
   protected DeploymentLifeCycle createDeploymentLifeCycle()
   {
      DeploymentLifeCycle lifecycle = new DeploymentLifeCycle(this);
      DeploymentMetaData dmd = unit.getAttachment(DeploymentMetaData.class);
      if (dmd != null)
      {
         lifecycle.setLazyResolve(dmd.isLazyResolve());
         lifecycle.setLazyStart(dmd.isLazyStart());
         Set<FilterMetaData> filters = dmd.getFilters();
         if (filters != null && filters.isEmpty() == false)
         {
            ClassFilter[] cfs = new ClassFilter[filters.size()];
            int i = 0;
            for (FilterMetaData fmd : filters)
View Full Code Here

Examples of org.jboss.deployment.spi.DeploymentMetaData

      JarOutputStream jos = new JarOutputStream(new FileOutputStream(deploymentPlan));
      JarUtils.addJarEntry(jos, "!/" + jbossFile, new FileInputStream(jbossDescriptor));

      // Setup deployment plan meta data with propriatary descriptor
      DeploymentMetaData metaData = new DeploymentMetaData(deploymentFile);

      strs = jbossFile.split("/");
      metaData.addEntry(deploymentFile, strs[strs.length - 1]);

      // Add the meta data to the deployment plan
      String metaStr = metaData.toXMLString();

      JarUtils.addJarEntry(jos, DeploymentMetaData.ENTRY_NAME, new ByteArrayInputStream(metaStr.getBytes()));
      jos.flush();
      jos.close();
View Full Code Here

Examples of org.jboss.deployment.spi.DeploymentMetaData

        deploymentPlan.deleteOnExit();
     
        jos = new JarOutputStream(new FileOutputStream(deploymentPlan));
     
        // Setup deployment plan meta data with proprietary descriptor
        DeploymentMetaData metaData = new DeploymentMetaData(deployment.getName());
     
        // Add the meta data to the deployment plan
        String metaStr = metaData.toXMLString();
     
        JarUtils.addJarEntry(jos, DeploymentMetaData.ENTRY_NAME, new ByteArrayInputStream(metaStr.getBytes()));
        return deploymentPlan;
     } finally {
        if (jos != null) {
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.