Uploaded image for project: 'Maven Deploy Plugin'
  1. Maven Deploy Plugin
  2. MDEPLOY-274

Deploy archetype failed with Unauthorized error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Works for Me
    • 3.0.0-M1
    • None
    • deploy:deploy
    • None

    Description

       

      [DEBUG] Using catalog /Users/sean/.m2/repository/archetype-catalog.xml
      [DEBUG] Reading the catalog /Users/sean/.m2/repository/archetype-catalog.xml
      [INFO] 
      [INFO] --- maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) @ athena-project-incubator ---
      [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=74, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=29, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, ConflictResolver.conflictItemCount=73, DefaultDependencyCollector.collectTime=5, DefaultDependencyCollector.transformTime=2}
      [DEBUG] org.apache.maven.plugins:maven-deploy-plugin:jar:3.0.0-M1:
      [DEBUG]    org.apache.maven:maven-plugin-api:jar:3.0:compile
      [DEBUG]       org.sonatype.sisu:sisu-inject-plexus:jar:1.4.2:compile
      [DEBUG]          org.sonatype.sisu:sisu-inject-bean:jar:1.4.2:compile
      [DEBUG]             org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7:compile
      [DEBUG]    org.apache.maven:maven-core:jar:3.0:compile
      [DEBUG]       org.apache.maven:maven-settings:jar:3.0:compile
      [DEBUG]       org.apache.maven:maven-settings-builder:jar:3.0:compile
      [DEBUG]       org.apache.maven:maven-repository-metadata:jar:3.0:compile
      [DEBUG]       org.apache.maven:maven-model-builder:jar:3.0:compile
      [DEBUG]       org.apache.maven:maven-aether-provider:jar:3.0:runtime
      [DEBUG]       org.sonatype.aether:aether-impl:jar:1.7:compile
      [DEBUG]          org.sonatype.aether:aether-spi:jar:1.7:compile
      [DEBUG]       org.sonatype.aether:aether-api:jar:1.7:compile
      [DEBUG]       org.sonatype.aether:aether-util:jar:1.7:compile
      [DEBUG]       org.codehaus.plexus:plexus-interpolation:jar:1.14:compile
      [DEBUG]       org.codehaus.plexus:plexus-classworlds:jar:2.2.3:compile
      [DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.7.1:compile
      [DEBUG]       org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
      [DEBUG]          org.sonatype.plexus:plexus-cipher:jar:1.4:compile
      [DEBUG]    org.apache.maven:maven-model:jar:3.0:compile
      [DEBUG]    org.apache.maven:maven-artifact:jar:3.0:compile
      [DEBUG]    org.apache.maven.shared:maven-artifact-transfer:jar:0.10.0:compile
      [DEBUG]       org.apache.maven.shared:maven-common-artifact-filters:jar:3.0.1:compile
      [DEBUG]          org.apache.maven.shared:maven-shared-utils:jar:3.1.0:compile
      [DEBUG]       commons-codec:commons-codec:jar:1.11:compile
      [DEBUG]       org.slf4j:slf4j-api:jar:1.7.5:compile
      [DEBUG]    commons-io:commons-io:jar:2.5:compile
      [DEBUG]    org.codehaus.plexus:plexus-utils:jar:3.1.0:compile
      [DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1
      [DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1
      [DEBUG]   Imported:  < project>com.github.archetype:athena-project-incubator:1.0.2-SNAPSHOT
      [DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1
      [DEBUG]   Included: org.apache.maven.plugins:maven-deploy-plugin:jar:3.0.0-M1
      [DEBUG]   Included: org.sonatype.sisu:sisu-inject-bean:jar:1.4.2
      [DEBUG]   Included: org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7
      [DEBUG]   Included: org.apache.maven:maven-aether-provider:jar:3.0
      [DEBUG]   Included: org.sonatype.aether:aether-util:jar:1.7
      [DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.14
      [DEBUG]   Included: org.codehaus.plexus:plexus-component-annotations:jar:1.7.1
      [DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
      [DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4
      [DEBUG]   Included: org.apache.maven.shared:maven-artifact-transfer:jar:0.10.0
      [DEBUG]   Included: org.apache.maven.shared:maven-common-artifact-filters:jar:3.0.1
      [DEBUG]   Included: org.apache.maven.shared:maven-shared-utils:jar:3.1.0
      [DEBUG]   Included: commons-codec:commons-codec:jar:1.11
      [DEBUG]   Included: commons-io:commons-io:jar:2.5
      [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.1.0
      [DEBUG] Configuring mojo org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1, parent: sun.misc.Launcher$AppClassLoader@55f96302]
      [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy' with basic configurator -->
      [DEBUG]   (f) altDeploymentRepository = aws-snapshots::default::http://some.repo.net/repository/maven-snapshots/
      [DEBUG]   (f) altReleaseDeploymentRepository = aws-releases::default::http://some.repo.net/repository/maven-releases
      [DEBUG]   (f) altSnapshotDeploymentRepository = aws-snapshots::default::http://some.repo.net/repository/maven-snapshots
      [DEBUG]   (f) deployAtEnd = false
      [DEBUG]   (f) offline = false
      [DEBUG]   (f) project = MavenProject: com.github.archetype:athena-project-incubator:1.0.2-SNAPSHOT @ /Users/sean/Documents/dev/athena-project-incubator/pom.xml
      [DEBUG]   (f) reactorProjects = [MavenProject: com.github.archetype:athena-project-incubator:1.0.2-SNAPSHOT @ /Users/sean/Documents/dev/athena-project-incubator/pom.xml]
      [DEBUG]   (f) retryFailedDeploymentCount = 1
      [DEBUG]   (f) session = org.apache.maven.execution.MavenSession@16afbd92
      [DEBUG]   (f) skip = false
      [DEBUG] -- end configuration --
      [INFO] Using alternate deployment repository aws-snapshots::default::http://some.repo.net/repository/maven-snapshots
      [DEBUG] Installing checksum for com.github.archetype:athena-project-incubator:maven-archetype:1.0.2-SNAPSHOT
      [DEBUG] Calculating checksums for /Users/sean/.m2/repository/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/athena-project-incubator-1.0.2-SNAPSHOT.jar
      [DEBUG] Installing checksum to /Users/sean/.m2/repository/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/athena-project-incubator-1.0.2-SNAPSHOT.jar.md5
      [DEBUG] Installing checksum to /Users/sean/.m2/repository/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/athena-project-incubator-1.0.2-SNAPSHOT.jar.sha1
      [DEBUG] Using transporter WagonTransporter with priority -1.0 for http://some.repo.net/repository/maven-snapshots
      [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://some.repo.net/repository/maven-snapshots
      Downloading: http://some.repo.net/repository/maven-snapshots/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/maven-metadata.xml
      Downloaded: http://some.repo.net/repository/maven-snapshots/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/maven-metadata.xml (798 B at 910 B/s)
      [DEBUG] Writing tracking file /Users/sean/.m2/repository/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/resolver-status.properties
      Uploading: http://some.repo.net/repository/maven-snapshots/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/athena-project-incubator-1.0.2-20200710.013914-2.jar
      Uploading: http://some.repo.net/repository/maven-snapshots/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/athena-project-incubator-1.0.2-20200710.013914-2.pom
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 3.000 s
      [INFO] Finished at: 2020-07-10T09:39:15+08:00
      [INFO] Final Memory: 17M/237M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) on project athena-project-incubator: ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact com.github.archetype:athena-project-incubator:jar:1.0.2-20200710.013914-2 from/to aws-snapshots::default (http://some.repo.net/repository/maven-snapshots): Failed to transfer file: http://some.repo.net/repository/maven-snapshots/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/athena-project-incubator-1.0.2-20200710.013914-2.jar. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) on project athena-project-incubator: ArtifactDeployerException
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: org.apache.maven.plugin.MojoExecutionException: ArtifactDeployerException
      	at org.apache.maven.plugins.deploy.DeployMojo.deployProject(DeployMojo.java:201)
      	at org.apache.maven.plugins.deploy.DeployMojo.execute(DeployMojo.java:159)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	... 20 more
      Caused by: org.apache.maven.shared.transfer.artifact.deploy.ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact com.github.archetype:athena-project-incubator:jar:1.0.2-20200710.013914-2 from/to aws-snapshots::default (http://some.repo.net/repository/maven-snapshots): Failed to transfer file: http://some.repo.net/repository/maven-snapshots/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/athena-project-incubator-1.0.2-20200710.013914-2.jar. Return code is: 401, ReasonPhrase: Unauthorized.
      	at org.apache.maven.shared.transfer.artifact.deploy.internal.Maven31ArtifactDeployer.deploy(Maven31ArtifactDeployer.java:126)
      	at org.apache.maven.shared.transfer.artifact.deploy.internal.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:79)
      	at org.apache.maven.shared.transfer.project.deploy.internal.DefaultProjectDeployer.deploy(DefaultProjectDeployer.java:190)
      	at org.apache.maven.shared.transfer.project.deploy.internal.DefaultProjectDeployer.deploy(DefaultProjectDeployer.java:134)
      	at org.apache.maven.plugins.deploy.DeployMojo.deployProject(DeployMojo.java:193)
      	... 23 more
      Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.github.archetype:athena-project-incubator:jar:1.0.2-20200710.013914-2 from/to aws-snapshots::default (http://some.repo.net/repository/maven-snapshots): Failed to transfer file: http://some.repo.net/repository/maven-snapshots/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/athena-project-incubator-1.0.2-20200710.013914-2.jar. Return code is: 401, ReasonPhrase: Unauthorized.
      	at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:326)
      	at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:254)
      	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:422)
      	at org.apache.maven.shared.transfer.artifact.deploy.internal.Maven31ArtifactDeployer.deploy(Maven31ArtifactDeployer.java:122)
      	... 27 more
      Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.github.archetype:athena-project-incubator:jar:1.0.2-20200710.013914-2 from/to aws-snapshots::default (http://some.repo.net/repository/maven-snapshots): Failed to transfer file: http://some.repo.net/repository/maven-snapshots/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/athena-project-incubator-1.0.2-20200710.013914-2.jar. Return code is: 401, ReasonPhrase: Unauthorized.
      	at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:52)
      	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:364)
      	at org.eclipse.aether.connector.basic.BasicRepositoryConnector.put(BasicRepositoryConnector.java:283)
      	at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:320)
      	... 30 more
      Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://some.repo.net/repository/maven-snapshots/com/github/archetype/athena-project-incubator/1.0.2-SNAPSHOT/athena-project-incubator-1.0.2-20200710.013914-2.jar. Return code is: 401, ReasonPhrase: Unauthorized.
      	at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:631)
      	at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:553)
      	at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:535)
      	at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:529)
      	at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:509)
      	at org.eclipse.aether.transport.wagon.WagonTransporter$PutTaskRunner.run(WagonTransporter.java:653)
      	at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:436)
      	at org.eclipse.aether.transport.wagon.WagonTransporter.put(WagonTransporter.java:419)
      	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$PutTaskRunner.runTask(BasicRepositoryConnector.java:519)
      	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:359)
      	... 32 more
      [ERROR] 
      [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
      

       

      Deploying archetype resulted the error above while deploying artifact with packaging jar is fine. But no such issue with maven deploy plugin 2.8.2

       

       

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              seanyinx Yin Xiang
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: