1 37 package net.sourceforge.cruisecontrol.sourcecontrols; 38 39 import java.util.Collections ; 40 import java.util.Date ; 41 import java.util.Hashtable ; 42 import java.util.List ; 43 import java.util.Map ; 44 45 import net.sourceforge.cruisecontrol.CruiseControlException; 46 import net.sourceforge.cruisecontrol.Modification; 47 48 53 public class AlwaysBuild extends FakeUserSourceControl { 54 55 private static final Hashtable EMPTY_HASHTABLE = new Hashtable (); 56 57 public Map getProperties() { 58 return EMPTY_HASHTABLE; 59 } 60 61 public void validate() throws CruiseControlException { 62 63 } 64 65 72 public List getModifications(Date lastBuild, Date now) { 73 Modification mod = new Modification("always"); 74 Modification.ModifiedFile modfile = mod.createModifiedFile("force build", "force build"); 75 modfile.action = "change"; 76 77 mod.userName = getUserName(); 78 mod.modifiedTime = new Date (lastBuild.getTime() + 100); 80 mod.comment = ""; 81 return Collections.singletonList(mod); 82 } 83 84 85 } 86 | Popular Tags |