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

Maven steps enable deprecated injectBuildVariables option

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • job-dsl-plugin
    • None

      From maven-integration-plugin:

      Inject build variables

      Pass all build variables into maven process in form of java properties. This is seldom needed as Jenkins provides it as environment variables anyway. Preferred way to access Jenkins build variables is to explicitly map it to property in Properties section (MY_VAR=${MY_VAR}).

      The DSL Maven step enables this by default. There is no direct way to disable it, one has to go with

      				maven{
      // ...
      					configure { it / injectBuildVariables << false }
      				}

      It would be great to change the default to false,but this will break backwards compatibility.
      If above is not possible at least adding a direct property/method would be nice so that it can be disabled by

      				maven{
      // ...
      					injectBuildVariables false 
      				}

            daspilker Daniel Spilker
            jbochenski Jakub Bochenski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: