Example #1
0
  /**
   * 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();
    }
  }
Example #2
0
  /**
   * 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;
  }
Example #3
0
  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;
  }
Example #4
0
 public MavenModule getRootModule() {
   if (rootModule == null) return null;
   return modules.get(rootModule);
 }
Example #5
0
 public void logRotate() throws IOException, InterruptedException {
   super.logRotate();
   // perform the log rotation of modules
   for (MavenModule m : modules.values()) m.logRotate();
 }
Example #6
0
 /** Returns true if there's any disabled module. */
 public boolean hasDisabledModule() {
   for (MavenModule m : modules.values()) {
     if (m.isDisabled()) return true;
   }
   return false;
 }
Example #7
0
 /**
  * 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());
 }
Example #8
0
 public MavenModule getItem(String name) {
   return modules.get(ModuleName.fromString(name));
 }
Example #9
0
 public Collection<MavenModule> getItems() {
   return modules.values();
 }