Пример #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();
    }
  }
Пример #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;
  }
Пример #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;
  }
Пример #4
0
 public MavenModule getRootModule() {
   if (rootModule == null) return null;
   return modules.get(rootModule);
 }
Пример #5
0
 public void logRotate() throws IOException, InterruptedException {
   super.logRotate();
   // perform the log rotation of modules
   for (MavenModule m : modules.values()) m.logRotate();
 }
Пример #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;
 }
Пример #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());
 }
Пример #8
0
 public MavenModule getItem(String name) {
   return modules.get(ModuleName.fromString(name));
 }
Пример #9
0
 public Collection<MavenModule> getItems() {
   return modules.values();
 }