title: Gradle ant task for SCP does not pick properties from gradle.properties
body: <p>I created a gradle ant task based on example from [<a href="http://mrhaki.blogspot.in/2009/12/gradle-goodness-using-optional-ant-task.html]" rel="nofollow noreferrer">http://mrhaki.blogspot.in/2009/12/gradle-goodness-using-optional-ant-task.html]</a></p>
  
  <p>Below is the example code that works for me: </p>
  
  <pre><code>ant.scp(
     todir: 'myUserid:myPasswd@servername:/home/myUserid',
     trust:"true",
     verbose: 'true'
  ) {
     fileset(dir: 'work') {
        include(name: '**/**')
     }
  }   
  </code></pre>
  
  <p>For the todir: instead of <code>myUserid:myPasswd@servername:/home/myUserid</code> I used the following properties defined in gradle.properties file <code>"${remoteUser}:${remoteUserPasswd}@${remoteSSHMachine}:${remoteLocation}"</code></p>
  
  <p>This gives me an error</p>
  
  <pre><code>* What went wrong:
  A problem occurred evaluating script.
  &gt; com.jcraft.jsch.JSchException: java.net.UnknownHostException: ${remoteSSHMachine}
  </code></pre>
  
  <p>remoteSSHMachine = server is already defined in the gradle.properties file so I'm not sure why  java.net.UnknownHostException exception should occur.</p>
  
  <p>Amy help in this regard is appreciated. </p>