title: How to copy file in gradle?
body: <p>I'm trying to deploy war archive into Tomcat. Here is a build script I've written:</p>
  
  <pre><code>apply plugin : 'war'
  
  task deploy (dependsOn: war){
      copy {
          from "build/libs"
          into "E:/apache-tomcat-8.0.14/webapps"
          include "*.war"
      }
  }
  </code></pre>
  
  <p>But it has no effect. There is no <code>war</code> in the root of <code>webapps</code>. Gradle output:</p>
  
  <pre><code>:compileJava UP-TO-DATE
  :processResources UP-TO-DATE
  :classes UP-TO-DATE
  :war
  :deploy
  </code></pre>
  
  <p>What's wrong?</p>
  
  <p>Please don't suggest me any tomcat-cargo plugin in order to do that. I just want to know how to fix that particular file-copying task.</p>