Package org.apache.geronimo.kernel.repository

Examples of org.apache.geronimo.kernel.repository.Environment.addDependency()


        }

        {
            Environment e3newer = new Environment();
            e3newer.setConfigId(artifact3NoVersion);
            e3newer.addDependency(new Artifact("test", "2", (Version) null, "bar"), ImportType.ALL);
            ConfigurationData configurationData3newer = new ConfigurationData(e3newer, kernel.getNaming());
            gbean3newer = configurationData3newer.addGBean("gbean3", TestBean.getGBeanInfo()).getAbstractName();
            configStore.install(configurationData3newer);
            configurations.put(artifact3NoVersion, configurationData3newer);
        }
View Full Code Here


            }

            if (environmentType.getDependencies() != null) {
                for (DependencyType dependencyType : environmentType.getDependencies().getDependency()) {
                    Dependency dependency = toDependency(dependencyType);
                    environment.addDependency(dependency);
                }
            }

            environment.setSuppressDefaultEnvironment(environmentType.isSuppressDefaultEnvironment());
View Full Code Here

        contextPath = "/test-path";
        addedGBeanData = new HashMap<AbstractName, GBeanData>();
       
        Environment defaultEnvironment = new Environment();
        dependencyToMerge = new Artifact("groupId", "artifactToMergeId", "2.0", "car");
        defaultEnvironment.addDependency(new Dependency(dependencyToMerge, ImportType.ALL));
        builder = new MockedEnvironment(1,
                2,
                3,
                backingStrategyFactoryQuery,
                clusterNameQuery,
View Full Code Here

   
    public void testBuiltEnvironmentDoesNotContainArtifactToRemove() throws Exception {
        XmlObject container = newContainer("testBuiltGBeans");

        Environment environment = new Environment();
        environment.addDependency(new Dependency(new Artifact(artifactToRemove.getGroupId(),
                artifactToRemove.getArtifactId(),
                "2.0",
                artifactToRemove.getType()), ImportType.ALL));
        builder.buildEnvironment(container, environment);
       
View Full Code Here

        gbean1 = configurationData1.addGBean("gbean1", TestBean.getGBeanInfo()).getAbstractName();
        configurations.put(artifact1, configurationData1);

        Environment e2 = new Environment();
        e2.setConfigId(artifact2);
        e2.addDependency(new Artifact("test", "1", (Version) null, "bar"), ImportType.ALL);
        ConfigurationData configurationData2 = new ConfigurationData(e2, kernel.getNaming());
        gbean2 = configurationData2.addGBean("gbean2", TestBean.getGBeanInfo()).getAbstractName();
        configStore.install(configurationData2);
        configurations.put(artifact2, configurationData2);
View Full Code Here

        configurations.put(artifact2, configurationData2);

        { // Make it obvious if these temp variables are reused
            Environment e3 = new Environment();
            e3.setConfigId(artifact3);
            e3.addDependency(new Artifact("test", "2", (Version) null, "bar"), ImportType.ALL);
            ConfigurationData configurationData3 = new ConfigurationData(e3, kernel.getNaming());
            gbean3 = configurationData3.addGBean("gbean3", TestBean.getGBeanInfo()).getAbstractName();
            configStore.install(configurationData3);
            configurations.put(artifact3, configurationData3);
        }
View Full Code Here

        }

        {
            Environment e3newer = new Environment();
            e3newer.setConfigId(artifact3NoVersion);
            e3newer.addDependency(new Artifact("test", "2", (Version) null, "bar"), ImportType.ALL);
            ConfigurationData configurationData3newer = new ConfigurationData(e3newer, kernel.getNaming());
            gbean3newer = configurationData3newer.addGBean("gbean3", TestBean.getGBeanInfo()).getAbstractName();
            configStore.install(configurationData3newer);
            configurations.put(artifact3NoVersion, configurationData3newer);
        }
View Full Code Here

        } else {
            Environment environment = module.getEnvironment();
            Artifact earConfigId = earContext.getConfigID();
            Artifact configId = new Artifact(earConfigId.getGroupId(), earConfigId.getArtifactId() + "_" + module.getTargetPath(), earConfigId.getVersion(), "car");
            environment.setConfigId(configId);
            environment.addDependency(earConfigId, ImportType.ALL);
            File configurationDir = new File(earContext.getBaseDir(), module.getTargetPath());
            configurationDir.mkdirs();
            // construct the web app deployment context... this is the same class used by the ear context
            try {
                File inPlaceConfigurationDir = null;
View Full Code Here

    private static void insertEnvironment(Artifact configId, Artifact parentId, XmlCursor cursor, QName environmentQname, boolean suppressDefaultEnvironment) {
        positionEnvironment(cursor);
        Environment environment = new Environment();
        environment.setConfigId(configId);
        if (parentId != null) {
            environment.addDependency(parentId, ImportType.ALL);
        }
        environment.setSuppressDefaultEnvironment(suppressDefaultEnvironment);
        extractDependencies(cursor, environment);
        EnvironmentType environmentType = EnvironmentBuilder.buildEnvironmentType(environment);
        cursor.beginElement(environmentQname);
View Full Code Here

        } else {
            Environment environment = module.getEnvironment();
            Artifact earConfigId = earContext.getConfigID();
            Artifact configId = new Artifact(earConfigId.getGroupId(), earConfigId.getArtifactId() + "_" + module.getTargetPath(), earConfigId.getVersion(), "car");
            environment.setConfigId(configId);
            environment.addDependency(earConfigId, ImportType.ALL);
            File configurationDir = new File(earContext.getBaseDir(), module.getTargetPath());
            configurationDir.mkdirs();

            // construct the web app deployment context... this is the same class used by the ear context
            try {
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.