Package org.apache.geronimo.kernel.repository

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


                return false;
            }
            if (artifact == null) {
                return true;
            }
            Artifact otherArtifact = info.getArtifact();
            return artifact.matches(otherArtifact);
        } catch (NullPointerException e) {
            e.printStackTrace();
            return false;
        }
View Full Code Here


            return false;
        }
        if (artifact == null) {
            return true;
        }
        Artifact otherArtifact = info.getArtifact();
        return artifact.matches(otherArtifact);
    }
View Full Code Here

        basedir.delete();
        basedir.mkdirs();
        try {
            basedir.deleteOnExit();
            Environment environment = new Environment();
            Artifact configId = new Artifact("foo", "artifact", "1", "car");
            environment.setConfigId(configId);
            ArtifactManager artifactManager = new DefaultArtifactManager();
            ArtifactResolver artifactResolver = new DefaultArtifactResolver(artifactManager, Collections.EMPTY_SET, null);
            SimpleConfigurationManager configurationManager = new SimpleConfigurationManager(Collections.EMPTY_SET, artifactResolver, Collections.EMPTY_SET);
            DeploymentContext context = new DeploymentContext(basedir, null, environment, null, ConfigurationModuleType.CAR, new Jsr77Naming(), configurationManager, Collections.EMPTY_SET);
View Full Code Here

    }
   
    public int execute(ClientCLParser parser) {
        log.info("Client startup begun");
        try {
            Artifact configuration = Artifact.create(parser.getApplicationClientConfiguration());
            return startClient(configuration, parser.getApplicationClientArgs());
        } catch (Exception e) {
            ExceptionUtil.trimStackTrace(e);
            e.printStackTrace();
            return 2;
View Full Code Here

        return true;
    }

    public long getDeploymentTime(File file, String configId) {
        try {
            Artifact art = configManager.getArtifactResolver().resolveInClassLoader(Artifact.create(configId));
            Configuration config = configManager.getConfiguration(art);
            return config.getCreated();
        } catch (MissingDependencyException e) {
            log.error("Unknown configuration "+configId);
            return -1;
View Full Code Here

        }
        synchronized(files) {
            for (Iterator it = files.keySet().iterator(); it.hasNext();) {
                String path = (String) it.next();
                FileInfo info = (FileInfo) files.get(path);
                Artifact target = Artifact.create(info.getConfigId());
                if(id.matches(target)) { // need to remove record & delete file
                    File file = new File(path);
                    if(file.exists()) { // if not, probably it's deletion kicked off this whole process
                        log.info("Hot deployer deleting "+id);
                        if(!IOUtil.recursiveDelete(file)) {
View Full Code Here

            RemoteDeployUtil.uploadFilesToServer(args, progress);
        }
        Set<AbstractName> set = kernel.listGBeans(new AbstractNameQuery(PluginInstaller.class.getName()));
        for (AbstractName name : set) {
            PluginInstaller installer = (PluginInstaller) kernel.getProxyManager().createProxy(name, PluginInstaller.class);
            Artifact artifact = installer.installLibrary(libFile, groupId);
            kernel.getProxyManager().destroyProxy(installer);
            return artifact;
        }
        return null;
    }
View Full Code Here

                long start = System.currentTimeMillis();
                DownloadResults results = showProgress(consoleReader, mgr, key);
                int time = (int)(System.currentTimeMillis() - start) / 1000;
                printResults(consoleReader, results, time);           
                if(results.isFinished() && !results.isFailed() && results.getInstalledConfigIDs().size() == 1) {
                    Artifact target = results.getInstalledConfigIDs().get(0);
                    consoleReader.printString(DeployUtils.reformat("Now starting "+target+"...", 4, 72));
                    consoleReader.flushConsole();
                    new CommandStart().execute(consoleReader, connection, new BaseCommandArgs(new String[]{target.toString()}));
                }
            } catch (IOException e) {
                throw new DeploymentException("Cannot install plugin", e);
            }
        } else {
View Full Code Here

                        String version = pattern.getVersion();
                        String type = pattern.getType();
                        String module = pattern.getModule();
                        String name = pattern.getName();

                        Artifact referenceArtifact = null;
                        if (artifactId != null) {
                            referenceArtifact = new Artifact(groupId, artifactId, version, type);
                        }
                        Map<String, String> nameMap = new HashMap<String, String>();
                        if (module != null) {
                            nameMap.put("module", module);
                        }
View Full Code Here

        DeploymentManager dmgr = connection.getDeploymentManager();
        if(dmgr instanceof GeronimoDeploymentManager) {
            GeronimoDeploymentManager mgr = (GeronimoDeploymentManager) dmgr;
            String groupId = installLibraryCommandArgs.getGroupId();
            try {
                Artifact artifact = mgr.installLibrary(libFile, groupId);
                if(artifact != null) {
                    consoleReader.printString(DeployUtils.reformat("Installed "+artifact, 4, 72));
                } else {
                    throw new DeploymentException("Unable to install library "+installLibraryCommandArgs.getArgs()[0]);
                }
View Full Code Here

TOP

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

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.