Examples of DeploymentStructure


Examples of org.jboss.as.web.deployment.helpers.DeploymentStructure

     * Merge everything into WarMetaData.
     */
    public void processDeployment(DeploymentUnitContext context) throws DeploymentUnitProcessingException {
        WarMetaData warMetaData = context.getAttachment(WarMetaData.ATTACHMENT_KEY);
        assert warMetaData != null;
        DeploymentStructure structure = context.getAttachment(DeploymentStructure.ATTACHMENT_KEY);
        assert structure != null;
        assert structure.getEntries() != null;

        WebMetaData specMetaData = warMetaData.getWebMetaData();
        boolean isComplete = false;
        if (specMetaData != null) {
            if (specMetaData instanceof Web25MetaData) {
                isComplete |= ((Web25MetaData) specMetaData).isMetadataComplete();
            } else if (specMetaData instanceof Web30MetaData) {
                isComplete |= ((Web30MetaData) specMetaData).isMetadataComplete();
            } else {
                // Any web.xml 2.4 or earlier deployment is metadata complete
                isComplete = true;
            }
        }

        // Find all fragments that have been processed by deployers, and place
        // them in a map keyed by location
        LinkedList<String> order = new LinkedList<String>();
        List<WebOrdering> orderings = new ArrayList<WebOrdering>();
        HashSet<String> jarsSet = new HashSet<String>();
        Set<VirtualFile> overlays = new HashSet<VirtualFile>();
        Map<String, VirtualFile> scis = new HashMap<String, VirtualFile>();
        boolean fragmentFound = false;
        Map<String, WebFragmentMetaData> webFragments = warMetaData.getWebFragmentsMetaData();
        for (DeploymentStructure.ClassPathEntry resourceRoot : structure.getEntries()) {
            if (resourceRoot.getRoot().getLowerCaseName().endsWith(".jar")) {
                jarsSet.add(resourceRoot.getName());
                // Find overlays
                VirtualFile overlay = resourceRoot.getRoot().getChild("META-INF/resources");
                if (overlay.exists()) {
View Full Code Here

Examples of org.jboss.as.web.deployment.helpers.DeploymentStructure

        Map<String, WebFragmentMetaData> webFragments = warMetaData.getWebFragmentsMetaData();
        if (webFragments == null) {
            webFragments = new HashMap<String, WebFragmentMetaData>();
            warMetaData.setWebFragmentsMetaData(webFragments);
        }
        DeploymentStructure structure = context.getAttachment(DeploymentStructure.ATTACHMENT_KEY);
        assert structure != null;
        assert structure.getEntries() != null;
        for (DeploymentStructure.ClassPathEntry resourceRoot : structure.getEntries()) {
            if (resourceRoot.getRoot().getLowerCaseName().endsWith(".jar")) {
                VirtualFile webFragment = resourceRoot.getRoot().getChild(WEB_FRAGMENT_XML);
                if (webFragment.exists() && webFragment.isFile()) {
                    InputStream is = null;
                    try {
View Full Code Here

Examples of org.jboss.as.web.deployment.helpers.DeploymentStructure

            return;
        }
        final MountHandle mountHandle = context.getAttachment(MountHandle.ATTACHMENT_KEY);
        try {
            final ClassPathEntry[] entries = createResourceRoots(deploymentRoot, mountHandle);
            final DeploymentStructure structure = new DeploymentStructure(entries);
            context.putAttachment(DeploymentStructure.ATTACHMENT_KEY, structure);

            final BatchBuilder builder = context.getBatchBuilder();
            final ServiceName sName = ServiceName.JBOSS.append("deployment", context.getName(), "structure");
            builder.addService(sName, new DeploymentStructureService(structure));
View Full Code Here

Examples of org.jboss.as.web.deployment.helpers.DeploymentStructure

        }
        Map<String, TldMetaData> tlds = new HashMap<String, TldMetaData>();
        tldsMetaData.setTlds(tlds);
        // TLDs are located in WEB-INF or any subdir (except the top level "classes" and "lib")
        // and in JARs from WEB-INF/lib, in META-INF or any subdir
        DeploymentStructure structure = context.getAttachment(DeploymentStructure.ATTACHMENT_KEY);
        assert structure != null;
        assert structure.getEntries() != null;
        for (DeploymentStructure.ClassPathEntry resourceRoot : structure.getEntries()) {
            if (resourceRoot.getRoot().getLowerCaseName().endsWith(".jar")) {
                VirtualFile webFragment = resourceRoot.getRoot().getChild(META_INF);
                if (webFragment.exists() && webFragment.isDirectory()) {
                    processTlds(deploymentRoot, webFragment.getChildren(), tlds);
                }
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.