title: Build steps: "invoke ant" vs. "running ant from shell"
body: <p>I am currently using jenkins to deploy an application under intended release conditions, and I'm being forced to run JUnit tests on the deployed system as root user (since the application has certain files that are only accessible by the root only).  </p>
  
  <p>Instead of using the "invoke ant" build step to run the tests, I am running ant using sudo from the "execute shell" build step, something like...</p>
  
  <pre><code>sudo ant -file build.xml -D.... test
  </code></pre>
  
  <p>since the jenkins user has the neccesary root permissions to do this but not acccess the files mentioned above.</p>
  
  <p>I realize that doing this creates some folders in the workspace with the wrong permissions, but I correct this after from "execute shell".</p>
  
  <p>Everything seems to wok alright but it feels like a bit of a workaround. </p>
  
  <p>My question then, is there any disadvantage of running ant in this manner compared to the build step "invoke ant"?...or can anyone see a better way of doing this?</p>