Package org.apache.geronimo.kernel.repository

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


    protected void setUp() throws Exception {
        Kernel kernel = (Kernel) mock(Kernel.class);
       
        ManageableAttributeStore attributeStore = (ManageableAttributeStore) mock(ManageableAttributeStore.class);
        PersistentConfigurationList configurationList = (PersistentConfigurationList) mock(PersistentConfigurationList.class);
        ArtifactManager artifactManager = (ArtifactManager) mock(ArtifactManager.class);
        ArtifactResolver artifactResolver = (ArtifactResolver) mock(ArtifactResolver.class);
       
        storeA = (ConfigurationStore) mock(ConfigurationStore.class, "ConfigurationStoreA");
        storeB = (ConfigurationStore) mock(ConfigurationStore.class, "ConfigurationStoreB");
       
View Full Code Here


        GBeanData artifactManagerData = buildGBeanData("name", "ArtifactManager", DefaultArtifactManager.GBEAN_INFO);
        kernel.loadGBean(artifactManagerData, getClass().getClassLoader());
        kernel.startGBean(artifactManagerData.getAbstractName());
        assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(artifactManagerData.getAbstractName()));
        ArtifactManager artifactManager = (ArtifactManager) kernel.getGBean(artifactManagerData.getAbstractName());

        ListableRepository testRepository = new MockRepository(configurations.keySet());
        DefaultArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, testRepository);

        artifact1 = new Artifact("test", "1", "1.1", "bar");
View Full Code Here

    protected void setUp() throws Exception {
        Kernel kernel = (Kernel) mock(Kernel.class);
       
        ManageableAttributeStore attributeStore = (ManageableAttributeStore) mock(ManageableAttributeStore.class);
        PersistentConfigurationList configurationList = (PersistentConfigurationList) mock(PersistentConfigurationList.class);
        ArtifactManager artifactManager = (ArtifactManager) mock(ArtifactManager.class);
        ArtifactResolver artifactResolver = (ArtifactResolver) mock(ArtifactResolver.class);
       
        storeA = (ConfigurationStore) mock(ConfigurationStore.class, "ConfigurationStoreA");
        storeB = (ConfigurationStore) mock(ConfigurationStore.class, "ConfigurationStoreB");
       
View Full Code Here

        GBeanData artifactManagerData = buildGBeanData("name", "ArtifactManager", DefaultArtifactManager.GBEAN_INFO);
        kernel.loadGBean(artifactManagerData, bundleContext);
        kernel.startGBean(artifactManagerData.getAbstractName());
        assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(artifactManagerData.getAbstractName()));
        ArtifactManager artifactManager = (ArtifactManager) kernel.getGBean(artifactManagerData.getAbstractName());


        artifact1 = new Artifact("test", "1", "1.1", "bar");
        artifact2 = new Artifact("test", "2", "2.2", "bar");
        artifact3 = new Artifact("test", "3", "3.3", "bar");
View Full Code Here

                                String installedPluginsList,
                                Collection<? extends ServerInstanceData> serverInstanceDatas,
                                PluginRepositoryList pluginRepositoryList,
                                final Kernel kernel,
                                final BundleContext bundleContext) throws Exception {
        final ArtifactManager artifactManager = new DefaultArtifactManager();

        forceMkdir(new File(targetServerPath));
        serverInfo = new BasicServerInfo(targetServerPath, false, null);
        File targetRepositoryFile = serverInfo.resolve(targetRepositoryPath);
        forceMkdir(targetRepositoryFile);
View Full Code Here

        loadHistory();
    }

    public PluginInstallerGBean pluginInstallerCopy(String serverName, Kernel kernel) throws Exception {
        ServerInfo newServerInfo = new BasicServerInfo(serverInfo.getCurrentBaseDirectory(), serverName);
        final ArtifactManager artifactManager = new DefaultArtifactManager();
        ConfigurationManager configManager = buildConfigurationManager(artifactManager, writeableRepo, kernel, configStore, bundleContext, servers);
//        ArrayList<ServerInstanceData> serverInstanceDatasCopy = new ArrayList<ServerInstanceData>(serverInstanceDatas.size());
//        for (ServerInstanceData serverInstance: serverInstanceDatas) {
//            if (serverInstance instanceof ReferenceServerInstanceData) {
//                serverInstance = new ServerInstanceData(serverInstance);
View Full Code Here

            repo.put(Artifact.create("geronimo/foo2/DEV/jar"), file);
            repo.put(Artifact.create("geronimo/foo3/DEV/car"), file);
            repo.put(Artifact.create("geronimo/foo4/DEV/car"), file);

            ListableRepository mockRepository = new MockRepository(repo);
            ArtifactManager artifactManager = new DefaultArtifactManager();
            ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, mockRepository);
            ConfigurationManager configurationManager = new SimpleConfigurationManager(Collections.EMPTY_SET, artifactResolver, Collections.EMPTY_SET, bundleContext);
            bundleContext.setConfigurationManager(configurationManager);
            AbstractName moduleName = naming.createRootName(environment.getConfigId(), "foo", "bar");
            DeploymentContext context = new DeploymentContext(outFile, null, environment, moduleName, ConfigurationModuleType.CAR, naming, configurationManager, Collections.<Repository>singleton(mockRepository), bundleContext);
View Full Code Here

                configurationDir.mkdirs();
                return configurationDir;
            }
        };

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

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

        DeploymentContext context = builder.buildConfiguration(
View Full Code Here

                    null,
                    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();
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,
View Full Code Here

TOP

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

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.