Package com.cloudbees.sdk

Examples of com.cloudbees.sdk.ArtifactInstallFactory


    @Override
    protected boolean execute() throws Exception {
        // install the artifact
        try {
            ArtifactInstallFactory installFactory = artifactInstallFactoryProvider.get();
            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);
        } catch (Exception e) {
            throw (IOException) new IOException("Failed to install " + getArtifact()).initCause(e);
        }
        return true;
View Full Code Here


    }

    protected boolean checkVersion(GAV gav) throws Exception {
        try {
            System.out.println(String.format("Checking [%s] for newer version...", gav));
            ArtifactInstallFactory installFactory = artifactInstallFactoryProvider.get();
            if (localrepo != null)
                installFactory.setLocalRepository(localrepo);

            VersionRangeResult rangeResult = installFactory.findVersions(gav);
            Version newestVersion = rangeResult.getHighestVersion();

            VersionNumber currentVersion = new VersionNumber(gav.version);
            VersionNumber availableVersion = new VersionNumber(newestVersion.toString());
View Full Code Here

TOP

Related Classes of com.cloudbees.sdk.ArtifactInstallFactory

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.