public String getDisplayName() { return mavenBuild.getProject().getDisplayName(); }
public String getDisplayName() { return mavenBuild.getProject().getDisplayName(); }
public String getDisplayName() { return mavenBuild.getProject().getDisplayName(); }
@Override public boolean end(MavenBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { //Discard unneeded test result objects so they can't waste memory for(MavenReporter reporter: build.getProject().getReporters()) { if(reporter instanceof SurefireArchiver) { SurefireArchiver surefireReporter = (SurefireArchiver) reporter; if(surefireReporter.result != null) { surefireReporter.result = null; } } } return true; }
private MavenModuleSet getModuleSet(AbstractBuild<?,?> build) { if (build instanceof MavenBuild) { MavenBuild m2Build = (MavenBuild) build; MavenModule mm = m2Build.getProject(); MavenModuleSet mmSet = mm.getParent(); return mmSet; } else if (build instanceof MavenModuleSetBuild) { MavenModuleSetBuild m2moduleSetBuild = (MavenModuleSetBuild) build; MavenModuleSet mmSet = m2moduleSetBuild.getProject(); return mmSet; } else { return null; } }
public String getMavenOpts(TaskListener listener, EnvVars envVars) { return envVars.expand(expandTokens(listener, getProject().getParent().getMavenOpts())); }
@Override public void run() { execute(new MavenBuildExecution()); getProject().updateTransientActions(); MavenModuleSetBuild parentBuild = getModuleSetBuild(); if(parentBuild!=null) parentBuild.notifyModuleBuild(this); }
@Override public void run() { run(new RunnerImpl()); getProject().updateTransientActions(); MavenModuleSetBuild parentBuild = getModuleSetBuild(); if(parentBuild!=null) parentBuild.notifyModuleBuild(this); }
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 protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws InterruptedException, IOException { return wsl.allocate(getModuleSetBuild().getModuleRoot().child(getProject().getRelativePath())); }
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; }
String moduleFsName = newBuild.getProject().getModuleName().toFileSystemName(); Util.createSymlink(getRootDir(), "../../modules/"+ moduleFsName +"/builds/"+newBuild.getId() /*ugly!*/,
/** * Called whenever a new module build is completed, to update the aggregated * report. When multiple builds complete simultaneously, Hudson serializes * the execution of this method, so this method needs not be * concurrency-safe. * * @param moduleBuilds * Same as <tt>MavenModuleSet.getModuleBuilds()</tt> but provided * for convenience and efficiency. * @param newBuild * Newly completed build. */ public void update(final Map<MavenModule, List<MavenBuild>> moduleBuilds, final MavenBuild newBuild) { MavenResultAction<T> additionalAction = newBuild.getAction(getIndividualActionType()); MavenModule project = newBuild.getProject(); if (additionalAction != null && !getModules().contains(project)) { T existingResult = delegate.getResult(); T additionalResult = additionalAction.getResult(); if (newBuild.getResult().isBetterThan(Result.FAILURE) || additionalResult.getPluginResult().isWorseOrEqualTo(Result.FAILURE)) { getModules().add(project); setResult(createAggregatedResult(existingResult, additionalResult)); copySourceFilesToModuleBuildFolder(newBuild); } } }
String moduleFsName = newBuild.getProject().getModuleName().toFileSystemName(); Util.createSymlink(getRootDir(), "../../modules/"+ moduleFsName +"/builds/"+newBuild.getId() /*ugly!*/,
/** * Called whenever a new module build is completed, to update the aggregated * report. When multiple builds complete simultaneously, Jenkins serializes * the execution of this method, so this method needs not be * concurrency-safe. * * @param moduleBuilds * Same as <tt>MavenModuleSet.getModuleBuilds()</tt> but provided * for convenience and efficiency. * @param newBuild * Newly completed build. */ @Override public void update(final Map<MavenModule, List<MavenBuild>> moduleBuilds, final MavenBuild newBuild) { MavenResultAction<T> additionalAction = newBuild.getAction(getIndividualActionType()); MavenModule project = newBuild.getProject(); if (additionalAction != null && !getModules().contains(project)) { T existingResult = delegate.getResult(); T additionalResult = additionalAction.getResult(); if (newBuild.getResult().isBetterThan(Result.FAILURE) || additionalResult.getPluginResult().isWorseOrEqualTo(Result.FAILURE)) { getModules().add(project); setResult(createAggregatedResult(existingResult, additionalResult)); copySourceFilesToModuleBuildFolder(newBuild); } } }
protected Result doRun(BuildListener listener) throws Exception { reporters = getProject().createReporters(); MavenModuleSet mms = getProject().getParent(); if(debug) listener.getLogger().println("Reporters="+reporters); MavenInstallation mvn = getProject().getParent().getMaven(); margs.addTokenized(getProject().getGoals());