Upload ear with scp

Hello All maybe there are changes in gradle 2.0 which I am not aware of.

I want upload a generated ear file to a application server on a remote machine. I don’t want to use the default upload task as we have an artifactory server in place where we deploy the artifact to.

I want to have special tasks:

apply plugin: 'ear'
  task uploadToJBoss7(type: Upload) {
 repositories.mavenDeployer {
                configuration = configurations.archives
  repository(url: "scp://myServer/deployments") {
   authentication(userName: "admin", password: "pw")

This gives me the error: No such property: archives for class: org.gradle.api.internal.artifacts.dsl.DefaultArtifactHandler

Is there a way to upload the ear artifact with a custom task?

Thanks for your help