title: build.gradle - error deploying artifact
body: <p>I'm having issues with publishing to local nexus maven repository.</p>
  
  <p>I admit, I don't have much experience with using gradle. </p>
  
  <p>I will say that I have tried understanding the documentation and examples that are given through the gradle website (along with a few stackoverflow questions).</p>
  
  <p>I am getting the following error when I try to publish:</p>
  
  <pre><code>Execution failed for task ':publishMavenPublicationToMavenRepository'.
  
  &gt; Failed to publish publication 'maven' to repository 'maven'
     &gt; Error deploying artifact 'com.myproject:myproject-sdk:jar': Error deploying artifact: Resource to deploy not found: File: http://git.site.com:8081/nexus/content/repositories/releases/com/myproject/myproject-sdk/3.0.0/myproject-sdk-3.0.0.jar does not exist
  </code></pre>
  
  <p>the entire build.gradle file looks like this:</p>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'maven-publish'
  apply plugin: 'build-version'
  
  buildscript {
      repositories {
          maven { url "http://git.site.com:8081/nexus/content/groups/public" }
          maven { url 'https://geonet.artifactoryonline.com/geonet/public-releases' }
          mavenCentral()
      }
  
      dependencies {
          classpath 'nz.org.geonet:gradle-build-version-plugin:1.+'
      }
  }
  
  repositories {
      maven {
          url "http://git.site.com:8081/nexus/content/groups/public"
      }
  }
  
  dependencies {
      testCompile group: 'junit', name: 'junit', version: '4.11'
      compile 'com.google.code.gson:gson:2.2.4'
      compile 'commons-codec:commons-codec:1.9'
  }
  
  task sourceJar(type: Jar) {
      from sourceSets.main.allJava
  }
  
  publishing {
      publications {
          maven(MavenPublication) {
              artifactId = 'myproject-sdk'
              groupId = 'com.myproject'
              version '3.0.0'
              from components.java
  
              artifact sourceJar {
                  classifier "sources"
              }
          }
      }
  
      repositories {
          maven {
              // nexus maven credentials
              credentials {
                  username "MY_USERNAME"
                  password ""MY_PASSWORD"
              }
  
              if(version.endsWith('-SNAPSHOT')) {
                  url "http://git.site.com:8081/nexus/content/repositories/snapshots"
              } else {
                  url "http://git.site.com:8081/nexus/content/repositories/releases"
              }
          }
      }
  }
  </code></pre>
  
  <p>I am using Android Studio and this project is a Java project.</p>
  
  <p>I don't understand the message because it says "Resource to deploy not found" and it points to a url at nexus. </p>
  
  <p>I would expect a message like "Resource to deploy not found: File: c:/directory_that_doesn't_exist/whatever.jar"</p>
  
  <p>Additional Information - 
  The gradle tasks listed under 'All tasks' are:</p>
  
  <pre><code>assemble
  build
  buildDependents
  buildNeeded
  check
  classes
  clean
  compileJava
  compileTestJava
  generatePomFileForMavenPublication
  jar
  javadoc
  processResources
  processTestResources
  publish
  publishMavenPublicationToMavenLocal
  publishMavenPublicationToMavenRepository
  publishToMavenLocal
  sourceJar
  test
  testClasses
  </code></pre>