title: Unable to install a local maven artefact to remote repository, google-android-maps
body: <p>I'm in the process of setting up a Jenkins build environment to build my android projects. For the most part its OK however there are some dependencies that are not available in the central repository, such as the Google Android Maps API, therefore I need to install it to my remote repository manually. I've got these install to my local repo using <code>mvn install</code> and that works fine.</p>
  
  <p>I've done some googling, and have the following configuration so far, but I'm seeing the following errors when I try to deploy the maps jar to my remote repo.</p>
  
  <pre><code>mvn deploy:deploy-file -DgroupId=com.google.android.maps -DartifactId=maps -Dversion=8_r1 -Dpackaging=jar -Dfile=C:\Users\James\.m2\repository\com\google\android\maps\maps\8_r1\maps-8_r1.jar -DrepositoryId=cloudbeesreleases -Durl=https://repository-myusername.forge.cloudbees.com/release/
  </code></pre>
  
  <p>and I see this :</p>
  
  <pre><code>[INFO] Error stacktraces are turned on.
  [INFO] Scanning for projects...
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Maven Stub Project (No POM) 1
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] --- maven-deploy-plugin:2.5:deploy-file (default-cli) @ standalone-pom ---
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 0.450s
  [INFO] Finished at: Sat Feb 18 17:01:06 GMT 2012
  [INFO] Final Memory: 4M/92M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli) on project standalone-pom: Cannot deploy artifact from the local repository: C:\Users\James\.m2\repository\com\google\android\maps\maps\8_r1\maps-8_r1.jar -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli) on project standalone-pom: Cannot deploy artifact from the local repository: C:\Users\James\.m2\repository\com\google\android\maps\maps\8_r1\maps-8_r1.jar
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  Caused by: org.apache.maven.plugin.MojoFailureException: Cannot deploy artifact from the local repository: C:\Users\James\.m2\repository\com\google\android\maps\maps\8_r1\maps-8_r1.jar
      at org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo.java:211)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      ... 19 more
  [ERROR] 
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  </code></pre>
  
  <p>I've got the following in my <code>settings.xml</code></p>
  
  <pre><code>&lt;profiles&gt;
      &lt;profile&gt;
        &lt;id&gt;artifactory&lt;/id&gt;
        &lt;repositories&gt;
          &lt;repository&gt;
            &lt;id&gt;cloudbeesreleases&lt;/id&gt;
            &lt;name&gt;libs-releases&lt;/name&gt;
            &lt;url&gt;https://repository-myusername.forge.cloudbees.com/release/&lt;/url&gt;
            &lt;snapshots&gt;
              &lt;enabled&gt;false&lt;/enabled&gt;
            &lt;/snapshots&gt;
          &lt;/repository&gt;        
        &lt;/repositories&gt;      
      &lt;/profile&gt;
    &lt;/profiles&gt;
    &lt;activeProfiles&gt;
      &lt;activeProfile&gt;artifactory&lt;/activeProfile&gt;
    &lt;/activeProfiles&gt;
  </code></pre>
  
  <p>Have I got something misconfigured, or am I completely misunderstanding how the <code>deploy</code> should work?</p>