org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-1.jar. Return code is: 401

Sonatype JIRA | Oleg Tsvinev | 6 years ago
  1. 0

    I cannot deploy snapshot. Double-checked settings.xml and pom.xml and able to login to oss.sonatype.org. There I can see dnsjava under staging repository. All seems to be fine but I'm getting 401: org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-1.jar. Return code is: 401 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 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:592) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Error deploying artifact: Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-1.jar. Return code is: 401 at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:195) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error deploying artifact: Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-1.jar. Return code is: 401 at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:121) at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:173) ... 19 more Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-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.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:317) at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:227) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:107) ... 20 more

    Sonatype JIRA | 6 years ago | Oleg Tsvinev
    org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-1.jar. Return code is: 401
  2. 0

    I cannot deploy snapshot. Double-checked settings.xml and pom.xml and able to login to oss.sonatype.org. There I can see dnsjava under staging repository. All seems to be fine but I'm getting 401: org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-1.jar. Return code is: 401 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 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:592) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Error deploying artifact: Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-1.jar. Return code is: 401 at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:195) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error deploying artifact: Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-1.jar. Return code is: 401 at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:121) at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:173) ... 19 more Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-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.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:317) at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:227) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:107) ... 20 more

    Sonatype JIRA | 6 years ago | Oleg Tsvinev
    org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-1.jar. Return code is: 401
  3. 0

    mvn deploy: Resource to deploy not found

    Stack Overflow | 2 years ago | Dreamer
    org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Resource to deploy not found: File: http://maven.myRepo/artifactory/my-release-local/com/app/myApp/my-dependencies/this-dependency0.0.1-/dependency-0.0.1.jar does not exist
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    problem with mvn deploy (Ant, Maven and Build Tools forum at JavaRanch)

    coderanch.com | 11 months ago
    org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: http://snapshots.jboss.org/maven2/com.mycompany.app/jars/my-app-1.0-20091014.091039-1.jar. Re turn code is: 405
  6. 0

    As per https://issues.sonatype.org/browse/OSSRH-1063 I should be able to deploy on the sonatype repository new snapshots and releases of the jaitools project. I did add the necessary information to my settings.xml file but it appears that is not enough, I get a 401 trying to deploy: {panel} [INFO] ------------------------------------------------------------------------ [INFO] Building JAI-tools [INFO] task-segment: [deploy] [INFO] ------------------------------------------------------------------------ [INFO] [site:attach-descriptor {execution: default-attach-descriptor}] [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: default}] [INFO] [javadoc:jar {execution: default}] [INFO] Not executing Javadoc as the project is not a Java classpath-capable package [INFO] [install:install {execution: default-install}] [INFO] Installing /home/aaime/devel/jaitools/git-jaitools/pom.xml to /home/aaime/.m2/repository/com/googlecode/jaitools/jaitools/1.1-SNAPSHOT/jaitools-1.1-SNAPSHOT.pom [INFO] [deploy:deploy {execution: default-deploy}] [INFO] Retrieving previous build number from jaitools-snapshots Uploading: http://oss.sonatype.org/content/repositories/snapshots/com/googlecode/jaitools/jaitools/1.1-SNAPSHOT/jaitools-1.1-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error deploying artifact: Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/com/googlecode/jaitools/jaitools/1.1-SNAPSHOT/jaitools-1.1-SNAPSHOT.pom. Return code is: 401 [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/com/googlecode/jaitools/jaitools/1.1-SNAPSHOT/jaitools-1.1-SNAPSHOT.pom. Return code is: 401 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 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:592) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Error deploying artifact: Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/com/googlecode/jaitools/jaitools/1.1-SNAPSHOT/jaitools-1.1-SNAPSHOT.pom. Return code is: 401 at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:195) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error deploying artifact: Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/com/googlecode/jaitools/jaitools/1.1-SNAPSHOT/jaitools-1.1-SNAPSHOT.pom. Return code is: 401 at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:121) at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:165) ... 19 more Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/com/googlecode/jaitools/jaitools/1.1-SNAPSHOT/jaitools-1.1-SNAPSHOT.pom. 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.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:317) at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:227) at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:107) ... 20 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4 seconds [INFO] Finished at: Sat Feb 05 12:37:43 CET 2011 [INFO] Final Memory: 41M/409M [INFO] ------------------------------------------------------------------------ {panel} My maven settings file looks like the following (of course passwords have been altered): {code:xml} <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <id>osgeo</id> <username>aaime</username> <password>dunno</password> </server> <server> <id>sonatype-nexus-snapshots</id> <username>aaime</username> <password>wontellya</password> </server> <server> <id>sonatype-nexus-staging</id> <username>aaime</username> <password>nope</password> </server> </servers> </settings> {code}

    Sonatype JIRA | 6 years ago | Andrea Aime
    org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying artifact: Failed to transfer file: http://oss.sonatype.org/content/repositories/snapshots/com/googlecode/jaitools/jaitools/1.1-SNAPSHOT/jaitools-1.1-SNAPSHOT.pom. Return code is: 401

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.maven.wagon.TransferFailedException

      Failed to transfer file: https://oss.sonatype.org/content/repositories/snapshots/dnsjava/dnsjava/2.1.1-SNAPSHOT/dnsjava-2.1.1-20110212.000151-1.jar. Return code is: 401

      at org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer()
    2. Maven
      DefaultArtifactDeployer.deploy
      1. org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer(LightweightHttpWagon.java:205)
      2. org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:413)
      3. org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:392)
      4. org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:365)
      5. org.apache.maven.wagon.StreamWagon.put(StreamWagon.java:163)
      6. org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:317)
      7. org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:227)
      8. org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:107)
      8 frames
    3. org.apache.maven
      DeployMojo.execute
      1. org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:173)
      1 frame
    4. Maven Plugin
      DefaultPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      1 frame
    5. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      2. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
      3. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
      4. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      5. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      6. org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      7. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      8. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      8 frames
    6. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      1 frame
    7. org.apache.maven
      CompatibleMain.main
      1. org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
      1 frame
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:592)
      4 frames
    9. Plexus
      Launcher.main
      1. org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      2. org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      3. org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      4. org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      4 frames