/** * The next build of {@link MavenModuleSet} must have the build number newer than any of the * current module build. */ /*package*/ void updateNextBuildNumber() throws IOException { int next = this.nextBuildNumber; for (MavenModule m : modules.values()) next = Math.max(next, m.getNextBuildNumber()); if (this.nextBuildNumber != next) { this.nextBuildNumber = next; this.saveNextBuildNumber(); } }
/** * Possibly empty list of all disabled modules (if disabled==true) or all enabeld modules (if * disabled==false) */ public List<MavenModule> getDisabledModules(boolean disabled) { if (!disabled && sortedActiveModules != null) return sortedActiveModules; List<MavenModule> r = new ArrayList<MavenModule>(); for (MavenModule m : modules.values()) { if (m.isDisabled() == disabled) r.add(m); } return r; }
protected List<Action> createTransientActions() { List<Action> r = super.createTransientActions(); // Fix for ISSUE-1149 for (MavenModule module : modules.values()) { module.updateTransientActions(); } if (publishers != null) // this method can be loaded from within the onLoad method, where this might be // null for (BuildStep step : publishers) r.addAll(step.getProjectActions(this)); if (buildWrappers != null) for (BuildWrapper step : buildWrappers) r.addAll(step.getProjectActions(this)); return r; }
public MavenModule getRootModule() { if (rootModule == null) return null; return modules.get(rootModule); }
public void logRotate() throws IOException, InterruptedException { super.logRotate(); // perform the log rotation of modules for (MavenModule m : modules.values()) m.logRotate(); }
/** Returns true if there's any disabled module. */ public boolean hasDisabledModule() { for (MavenModule m : modules.values()) { if (m.isDisabled()) return true; } return false; }
/** * Called by {@link MavenModule#doDoDelete(StaplerRequest, StaplerResponse)}. Real deletion is * done by the caller, and this method only adjusts the data structure the parent maintains. */ /*package*/ void onModuleDeleted(MavenModule module) { modules.remove(module.getModuleName()); }
public MavenModule getItem(String name) { return modules.get(ModuleName.fromString(name)); }
public Collection<MavenModule> getItems() { return modules.values(); }