Package com.basistech.m2e.code.quality.shared

Examples of com.basistech.m2e.code.quality.shared.ConfigurationException


        log.debug("entering copyUrlResourceToProject");
        Preconditions.checkNotNull(resc);
        Preconditions.checkNotNull(newLocation);
        final URL urlResc = this.resourceResolver.resolveLocation(resc);
        if (urlResc == null) {
            throw new ConfigurationException(String.format("[%s]: could not locate resource [%s]", LOG_PREFIX, resc));
        }
        // copy the file to new location
        final File newLocationFile = new File(this.project.getLocationURI().getPath(), newLocation);
        try {
            FileUtils.copyStreamToFile(new URLInputStreamFacade(urlResc), newLocationFile);
        } catch (IOException ex) {
            throw new ConfigurationException(String.format("[%s]: could not copy resource [%s] to [%s], reason [%s]",
                LOG_PREFIX, resc, newLocationFile, ex.getLocalizedMessage()));
        }
    }
View Full Code Here

TOP

Related Classes of com.basistech.m2e.code.quality.shared.ConfigurationException

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.