Package bear.task

Examples of bear.task.BearException


        return addRaw(format, false, args);
    }

    public CommandLine<T, SCRIPT> addRaw(String format, boolean force, String... args) {
        if(format.contains("rm ") && !force){
            throw new BearException("rm in raw mode is forbidden. Use rmLine(...) or rm(...) to avoid deleting system libs.");
        }
        strings.add(new CommandLineOperator(String.format(format, args)));
        return this;
    }
View Full Code Here


        return addRaw(format, false, args);
    }

    public CommandLine<T, SCRIPT> addRaw(String format, boolean force, String... args) {
        if(format.contains("rm ") && !force){
            throw new BearException("rm in raw mode is forbidden. Use rmLine(...) or rm(...) to avoid deleting system libs.");
        }
        strings.add(new CommandLineOperator(String.format(format, args)));
        return this;
    }
View Full Code Here

        String pendingPath = $(releases.pendingReleasePath);

        CommandLineResult<?> result = $.sys.mkdirs(pendingPath).run();

        if(result.isErrorOf(PermissionsException.class)){
            throw new BearException("releases plugin: unable to create a pending directory, did you run project.setup()?");
        }

        PendingRelease release;

        if(!branchInfo.isPresent() || !vcsLogInfo.isPresent()){
View Full Code Here

        DownloadResult downloadResult = download(Collections.singletonList(path), new File(global.localCtx.var(getBear().tempDirPath)));

        if(!downloadResult.ok()){
            if(THROW_ON_ERROR.equals(_default)){
                throw downloadResult.exception.isPresent() ?
                    new BearException("unable to download: " + path, downloadResult.exception.get()) :
                    new BearException("unable to download: " + path);
            }else{
                return _default;
            }
        }
View Full Code Here

        logger.info("downloading {} files to {} from {}", paths.size(),
            destParentDir.getAbsolutePath(), remotePlugin.name);

        if(!destParentDir.exists()){
            if(!destParentDir.mkdirs()){
                throw new BearException("unable to create dir: " + destParentDir);
            }
        }

        checkConnection();
View Full Code Here

TOP

Related Classes of bear.task.BearException

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.