Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8670

MavenBuild does not respect the "alternate settings" value of its parent MavenModuleSetBuild

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      So the logic used to prepare the arguments for executing Maven are very similar between MavenBuild and MavenModuleSetBuild. I'm unsure why they don't share a common source? There's one glaring difference for me that is causing trouble and that's lack of support for the "alternate settings" attribute when running a MavenBuild directly (by going into the Modules of a Maven build and running a module directly.)

      From MavenModuleSetBuild
                              if (project.getAlternateSettings() != null) {
                                  if (IOUtils.isAbsolute(project.getAlternateSettings())) {
                                      margs.add("-s").add(project.getAlternateSettings());
                                  } else {
                                      FilePath mrSettings = getModuleRoot().child(project.getAlternateSettings());
                                      FilePath wsSettings = getWorkspace().child(project.getAlternateSettings());
                                      if (!wsSettings.exists() && mrSettings.exists())
                                          wsSettings = mrSettings;
                                      
                                      margs.add("-s").add(wsSettings.getRemote());
                                  }
                              }
      

      I'm putting a patch together for this on Github and will update the issue when it's complete.

        Attachments

          Activity

            People

            • Assignee:
              kphonik Jason Stiefel
              Reporter:
              kphonik Jason Stiefel
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: