public FilePath getRootDir() { return new FilePath(MavenBuild.this.getRootDir()); }
public FilePath getRootDir() { return new FilePath(MavenBuild.this.getRootDir()); }
private void copySourceFilesToModuleBuildFolder(final MavenBuild newBuild) { FilePath filePath = new FilePath(new File(newBuild.getRootDir(), AbstractAnnotation.WORKSPACE_FILES)); try { filePath.copyRecursiveTo("*.tmp", new FilePath(new File(getOwner().getRootDir(), AbstractAnnotation.WORKSPACE_FILES))); } catch (IOException exception) { Logger.getLogger(getClass().getName()).log(Level.SEVERE, "Can't copy workspace files: ", exception); } catch (InterruptedException exception) { // ignore, user canceled the operation } }
private void copySourceFilesToModuleBuildFolder(final MavenBuild newBuild) { FilePath filePath = new FilePath(new File(newBuild.getRootDir(), AbstractAnnotation.WORKSPACE_FILES)); try { filePath.copyRecursiveTo("*.tmp", new FilePath(new File(getOwner().getRootDir(), AbstractAnnotation.WORKSPACE_FILES))); } catch (IOException exception) { Logger.getLogger(getClass().getName()).log(Level.SEVERE, "Can't copy workspace files: ", exception); } catch (InterruptedException exception) { // ignore, user canceled the operation } }
public Boolean call(MavenBuild build) throws IOException { try { CoberturaBuildAction cba = build.getAction(CoberturaBuildAction.class); if (cba == null) { File cvgxml = new File(build.getRootDir(), "coverage.xml"); CoverageResult result = CoberturaCoverageParser.parse(cvgxml, null, new HashSet<String>()); result.setOwner(build); CoberturaBuildAction o = CoberturaBuildAction.load(result, null, null, false, false, false, false, false, false, 0); build.addAction(o); } else { return false; } } catch (NullPointerException e) { return false; } return true; } }
public boolean end(MavenBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { registered = false; FilePath htmlPath = new FilePath( new File(build.getProject().getRootDir(), VIOLATIONS)); FilePath targetPath = new FilePath( new File(build.getRootDir(), VIOLATIONS)); ViolationsReport report = build.getWorkspace().act( new ViolationsCollector(true, targetPath, htmlPath, config)); report.setConfig(config); report.setBuild(build); report.setBuildResult(); ViolationsBuildAction buildAction = getCreateBuildAction(build); buildAction.setReport(report); return true; }
public boolean end(MavenBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { registered = false; FilePath htmlPath = new FilePath( new File(build.getProject().getRootDir(), VIOLATIONS)); FilePath targetPath = new FilePath( new File(build.getRootDir(), VIOLATIONS)); ViolationsReport report = build.getWorkspace().act( new ViolationsCollector(true, targetPath, htmlPath, config)); report.setConfig(config); report.setBuild(build); report.setBuildResult(); ViolationsBuildAction buildAction = getCreateBuildAction(build); buildAction.setReport(report); return true; }
@Override public boolean end(MavenBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { registered = false; FilePath htmlPath = new FilePath(new File(build.getProject().getRootDir(), VIOLATIONS)); FilePath targetPath = new FilePath(new File(build.getRootDir(), VIOLATIONS)); FilePath workspace = build.getWorkspace(); if (workspace == null) { MavenModuleSetBuild parent = build.getModuleSetBuild(); throw new IOException("No workspace for " + build + "; parent workspace: " + (parent != null ? parent.getWorkspace() : "N/A") + "; builtOnStr=" + build.getBuiltOnStr() + "; builtOn=" + build.getBuiltOn()); } ViolationsReport report = workspace.act(new ViolationsCollector(true, targetPath, htmlPath, config)); report.setConfig(config); report.setBuild(build); report.setBuildResult(); ViolationsBuildAction buildAction = getCreateBuildAction(build); buildAction.setReport(report); return true; }