/**
  * Adds all buid steps to the list of build steps.
  *
  * @param source build step.
  * @param list list of build steps.
  */
 private static void addTo(
     List<? extends Descriptor<? extends BuildStep>> source,
     List<Descriptor<? extends BuildStep>> list) {
   for (Descriptor<? extends BuildStep> d : source) {
     if (d instanceof BuildStepDescriptor) {
       BuildStepDescriptor<?> bsd = (BuildStepDescriptor<?>) d;
       if (bsd.isApplicable(FreeStyleProject.class)) {
         list.add(d);
       }
     }
   }
 }
Example #2
0
  protected void submit(StaplerRequest req, StaplerResponse rsp)
      throws IOException, ServletException, FormException {
    super.submit(req, rsp);
    JSONObject json = req.getSubmittedForm();

    rootPOM = Util.fixEmpty(req.getParameter("rootPOM").trim());
    if (rootPOM != null && rootPOM.equals("pom.xml")) rootPOM = null; // normalization

    goals = Util.fixEmpty(req.getParameter("goals").trim());
    alternateSettings = Util.fixEmpty(req.getParameter("alternateSettings").trim());
    mavenOpts = Util.fixEmpty(req.getParameter("mavenOpts").trim());
    mavenName = req.getParameter("maven_version");
    aggregatorStyleBuild = !req.hasParameter("maven.perModuleBuild");
    usePrivateRepository = req.hasParameter("maven.usePrivateRepository");
    ignoreUpstremChanges = !json.has("triggerByDependency");
    incrementalBuild = req.hasParameter("maven.incrementalBuild");
    archivingDisabled = req.hasParameter("maven.archivingDisabled");

    reporters.rebuild(req, json, MavenReporters.getConfigurableList());
    publishers.rebuild(req, json, BuildStepDescriptor.filter(Publisher.all(), this.getClass()));
    buildWrappers.rebuild(req, json, BuildWrappers.getFor(this));
  }
Example #3
0
 public static List<Descriptor<Publisher>> getPublisherDescriptors(AbstractProject<?, ?> project) {
   return BuildStepDescriptor.filter(Publisher.all(), project.getClass());
 }