Package org.apache.geronimo.kernel.repository

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


    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


        }
        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

        }
        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

            unzip(context, new JarFile(new File(targetDir, zip)), new URI("sus/" + comp + "/" + name + "/"));
            // Deploy the SU on the component
            // TODO: deploy
            // Add component config as a dependency
            Artifact sl = new Artifact("servicemix-components", comp, (Version) null, "car");
            environment.addDependency(sl, ImportType.ALL);
        }
        // Create the JBI deployment managed object
        Properties props = new Properties();
        props.put("jbiType", "JBIServiceAssembly");
        props.put("name", descriptor.getServiceAssembly().getIdentification().getName());
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

        } 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

        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

        } 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.