title: How to replace variables in build.xml of ant project in Jenkins pipeline?
body: <p>I have <code>java</code> project, based on <code>ant</code>. In my <code>build.xml</code> file i have <code>${build}</code> variable. So, if I am starting script manually, something like this:</p>
  
  <pre><code>BUILD_NUMBER="22"
  sed -i "s/\${build}/$BUILD_NUMBER/g" /path/to/my/jenkinsworkspace/build.xml
  </code></pre>
  
  <p>it works.
  But if i am using this
  <code>sed -i "s/\${build}/$BUILD_NUMBER/g" ${WORKSPACE}/build.xml</code>
  in my Jenkins-pipeline in the build-step, it does not work, i have error.</p>
  
  <pre><code>&gt; Replace needed variables ...
  [Pipeline] sh
  + sed -i s//6/g /path/to/my/jenkinsworkspace/build.xml
  sed: -e expression #1, char 0: no previous regular expression
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] stage
  </code></pre>
  
  <p>So, the question, how to change <code>${build}</code> in the <code>build.xml</code> with <code>${BUILD_NUMBER}</code> from my Jenkins-job ?</p>