title: Gradle Copy task says no source
body: <p>I have this Gradle script as deploy.gradle(Gradle 4.3.1):</p>
  
  <pre><code>defaultTasks 'echoProp'
  import org.apache.tools.ant.filters.ReplaceTokens
  
  task copyWar(type: Copy) {
      from "${source}"
      into "${target}"
      include '*.war'
  }
  
  task echoProp(dependsOn: copyWar) &lt;&lt; {
      println "source dir: ${source}"
      println "target dir: ${target}"
      println "source = ${project.property('source')}"
      def currentJvm = org.gradle.internal.jvm.Jvm.current()
      println currentJvm
  }
  </code></pre>
  
  <p>This is the rough output:</p>
  
  <pre><code>                                        The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
      at deploy_13e4yjnom30svmprt2wccq4te.run(E:\environments\GRADLE_TEST\TEST\TESTDEPLOY\source\71\deploy.gradle:10)
      (Run with --stacktrace to get the full stack trace of this deprecation warning.)
  :copyWar NO-SOURCE
  :echoProp
  source dir: E:/environments/GRADLE_TEST/TEST/TESTDEPLOY/source/71
  target dir: E:/environments/GRADLE_TEST/TEST/TESTDEPLOY/target
  source = E:/environments/GRADLE_TEST/TEST/TESTDEPLOY/source/71
  1.8.0_31 (Oracle Corporation 25.31-b07)
  
  BUILD SUCCESSFUL in 1s
  1 actionable task: 1 executed
  </code></pre>
  
  <p>This runs on a Windows Server 2012 R2 machine. I checked and there is a .war file in the defined source directory.</p>
  
  <p>I can't figure out why it doesn't copy over the testApp.war file. I mean, the Source Directory are defined just fine by the other task, but why can't the copyWar task find these files?</p>
  
  <hr>
  
  <p>Result of removing the &lt;&lt; and running with the --info flag:</p>
  
  <pre><code>Initialized native services in: C:\Windows\System32\config\systemprofile\.gradle\native
  The client will now receive all logging from the daemon (pid: 5580). The daemon log file: C:\Windows\System32\config\systemprofile\.gradle\daemon\4.3.1\daemon-5580.out.log
  Starting 19th build in daemon [uptime: 1 hrs 14 mins 1.715 secs, performance: 98%, no major garbage collections]
  Using 2 worker leases.
  Creating new cache for fileHashes, path E:\environments\GRADLE_TEST\TEST\TESTDEPLOY\source\72\.gradle\4.3.1\fileHashes\fileHashes.bin, access org.gradle.cache.internal.DefaultCacheAccess@6e59e113
  Creating new cache for plugin-use-metadata, path C:\Windows\System32\config\systemprofile\.gradle\caches\4.3.1\plugin-resolution\plugin-use-metadata.bin, access org.gradle.cache.internal.DefaultCacheAccess@4092835c
  Creating new cache for client-status, path C:\Windows\System32\config\systemprofile\.gradle\caches\4.3.1\plugin-resolution\client-status.bin, access org.gradle.cache.internal.DefaultCacheAccess@4092835c
  Starting Build
  Settings evaluated using settings file.
  Projects loaded. Root project using build file 'E:\environments\GRADLE_TEST\TEST\TESTDEPLOY\source\72\deploy.gradle'.
  Included projects: [root project '72']
  Evaluating root project '72' using build file 'E:\environments\GRADLE_TEST\TEST\TESTDEPLOY\source\72\deploy.gradle'.
  Compiling build file 'E:\environments\GRADLE_TEST\TEST\TESTDEPLOY\source\72\deploy.gradle' using SubsetScriptTransformer.
  Compiling build file 'E:\environments\GRADLE_TEST\TEST\TESTDEPLOY\source\72\deploy.gradle' using BuildScriptTransformer.
  source dir: file tree
  target dir: E:/environments/GRADLE_TEST/TEST/TESTDEPLOY/target
  source dir: E:/environments/GRADLE_TEST/TEST/TESTDEPLOY/source/72
  target dir: E:/environments/GRADLE_TEST/TEST/TESTDEPLOY/target
  source = E:/environments/GRADLE_TEST/TEST/TESTDEPLOY/source/72
  1.8.0_31 (Oracle Corporation 25.31-b07)
  All projects evaluated.
  No tasks specified. Using project default tasks 'echoProp'
  Selected primary task 'echoProp' from project :
  Tasks to be executed: [task ':copyWar', task ':echoProp']
  Creating new cache for resourceHashesCache, path E:\environments\GRADLE_TEST\TEST\TESTDEPLOY\source\72\.gradle\4.3.1\fileHashes\resourceHashesCache.bin, access org.gradle.cache.internal.DefaultCacheAccess@6e59e113
  Creating new cache for taskHistory, path E:\environments\GRADLE_TEST\TEST\TESTDEPLOY\source\72\.gradle\4.3.1\taskHistory\taskHistory.bin, access org.gradle.cache.internal.DefaultCacheAccess@1e64a7a6
  Creating new cache for outputFiles, path E:\environments\GRADLE_TEST\TEST\TESTDEPLOY\source\72\.gradle\buildOutputCleanup\outputFiles.bin, access org.gradle.cache.internal.DefaultCacheAccess@4faa606d
  :copyWar (Thread[Daemon worker Thread 15,5,main]) started.
  :copyWar
  Putting task artifact state for task ':copyWar' into context took 0.0 secs.
  Skipping task ':copyWar' as it has no source files and no previous output files.
  :copyWar NO-SOURCE
  :copyWar (Thread[Daemon worker Thread 15,5,main]) completed. Took 0.002 secs.
  :echoProp (Thread[Daemon worker Thread 15,5,main]) started.
  :echoProp
  Skipping task ':echoProp' as it has no actions.
  :echoProp UP-TO-DATE
  :echoProp (Thread[Daemon worker Thread 15,5,main]) completed. Took 0.004 secs.
  </code></pre>
  
  <p>also, the source and target variables from my Gradle.properties:</p>
  
  <pre><code>source=E\:/environments/GRADLE_TEST/TEST/TESTDEPLOY/source/72
  target=E\:/environments/GRADLE_TEST/TEST/TESTDEPLOY/target
  </code></pre>
  
  <p>I'm completely new to Gradle, so I'm not sure what this all means.</p>