提交 b218180c 编写于 作者: K kohsuke

added one more color state to distinguish a build state.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4749 71c3de6d-444a-0410-be80-ed276b4c234a
上级 ef82bbe8
......@@ -3,13 +3,7 @@ package hudson.maven;
import hudson.FilePath;
import hudson.Util;
import hudson.maven.agent.AbortException;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.BuildListener;
import hudson.model.DependencyGraph;
import hudson.model.Hudson;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.*;
import hudson.remoting.Channel;
import hudson.scm.ChangeLogSet;
import hudson.scm.ChangeLogSet.Entry;
......@@ -21,22 +15,8 @@ import org.apache.maven.lifecycle.LifecycleExecutionException;
import org.apache.maven.monitor.event.EventDispatcher;
import org.apache.maven.project.MavenProject;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Date;
import java.io.*;
import java.util.*;
/**
* {@link Run} for {@link MavenModule}.
......@@ -293,7 +273,7 @@ public class MavenBuild extends AbstractBuild<MavenModule,MavenBuild> {
run(new Runner() {
public Result run(BuildListener listener) {
listener.getLogger().println("Build failed before it gets to this module");
return Result.ABORTED;
return Result.NOT_BUILT;
}
public void post(BuildListener listener) {
......
......@@ -78,6 +78,9 @@ public final class MavenModuleSetBuild extends AbstractBuild<MavenModuleSet,Mave
if(r==null)
r = br;
else
if(br==Result.NOT_BUILT)
continue; // UGLY: when computing combined status, ignore the modules that were not built
else
if(br!=null)
r = r.combine(br);
}
......
......@@ -24,10 +24,17 @@ public final class Result implements Serializable, CustomExportedBean {
* The build had a fatal error.
*/
public static final Result FAILURE = new Result("FAILURE",BallColor.RED,2);
/**
* The module was not built.
* <p>
* This status code is used in a multi-stage build (like maven2)
* where a problem in earlier stage prevented later stages from building.
*/
public static final Result NOT_BUILT = new Result("NOT_BUILT",BallColor.GREY,3);
/**
* The build was manually aborted.
*/
public static final Result ABORTED = new Result("ABORTED",BallColor.GREY,3);
public static final Result ABORTED = new Result("ABORTED",BallColor.GREY,4);
private final String name;
......@@ -91,7 +98,7 @@ public final class Result implements Serializable, CustomExportedBean {
private static final long serialVersionUID = 1L;
private static final Result[] all = new Result[] {SUCCESS,UNSTABLE,FAILURE,ABORTED};
private static final Result[] all = new Result[] {SUCCESS,UNSTABLE,FAILURE,NOT_BUILT,ABORTED};
public static final Converter conv = new AbstractBasicConverter () {
public boolean canConvert(Class clazz) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册