Package org.rhq.bundle.ant.task

Examples of org.rhq.bundle.ant.task.BundleTask


        }

        BundleAntProject project = ant.parseBundleDeployFile(
            getFileFromTestClasses("test-bundle-with-manage-root-dir.xml"), null);
        assertNotNull(project);
        BundleTask bundleTask = findBundleTask(project);
        assertNotNull(bundleTask);
        assertNotNull(bundleTask.getDeploymentUnits());
        assertEquals(bundleTask.getDeploymentUnits().size(), 1);
        DeploymentUnitType deploymentUnit = bundleTask.getDeploymentUnits().values().iterator().next();
        assertNotNull(deploymentUnit);

        //assert the compatibility with the legacy attribute
        //noinspection deprecation
        assertEquals(deploymentUnit.getManageRootDir(), "false");
View Full Code Here


        if (bundleTaskCount > 1) {
            throw new InvalidBuildFileException(
                "More than one rhq:bundle task found - an RHQ bundle Ant build file must contain exactly one rhq:bundle task.");
        }

        BundleTask bundleTask = (BundleTask) preconfigureTask(unconfiguredBundleTask);
        Collection<DeploymentUnitType> deployments = bundleTask.getDeploymentUnits().values();
        if (deployments.isEmpty()) {
            throw new InvalidBuildFileException(
                "The bundle task must contain exactly one rhq:deploymentUnit child element.");
        }
        DeploymentUnitType deployment = deployments.iterator().next();

        if (requireExplicitCompliance && deployment.getCompliance() == null) {
            throw new InvalidBuildFileException(
                "The deployment unit must specifically declare compliance mode of the destination directory.");
        }

        project.setDestinationCompliance(deployment.getCompliance());

        Map<File, String> files = deployment.getLocalFileNames();
        for (String file : files.values()) {
            project.getBundleFileNames().add(file);
        }

        Map<File, String> archives = deployment.getLocalArchiveNames();
        for (String archive : archives.values()) {
            project.getBundleFileNames().add(archive);
        }

        List<String> propertyFiles = bundleTask.getLocalPropertyFiles();
        for (String propFile : propertyFiles) {
            project.getBundleFileNames().add(propFile);
        }

        // note that we do NOT add url-files and url-archives to the BundleFileNames because those are
View Full Code Here

TOP

Related Classes of org.rhq.bundle.ant.task.BundleTask

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.