title: mvn deploy not loading the S3 credentials
body: <p>I'm converting a Gradle project to Maven and one of the things I'm doing is deploying the Jar to S3. I've configured the distribution like this:</p>
  
  <pre><code>&lt;distributionManagement&gt;
      &lt;repository&gt;
          &lt;id&gt;aws-release&lt;/id&gt;
          &lt;name&gt;AWS Release Repository&lt;/name&gt;
          &lt;url&gt;s3://projectx-support/maven2/release&lt;/url&gt;
      &lt;/repository&gt;
      &lt;snapshotRepository&gt;
          &lt;id&gt;aws-snapshots&lt;/id&gt;
          &lt;name&gt;AWS Snapshot Repository&lt;/name&gt;
          &lt;url&gt;s3://projectx-support/maven2/snapshots&lt;/url&gt;
      &lt;/snapshotRepository&gt;
  &lt;/distributionManagement&gt;
  </code></pre>
  
  <p>and I've tried with:</p>
  
  <pre><code>&lt;extensions&gt;
      &lt;extension&gt;
          &lt;groupId&gt;org.springframework.build&lt;/groupId&gt;
          &lt;artifactId&gt;aws-maven&lt;/artifactId&gt;
          &lt;version&gt;5.0.0.RELEASE&lt;/version&gt;
      &lt;/extension&gt;
  &lt;/extensions&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;extensions&gt;
      &lt;extension&gt;
          &lt;groupId&gt;org.kuali.maven.wagons&lt;/groupId&gt;
          &lt;artifactId&gt;maven-s3-wagon&lt;/artifactId&gt;
          &lt;version&gt;1.2.1&lt;/version&gt;
      &lt;/extension&gt;
  &lt;/extensions&gt;
  </code></pre>
  
  <p>and in both cases I get the same error:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project projectxcommon: Failed to retrieve remote metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml from/to aws-snapshots (s3://projectx-support/maven2/snapshots): Unable to load AWS credentials from any provider in the chain -&gt; [Help 1]
  </code></pre>
  
  <p>When running in debug mode, these are the warnings/errors:</p>
  
  <pre><code>[DEBUG] Configuration override awssdk_config_override.json not found.
  [DEBUG] Unable to load credentials from EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY))
  [DEBUG] Unable to load credentials from SystemPropertiesCredentialsProvider: Unable to load AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey)
  [DEBUG] Connecting to EC2 instance metadata service at URL: http://169.254.169.254/latest/meta-data/iam/security-credentials/
  [DEBUG] Unable to load credentials from InstanceProfileCredentialsProvider: Unable to load credentials from Amazon EC2 metadata service
  [DEBUG] Unable to load credentials from org.springframework.build.aws.maven.AuthenticationInfoAWSCredentialsProvider@19ed4e8: null
  [WARNING] Could not transfer metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml from/to aws-snapshots (s3://projectx-support/maven2/snapshots): Unable to load AWS credentials from any provider in the chain
  </code></pre>
  
  <p>When running with <code>-e</code> this is the stack trace:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project projectxcommon: Failed to retrieve remote metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml from/to aws-snapshots (s3://projectx-
  support/maven2/snapshots): Unable to load AWS credentials from any provider in the chain -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project projectxcommon: Failed to retrieve remote metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-m
  etadata.xml from/to aws-snapshots (s3://projectx-support/maven2/snapshots): Unable to load AWS credentials from any provider in the chain
      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:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
      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: Failed to retrieve remote metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml from/to aws-snapshots (s3://projectx-support/maven2/snapshots): Unable to load AWS credentials from any prov
  ider in the chain
      at org.apache.maven.plugin.deploy.DeployMojo.execute (DeployMojo.java:193)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
      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:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
      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.artifact.deployer.ArtifactDeploymentException: Failed to retrieve remote metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml from/to aws-snapshots (s3://projectx-support/maven2/snapshots): Unable to load AWS credentia
  ls from any provider in the chain
      at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy (DefaultArtifactDeployer.java:146)
      at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy (AbstractDeployMojo.java:167)
      at org.apache.maven.plugin.deploy.DeployMojo.execute (DeployMojo.java:157)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
      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:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
      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.eclipse.aether.deployment.DeploymentException: Failed to retrieve remote metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml from/to aws-snapshots (s3://projectx-support/maven2/snapshots): Unable to load AWS credentials from any p
  rovider in the chain
      at org.eclipse.aether.internal.impl.DefaultDeployer.upload (DefaultDeployer.java:425)
      at org.eclipse.aether.internal.impl.DefaultDeployer.deploy (DefaultDeployer.java:268)
      at org.eclipse.aether.internal.impl.DefaultDeployer.deploy (DefaultDeployer.java:223)
      at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy (DefaultRepositorySystem.java:384)
      at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy (DefaultArtifactDeployer.java:142)
      at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy (AbstractDeployMojo.java:167)
      at org.apache.maven.plugin.deploy.DeployMojo.execute (DeployMojo.java:157)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
      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:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
      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.eclipse.aether.transfer.MetadataTransferException: Could not transfer metadata tech.projectx:projectxcommon:1.0.0-SNAPSHOT/maven-metadata.xml from/to aws-snapshots (s3://projectx-support/maven2/snapshots): Unable to load AWS credentials from any provider in the chain
      at org.eclipse.aether.connector.basic.MetadataTransportListener.transferFailed (MetadataTransportListener.java:52)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:365)
      at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:75)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute (BasicRepositoryConnector.java:583)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get (BasicRepositoryConnector.java:232)
      at org.eclipse.aether.internal.impl.DefaultDeployer.upload (DefaultDeployer.java:395)
      at org.eclipse.aether.internal.impl.DefaultDeployer.deploy (DefaultDeployer.java:268)
      at org.eclipse.aether.internal.impl.DefaultDeployer.deploy (DefaultDeployer.java:223)
      at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy (DefaultRepositorySystem.java:384)
      at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy (DefaultArtifactDeployer.java:142)
      at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy (AbstractDeployMojo.java:167)
      at org.apache.maven.plugin.deploy.DeployMojo.execute (DeployMojo.java:157)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
      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:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
      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: com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain
      at com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials (AWSCredentialsProviderChain.java:117)
      at com.amazonaws.services.s3.AmazonS3Client.invoke (AmazonS3Client.java:3377)
      at com.amazonaws.services.s3.AmazonS3Client.invoke (AmazonS3Client.java:3336)
      at com.amazonaws.services.s3.AmazonS3Client.getBucketLocation (AmazonS3Client.java:669)
      at com.amazonaws.services.s3.AmazonS3Client.getBucketLocation (AmazonS3Client.java:677)
      at org.springframework.build.aws.maven.SimpleStorageServiceWagon.connectToRepository (SimpleStorageServiceWagon.java:86)
      at org.springframework.build.aws.maven.AbstractWagon.connect (AbstractWagon.java:146)
      at org.eclipse.aether.transport.wagon.WagonTransporter.connectWagon (WagonTransporter.java:342)
      at org.eclipse.aether.transport.wagon.WagonTransporter.pollWagon (WagonTransporter.java:382)
      at org.eclipse.aether.transport.wagon.WagonTransporter.execute (WagonTransporter.java:431)
      at org.eclipse.aether.transport.wagon.WagonTransporter.get (WagonTransporter.java:412)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask (BasicRepositoryConnector.java:453)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run (BasicRepositoryConnector.java:360)
      at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run (RunnableErrorForwarder.java:75)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute (BasicRepositoryConnector.java:583)
      at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get (BasicRepositoryConnector.java:232)
      at org.eclipse.aether.internal.impl.DefaultDeployer.upload (DefaultDeployer.java:395)
      at org.eclipse.aether.internal.impl.DefaultDeployer.deploy (DefaultDeployer.java:268)
      at org.eclipse.aether.internal.impl.DefaultDeployer.deploy (DefaultDeployer.java:223)
      at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy (DefaultRepositorySystem.java:384)
      at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy (DefaultArtifactDeployer.java:142)
      at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy (AbstractDeployMojo.java:167)
      at org.apache.maven.plugin.deploy.DeployMojo.execute (DeployMojo.java:157)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
      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:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
      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)
  </code></pre>
  
  <p>The credentials are correct and defined on <code>~/.m2/settings.xml</code>:</p>
  
  <pre><code>&lt;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"&gt;
      &lt;servers&gt;
          &lt;server&gt;
              &lt;id&gt;aws-release&lt;/id&gt;
              &lt;username&gt;...&lt;/username&gt;
              &lt;password&gt;...&lt;/password&gt;
          &lt;/server&gt;
          &lt;server&gt;
              &lt;id&gt;aws-snapshot&lt;/id&gt;
              &lt;username&gt;...&lt;/username&gt;
              &lt;password&gt;...&lt;/password&gt;
          &lt;/server&gt;
      &lt;/servers&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p>and indeed, the Gradle plugin was successfully deploying configured like this:</p>
  
  <pre><code>publishing {
      repositories {
          maven {
              url "s3://projectx-support/maven2"
              credentials(AwsCredentials) {
                  try {
                      def defaultCredentials = new com.amazonaws.auth.DefaultAWSCredentialsProviderChain().getCredentials()
                      accessKey defaultCredentials.getAWSAccessKeyId()
                      secretKey defaultCredentials.getAWSSecretKey()
                  } catch (Exception ex) {
                      // Nevermind
                  }
              }
          }
      }
  
      publications {
          mavenJava(MavenPublication) {
              from components.java
          }
      }
  }
  </code></pre>
  
  <p>What am I missing? what am I doing wrong?</p>