Package org.apache.geronimo.deployment.xbeans

Examples of org.apache.geronimo.deployment.xbeans.EnvironmentType


    }

    public void testConstructPlan() throws Exception {
        GerWebAppDocument tomcatWebAppDoc = GerWebAppDocument.Factory.newInstance();
        GerWebAppType tomcatWebAppType = tomcatWebAppDoc.addNewWebApp();
        EnvironmentType environmentType = tomcatWebAppType.addNewEnvironment();
        ArtifactType artifactType = environmentType.addNewModuleId();
        artifactType.setArtifactId("foo");

        GerResourceRefType ref = tomcatWebAppType.addNewResourceRef();
        ref.setRefName("ref");
        ref.setResourceLink("target");
View Full Code Here


        Deployable deployable = new DeployableBundle(bundle);
        // parse vendor dd
        JettyWebAppType jettyWebApp = getJettyWebApp(null, deployable, standAlone, targetPath, webApp);

        EnvironmentType environmentType = jettyWebApp.getEnvironment();
        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);

        if (webApp.getDistributable().size() == 1) {
            clusteringBuilders.buildEnvironment(jettyWebApp, environment);
        }
View Full Code Here

        // parse vendor dd
        boolean standAlone = earEnvironment == null;
        JettyWebAppType jettyWebApp = getJettyWebApp(plan, deployable, standAlone, targetPath, webApp);
        contextRoot = getContextRoot(jettyWebApp, contextRoot, webApp, standAlone, moduleFile, targetPath);

        EnvironmentType environmentType = jettyWebApp.getEnvironment();
        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);

        if (webApp.getDistributable().size() == 1) {
            clusteringBuilders.buildEnvironment(jettyWebApp, environment);
        }
View Full Code Here

        XmlBeansUtil.validateDD(webApp);
        log.debug(webApp.toString());
    }

    private void addEnvironment(JettyWebAppType webApp) {
        EnvironmentType environmentType = webApp.addNewEnvironment();
        ArtifactType configId = environmentType.addNewModuleId();
        configId.setGroupId("g");
        configId.setArtifactId("a");
        configId.setVersion("1");
        configId.setType("car");
    }
View Full Code Here

   
    private XmlObject actionGeneratePlan(PortletRequest request, RealmData data) {
        normalize(data);
        ModuleDocument doc = ModuleDocument.Factory.newInstance();
        ModuleType root = doc.addNewModule();
        EnvironmentType environment = root.addNewEnvironment();
        ArtifactType configId = environment.addNewModuleId();
        configId.setGroupId("console.realm");
        String artifactId = getArtifactId(data.getName());
       
        configId.setArtifactId(artifactId);
        configId.setVersion("1.0");
        configId.setType("car");

        // Parent

        DependenciesType dependenciesType = environment.addNewDependencies();
        ArtifactType parent = dependenciesType.addNewDependency();
        parent.setGroupId("org.apache.geronimo.framework");
        parent.setArtifactId("j2ee-security");
        parent.setType("car");
        // Dependencies
View Full Code Here

            }
        } catch (XmlException e) {
            throw new DeploymentException(e);
        }

        EnvironmentType environmentType = gerApplication.getEnvironment();
        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
        idBuilder.resolve(environment, earFile == null ? planFile.getName() : new File(earFile.getName()).getName(), "ear");
        // Make this EAR's settings the default for child modules
        idBuilder.setDefaultGroup(environment.getConfigId().getGroupId());
        idBuilder.setDefaultVersion(environment.getConfigId().getVersion());
View Full Code Here

    }

    private GerApplicationType createDefaultPlan(Application application, JarFile module) {
        // construct the empty geronimo-application.xml
        GerApplicationType gerApplication = GerApplicationType.Factory.newInstance();
        EnvironmentType environmentType = gerApplication.addNewEnvironment();
        ArtifactType artifactType = environmentType.addNewModuleId();

        artifactType.setGroupId(Artifact.DEFAULT_GROUP_ID);

        // set the configId
        String id = application != null ? application.getId() : null;
View Full Code Here

        Deployable deployable = new DeployableBundle(bundle);
        // parse vendor dd
        TomcatWebAppType tomcatWebApp = getTomcatWebApp(null, deployable, standAlone, targetPath, webApp);

        EnvironmentType environmentType = tomcatWebApp.getEnvironment();
        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);

        if (webApp.getDistributable().size() == 1) {
            clusteringBuilders.buildEnvironment(tomcatWebApp, environment);
        }
View Full Code Here

        // parse vendor dd
        boolean standAlone = earEnvironment == null;
        TomcatWebAppType tomcatWebApp = getTomcatWebApp(plan, deployable, standAlone, targetPath, webApp);
        contextRoot = getContextRoot(tomcatWebApp, contextRoot, webApp, standAlone, moduleFile, targetPath);

        EnvironmentType environmentType = tomcatWebApp.getEnvironment();
        Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);

        if (webApp.getDistributable().size() == 1) {
            clusteringBuilders.buildEnvironment(tomcatWebApp, environment);
        }
View Full Code Here

    private XmlObject actionGeneratePlan(PortletRequest request, RealmData data) {
        normalize(data);
        ModuleDocument doc = ModuleDocument.Factory.newInstance();
        ModuleType root = doc.addNewModule();
        EnvironmentType environment = root.addNewEnvironment();
        ArtifactType configId = environment.addNewModuleId();
        configId.setGroupId("console.realm");
        String artifactId = data.getName();
        if(artifactId.indexOf('/') != -1) {
            // slash in artifact-id results in invalid configuration-id and leads to deployment errors.
            // Note: 0x002F = '/'
            artifactId = artifactId.replaceAll("/", "%2F");
        }
        configId.setArtifactId(artifactId);
        configId.setVersion("1.0");
        configId.setType("car");

        // Parent

        DependenciesType dependenciesType = environment.addNewDependencies();
        ArtifactType parent = dependenciesType.addNewDependency();
        parent.setGroupId("org.apache.geronimo.configs");
        parent.setArtifactId("j2ee-security");
        parent.setType("car");
        // Dependencies
View Full Code Here

TOP

Related Classes of org.apache.geronimo.deployment.xbeans.EnvironmentType

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.