Package org.apache.geronimo.kernel.repository

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


        } 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


        } 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

        }
        SharedLibraryList[] slList = descriptor.getComponent().getSharedLibraries();
        if (slList != null) {
            for (int i = 0; i < slList.length; i++) {
                Artifact sl = new Artifact("servicemix-libraries", slList[i].getName(), slList[i].getVersion(), "car");
                environment.addDependency(sl, ImportType.CLASSES);
            }
        }
        if (descriptor.getComponent().getComponentClassPath() != null) {
            String[] pathElements = descriptor.getComponent().getComponentClassPath().getPathElements();
            if (pathElements != null) {
View Full Code Here

            String comp = sus[i].getTarget().getComponentName();
            URI installUri = new URI("sus/" + comp + "/" + name + "/");
            unzip(context, new JarFile(new File(targetDir, zip)), installUri);
            // Add component config as a dependency
            Artifact sl = new Artifact("servicemix-components", comp, "0.0", "car");
            environment.addDependency(sl, ImportType.ALL);
             // Deploy the SU on the component
             Component jbiServiceUnit = null;
             try {
                 jbiServiceUnit = getAssociatedJbiServiceUnit(comp, sl);
             } catch (GBeanNotFoundException e) {
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

   
    public void testTransformDependencies() throws Exception {
        startVerification();
       
        Environment environment = configurationData.getEnvironment();
        environment.addDependency(new Dependency(new Artifact("group", "artifactToRemove", "1.0", "jar"), ImportType.ALL));

        transformer.transformDependencies(configurationData);
       
        List<Dependency> newDependencies = environment.getDependencies();
        assertEquals(1, newDependencies.size());
View Full Code Here

            }

            if (environmentType.getDependencies() != null) {
                for (DependencyType dependencyType : environmentType.getDependencies().getDependency()) {
                    Dependency dependency = toDependency(dependencyType);
                    environment.addDependency(dependency);
                }
            }
           
            environment.setBundleActivator(environmentType.getBundleActivator());
            environment.addToBundleClassPath(environmentType.getBundleClassPath());
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

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.