As of 1.4, the Ant plugin isn't setting PATH+ANT so the Pipeline tool step (and things building on that step, like Declarative's tools directive) don't get Ant automatically added to the PATH. That should be fixed.

          [JENKINS-42382] AntInstallation not setting PATH+ANT

          Andrew Bayer added a comment -

          Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/ant-plugin/pull/26

          Jesse Glick added a comment -

          tool does not currently do anything with environment variables, so I suppose this affects only Declarative.

          Jesse Glick added a comment - tool does not currently do anything with environment variables, so I suppose this affects only Declarative.

          Jesse Glick added a comment -

          Jesse Glick added a comment - Cf. JENKINS-28718 .

          Andrew Bayer added a comment -

          Oh rrriiiight - I forgot that I had to write up Declarative-specific logic for the env var stuff. Sorry!

          Andrew Bayer added a comment - Oh rrriiiight - I forgot that I had to write up Declarative-specific logic for the env var stuff. Sorry!

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          src/main/java/hudson/tasks/Ant.java
          http://jenkins-ci.org/commit/ant-plugin/27ec2ff4dae68ceeaeba9d558f154e4767e5e3eb
          Log:
          [FIXED JENKINS-42382] Add PATH+ANT to buildEnvVars(...)

          This ensures that Ant's bin directory ends up on the PATH when using
          the Pipeline tool step. Note that Jenkins' environment variable
          management will handle converting "/bin" on Windows if needed, we do
          not need to do that explicitly.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/hudson/tasks/Ant.java http://jenkins-ci.org/commit/ant-plugin/27ec2ff4dae68ceeaeba9d558f154e4767e5e3eb Log: [FIXED JENKINS-42382] Add PATH+ANT to buildEnvVars(...) This ensures that Ant's bin directory ends up on the PATH when using the Pipeline tool step. Note that Jenkins' environment variable management will handle converting "/bin" on Windows if needed, we do not need to do that explicitly.

            abayer Andrew Bayer
            abayer Andrew Bayer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: