Package org.apache.geronimo.kernel.repository

Examples of org.apache.geronimo.kernel.repository.ArtifactResolver


    }

    private EARContext createEARContext(File outputPath, Environment environment, ListableRepository repository, ConfigurationStore configStore, AbstractName moduleName) throws DeploymentException {
        Set repositories = repository == null ? Collections.EMPTY_SET : Collections.singleton(repository);
        ArtifactManager artifactManager = new DefaultArtifactManager();
        ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, repository);
        return new EARContext(outputPath,
                null,
                environment,
                ConfigurationModuleType.WAR,
                naming,
View Full Code Here


        System.setProperty("org.apache.cxf.nofastinfoset", "true");

        String repository = System.getProperty("Xorg.apache.geronimo.repository.boot.path", "repository");
        Maven2Repository bootRepository = new Maven2Repository(new File(geronimoHome, repository));
        Collection<Repository> repositories = Collections.<Repository>singleton(bootRepository);
        ArtifactResolver artifactResolver = new DefaultArtifactResolver(new DefaultArtifactManager(), bootRepository);
        RepositoryConfigurationStore repositoryStore = new RepositoryConfigurationStore(bootRepository);
        Collection<ConfigurationStore> repositoryStores = Collections.<ConfigurationStore>singleton(repositoryStore);
        SimpleConfigurationManager manager = new SimpleConfigurationManager(repositoryStores, artifactResolver, repositories);
       
        Artifact id = Artifact.create(CONFIG_ID);
        id = artifactResolver.queryArtifact(id);
        manager.loadConfiguration(id);
       
        Configuration config = manager.getConfiguration(id);
               
        // set context classloader
View Full Code Here

        AbstractName abstractName = Configuration.getConfigurationAbstractName(configId);
        GBeanData gbeanData = new GBeanData(abstractName, Configuration.class);
        gbeanData.setAttribute("configurationData", configurationData);

        Collection repositories = null;
        ArtifactResolver artifactResolver = null;
        if (enableBootRepo) {
            String repository = System.getProperty("Xorg.apache.geronimo.repository.boot.path", "repository");
            Maven2Repository bootRepository = new Maven2Repository(new File(getBootDirectory(), repository));
            repositories = Collections.singleton(bootRepository);
            artifactResolver = new DefaultArtifactResolver(new DefaultArtifactManager(), bootRepository);
View Full Code Here

    private EARContext createEARContext(File outputPath, Environment environment, Repository repository, ConfigurationStore configStore, AbstractName moduleName) throws DeploymentException {
        Set repositories = repository == null ? Collections.EMPTY_SET : Collections.singleton(repository);
        Set configurationManagers = configurationManager == null ? Collections.EMPTY_SET : Collections.singleton(configurationManager);
        ArtifactManager artifactManager = new DefaultArtifactManager();
        ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, repositories, null, configurationManagers);
        return new EARContext(outputPath,
                null,
                environment,
                ConfigurationModuleType.WAR,
                naming,
View Full Code Here

        tmpbasedir.delete();
        tmpbasedir.mkdirs();
        environment.setConfigId(configID);
        Jsr77Naming naming = new Jsr77Naming();
        ArtifactManager artifactManager = new DefaultArtifactManager();
        ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, null);
        ConfigurationManager configurationManager = new SimpleConfigurationManager(Collections.EMPTY_SET, artifactResolver, Collections.EMPTY_SET, bundleContext);
        AbstractName moduleName = naming.createRootName(configID, "testejb", NameFactory.EJB_MODULE);
        context = new DeploymentContext(tmpbasedir, null, environment, moduleName, ConfigurationModuleType.CAR, naming, configurationManager, bundleContext);

        File moduleLocation = new File(tmpbasedir, "ejb");
View Full Code Here

                    bundleContext);
            configBuilder.doStart();
            ConfigurationData configData = null;
            DeploymentContext context = null;
            ArtifactManager artifactManager = new DefaultArtifactManager();
            ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, repository);

            try {
                File planFile = new File(BASEDIR, "src/test/resources/data/external-application-plan.xml");
                ModuleIDBuilder idBuilder = new ModuleIDBuilder();
                Object plan = configBuilder.getDeploymentPlan(planFile, rarFile, idBuilder);
View Full Code Here

        AbstractName abstractName = Configuration.getConfigurationAbstractName(configId);
        GBeanData gbeanData = new GBeanData(abstractName, Configuration.GBEAN_INFO);
        gbeanData.setAttribute("configurationData", configurationData);
       
        Collection repositories = null;
        ArtifactResolver artifactResolver = null;
        if (enableBootRepo) {
            String repository = System.getProperty("Xorg.apache.geronimo.repository.boot.path", "repository");
            Maven2Repository bootRepository = new Maven2Repository(new File(getBootDirectory(), repository));
            repositories = Collections.singleton(bootRepository);
            artifactResolver = new DefaultArtifactResolver(new DefaultArtifactManager(), bootRepository);
View Full Code Here

                    null);
            configBuilder.doStart();
            ConfigurationData configData = null;
            DeploymentContext context = null;
            ArtifactManager artifactManager = new DefaultArtifactManager();
            ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, Collections.singleton(repository), null);

            try {
                File planFile = new File(BASEDIR, "src/test/data/data/external-application-plan.xml");
                ModuleIDBuilder idBuilder = new ModuleIDBuilder();
                Object plan = configBuilder.getDeploymentPlan(planFile, rarFile, idBuilder);
View Full Code Here

        AbstractName abstractName = Configuration.getConfigurationAbstractName(configId);
        GBeanData gbeanData = new GBeanData(abstractName, Configuration.class);
        gbeanData.setAttribute("configurationData", configurationData);

        Collection repositories = null;
        ArtifactResolver artifactResolver = null;
        if (enableBootRepo) {
            String repository = System.getProperty("Xorg.apache.geronimo.repository.boot.path", "repository");
            Maven2Repository bootRepository = new Maven2Repository(new File(getBootDirectory(), repository));
            repositories = Collections.singleton(bootRepository);
            artifactResolver = new DefaultArtifactResolver(new DefaultArtifactManager(), bootRepository);
View Full Code Here

                return configurationDir;
            }
        };

        ArtifactManager artifactManager = new DefaultArtifactManager();
        ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, repository);

        Object config = builder.getDeploymentPlan(plan, null, new ModuleIDBuilder());

        DeploymentContext context = builder.buildConfiguration(
                false,
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.repository.ArtifactResolver

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.