title: Perform a maven deploy-file with gradle
body: <p>I need to deploy an external zip file to my private maven repository. This file will content my application version release, internally the archive will content the file structure of my application with jars, dlls, configs, exes...</p>
  
  <p>How can I perform a maven deploy:deploy-file using gradle?</p>
  
  <pre><code>mvn deploy:deploy-file 
  -DgroupId=acme 
  -DartifactId=acme 
  -Dversion=1.0 
  -Dpackaging=jar 
  -Dfile=C:\tmp\acme-1.0.jar 
  -DrepositoryId=Nexus 
  -Durl=http://myserver:8888/nexus/content/repositories/thirdparty/
  </code></pre>
  
  <p>I'm trying this to publish an external zip file to my maven repository:</p>
  
  <pre><code>apply plugin: "base"
  apply plugin: "maven"
  apply plugin: "maven-publish"
  
  publishing {
      def host = "myhost"
      def url = "http://$host/content/repositories/releases"
      def group = "package"
      def artifact = "name"
      def version = "0.0.1"
      def file = "c:/my.zip"
  
      publications {
          mavenJava(MavenPublication) {
              create('zip', MavenPublication) {
                  groupId "$group"
                  artifactId "$artifact"
                  version "$version"
                  artifact file("$file")
              }       
          }
      }
      repositories {
          maven {
              credentials {
                  username 'user'
                  password 'pwd'
              }
              url "$url"
          }
      }
  }
  
  publish.dependsOn build
  </code></pre>
  
  <p>But when it execute, I get this exception:</p>
  
  <pre><code>FAILURE: Build failed with an exception.
  
  * Where:
  Build file 'c:\xxxx\build.gradle' line: 18
  
  * What went wrong:
  A problem occurred configuring root project 'XXXXX'.
  &gt; Exception thrown while executing model rule: PublishingPlugin.Rules#publishing(ExtensionContainer)
     &gt; No signature of method: java.lang.String.call() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [0.0.1]
  Possible solutions: wait(), any(), wait(long), any(groovy.lang.Closure), take(int), each(groovy.lang.Closure)
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  BUILD FAILED
  </code></pre>