title: Nexus Repository Issue while uploading artifact using maven command
body: <p>As you have mentioned above I have updated pom like </p>
  
  <pre><code>&lt;distributionManagement&gt;
  
       &lt;repository&gt;
           &lt;id&gt;deployment&lt;/id&gt;
           &lt;name&gt;deployment&lt;/name&gt;
           &lt;url&gt;http://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases&lt;/url&gt;
       &lt;/repository&gt;
  
       &lt;snapshotRepository&gt;
           &lt;id&gt;snapshots&lt;/id&gt;
           &lt;name&gt;Internal Snapshots&lt;/name&gt;
           &lt;url&gt;http://localhost:8080/nexus-webapp-1.9.2/content/repositories/snapshots&lt;/url&gt;
       &lt;/snapshotRepository&gt;
  
  &lt;/distributionManagement&gt;
  </code></pre>
  
  <p>and also changed the <code>settings.xml</code> to something like this</p>
  
  <pre><code>        &lt;server&gt;
              &lt;id&gt;deployment&lt;/id&gt;
              &lt;username&gt;deployment&lt;/username&gt;
              &lt;password&gt;deployment123&lt;/password&gt;
          &lt;/server&gt;
  
          &lt;server&gt;
              &lt;id&gt;snapshots&lt;/id&gt;
              &lt;username&gt;deployment&lt;/username&gt;
              &lt;password&gt;deployment123&lt;/password&gt;
          &lt;/server&gt;
  </code></pre>
  
  <p>But when I'm deploying using the <code>mvn deploy</code> maven command I'm getting an exception like this: </p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project Test: Failed to deploy artifacts: Could not transfer ar
  tifact Test:Test:jar:0.0.1 from deployment (http://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases): Failed to transfer file: http://localhost:8080/nexus-
  webapp-1.9.2/content/repositories/releases/Test/Test/0.0.1/Test-0.0.1.jar. Return code is: 401 -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project Test: F
  ailed to deploy artifacts: Could not transfer artifact Test:Test:jar:0.0.1 from deployment (http://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases): Faile
  d to transfer file: http://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases/Test/Test/0.0.1/Test-0.0.1.jar. Return code is: 401
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
          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:314)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
          at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
          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.MojoExecutionException: Failed to deploy artifacts: Could not transfer artifact Test:Test:jar:0.0.1 from deployment (http://localhost:8
  080/nexus-webapp-1.9.2/content/repositories/releases): Failed to transfer file: http://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases/Test/Test/0.0.1/Tes
  t-0.0.1.jar. Return code is: 401
          at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:189)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
          ... 19 more
  Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact Test:Test:jar:0.0.1 from deployment (ht
  tp://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases): Failed to transfer file: http://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases/Tes
  t/Test/0.0.1/Test-0.0.1.jar. Return code is: 401
          at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:140)
          at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:156)
          ... 21 more
  Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact Test:Test:jar:0.0.1 from deployment (http://localho
  st:8080/nexus-webapp-1.9.2/content/repositories/releases): Failed to transfer file: http://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases/Test/Test/0.0.1
  /Test-0.0.1.jar. **Return code is: 401**
          at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:267)
          at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:334)
          at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:136)
          ... 22 more
  Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact Test:Test:jar:0.0.1 from deployment (http://localhost:8080/nexus-webapp-1.9
  .2/content/repositories/releases): Failed to transfer file: http://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases/Test/Test/0.0.1/Test-0.0.1.jar. Return
  code is: 401
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:858)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:849)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.flush(WagonRepositoryConnector.java:773)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:385)
          at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:241)
          ... 24 more
  **Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://localhost:8080/nexus-webapp-1.9.2/content/repositories/releases/Test/Test/0.0.1
  /Test-0.0.1.jar. Return code is: 401**
          at org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer(LightweightHttpWagon.java:205)
          at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:413)
          at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:392)
          at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:365)
          at org.apache.maven.wagon.StreamWagon.put(StreamWagon.java:163)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:734)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:384)
          ... 25 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/MojoExecutionException
  </code></pre>
  
  <p>Does the deployment UserID and Password not have privileges to upload artifact in nexus using <code>maven deploy</code>? <strong>I'm using Nexus 1.9.2</strong> Does Nexus Professional only have privileges to upload?. Please guide me. </p>