@Override public FileData copy(String srcName, FileData destData) throws IOException { File srcFile = new File(root, srcName); String destName = destData.getName(); File destFile = new File(root, destName); FileUtils.copy(srcFile, destFile); return getFileData(destFile); }
@Override public FileData copy(String srcName, FileData destData) throws IOException { File srcFile = new File(root, srcName); String destName = destData.getName(); File destFile = new File(root, destName); FileUtils.copy(srcFile, destFile); return getFileData(destFile); }
protected void makeWebInfPath() throws IOException { String targetFolder = web_inf_path; String classes_target = targetFolder + "/classes"; String lib_target = targetFolder + "/lib"; String cp = System.getProperty("java.class.path"); String[] tokens = StringTool.tokenize(cp, File.pathSeparator); log("Making WEB-INF..."); for (int i = 0; i < tokens.length; i++) { if (tokens[i].matches(web_inf_exclude) && !tokens[i].matches(web_inf_include)) { continue; } log(tokens[i]); File f = new File(tokens[i]); if (f.isDirectory()) { FileUtils.copy(f, new File(classes_target)); } else { FileUtils.copy(f, new File(lib_target)); } } }
protected void makeWebInfPath() throws IOException { String targetFolder = web_inf_path; String classes_target = targetFolder + "/classes"; String lib_target = targetFolder + "/lib"; String cp = System.getProperty("java.class.path"); String[] tokens = StringTool.tokenize(cp, File.pathSeparator); log("Making WEB-INF..."); for (int i = 0; i < tokens.length; i++) { if (tokens[i].matches(web_inf_exclude) && !tokens[i].matches(web_inf_include)) { continue; } log(tokens[i]); File f = new File(tokens[i]); if (f.isDirectory()) { FileUtils.copy(f, new File(classes_target)); } else { FileUtils.copy(f, new File(lib_target)); } } }
throw new IOException("Cannot move directory: " + src + " to a subdirectory of itself: " + dest); copy(src, dest); delete(src); if (src.exists()) {
throw new IOException("Cannot move directory: " + src + " to a subdirectory of itself: " + dest); copy(src, dest); delete(src); if (src.exists()) {
private Summary runAllTests(String sourcePath, boolean hasDependencies) throws IOException, RulesInstantiationException, ProjectResolvingException, ClassNotFoundException { String path = sourcePath; if (testSourceDirectory.isDirectory() && !CollectionUtils.isEmpty(testSourceDirectory.list())) { File destination = new File(workspaceFolder, project.getArtifactId()); debug("Destination path: ", destination.getPath()); info("Copying main OpenL sources to workspace..."); FileUtils.copy(new File(sourcePath), destination); info("Copying test OpenL sources to workspace..."); FileUtils.copy(testSourceDirectory, destination); try { path = destination.getCanonicalPath(); } catch (Exception e) { warn("The path to OpenL directory in workspace cannot be converted to canonical form."); path = destination.getPath(); } } return singleModuleMode ? executeModuleByModule(path, hasDependencies) : executeAllAtOnce(path, hasDependencies); }
private Summary runAllTests(String sourcePath, boolean hasDependencies) throws IOException, RulesInstantiationException, ProjectResolvingException, ClassNotFoundException { String path = sourcePath; if (testSourceDirectory.isDirectory() && !CollectionUtils.isEmpty(testSourceDirectory.list())) { File destination = new File(workspaceFolder, project.getArtifactId()); debug("Destination path: ", destination.getPath()); info("Copying main OpenL sources to workspace..."); FileUtils.copy(new File(sourcePath), destination); info("Copying test OpenL sources to workspace..."); FileUtils.copy(testSourceDirectory, destination); try { path = destination.getCanonicalPath(); } catch (Exception e) { warn("The path to OpenL directory in workspace cannot be converted to canonical form."); path = destination.getPath(); } } return singleModuleMode ? executeModuleByModule(path, hasDependencies) : executeAllAtOnce(path, hasDependencies); }
File outputFile = new File(projectFolder, path); try { FileUtils.copy(inputFile, outputFile); } catch (IOException e) { if (log.isErrorEnabled()) {
File outputFile = new File(projectFolder, path); try { FileUtils.copy(inputFile, outputFile); } catch (IOException e) { if (log.isErrorEnabled()) {