Package com.cloudbees.sdk

Examples of com.cloudbees.sdk.GAV


            if (forceInstall())
                installFactory.setForceInstall(true);
            if (localrepo != null)
                installFactory.setLocalRepository(localrepo);
            installFactory.setBeesClientConfiguration(getBeesClientBase().getBeesClientConfiguration());
            GAV gav = new GAV(getArtifact());
            if (pom != null && jar != null) {
                gav = installFactory.install(gav, jar, pom);
            } else
                gav = installFactory.install(gav);
            System.out.println("Plugin installed: " + gav);
View Full Code Here


            if (!Helper.promptMatches("Are you sure you want to delete this plugin [" + name + "]: (y/n) ", "[yY].*")) {
                return true;
            }
        }
        CommandServiceImpl service = (CommandServiceImpl) commandService;
        GAV gav = service.deletePlugin(name);
        if (gav != null) {
            System.out.println("Plugin deleted: " + gav);
        } else {
            System.out.println("Plugin not found: " + name);
        }
View Full Code Here

            System.out.println();
            System.out.println("Plugin: " + plugin.getArtifact());
            String help = service.getHelp(plugin, "subcommands:", true);
            System.out.println(help);
            if (check()) {
                GAV gav = new GAV(plugin.getArtifact());
                return checkVersion(gav);
            }
        } else {
            throw new IOException("Plugin not found: " + name);
        }
View Full Code Here

                if (force == null || !force.booleanValue()) {
                    System.out.println();
                    install = Helper.promptMatches("Do you want to install the latest version [" + newestVersion + "]: (y/n) ", "[yY].*");
                }
                System.out.println();
                GAV newGAV = new GAV(gav.groupId, gav.artifactId, newestVersion.toString());
                if (install) {
                    ACommand installPluginCmd = commandService.getCommand(Bees.SDK_PLUGIN_INSTALL);
                    System.out.println("Installing plugin: " + newGAV);
                    installPluginCmd.run(Arrays.asList(Bees.SDK_PLUGIN_INSTALL, newGAV.toString()));
                } else {
                    System.out.println("You can install the latest version with:");
                    System.out.println("> bees " + Bees.SDK_PLUGIN_INSTALL + " " + newGAV.toString());
                }
            } else {
                System.out.println("The latest version is already installed");
            }
        } catch (Exception e) {
View Full Code Here

        String name = getPluginName();
        Plugin plugin = service.getPlugin(name);
        if (plugin != null) {
            System.out.println();
            System.out.println("Plugin: " + plugin.getArtifact());
            GAV gav = new GAV(plugin.getArtifact());
            GAV gav1 = new GAV(gav.groupId, gav.artifactId, getPluginVersion());
            setArtifact(gav1.toString());
            return super.execute();
        } else {
            throw new IOException("Plugin not found: " + name);
        }
    }
View Full Code Here

    }

    private static GAV getMAIN() {
        String version = System.getProperty("bees.driverVersion");
        if (version != null)
            return new GAV("com.cloudbees.sdk", "bees-driver", version);
        else
            return MAIN;
    }
View Full Code Here

            protected File resolveArtifact(Artifact a) throws ArtifactResolutionException {
                return getRepositoryService().resolveArtifact(a).getArtifact().getFile();
            }
        };

        List<File> jars= cache.resolve(new GAV("com.cloudbees.sdk", "bees-driver", "LATEST"));

        File tools = findToolsJar();
        if (tools != nulljars.add(tools);

        // we don't let this classloader delegate to the 2nd stage boot classloader
View Full Code Here

public abstract class PersistedGAVStore extends PersistedStore<GAV> {
    protected GAV read(File f) {
        try {
            BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(f),"UTF-8"));
            try {
                GAV data = null;
                String line;
                while ((line=r.readLine())!=null) {
                    line = line.trim();
                    if (line.startsWith("#") || line.length()==0)
                        continue;   // skip comment line
                    if (data!=null)
                        throw new IllegalArgumentException(f+" contains multiple entries");
                    try {
                        data = new GAV(line);
                    } catch (Exception e) {
                        throw new IllegalArgumentException("Failed to parse "+line+" in "+f,e);
                    }
                }
                return data;
View Full Code Here

    }

    private static GAV getMAIN() {
        String version = System.getProperty("bees.driverVersion");
        if (version != null)
            return new GAV("com.cloudbees.sdk", "bees-driver", version);
        else
            return MAIN;
    }
View Full Code Here

TOP

Related Classes of com.cloudbees.sdk.GAV

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.