[jira] (WAGON-421) Not authorized when deploying artifact following HTTP redirect

2014-11-17 Thread Bruno Medeiros (JIRA)

[ 
https://jira.codehaus.org/browse/WAGON-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=356290#comment-356290
 ] 

Bruno Medeiros commented on WAGON-421:
--

Nobody has anything to say about it?

 Not authorized when deploying artifact following HTTP redirect
 

 Key: WAGON-421
 URL: https://jira.codehaus.org/browse/WAGON-421
 Project: Maven Wagon
  Issue Type: Bug
  Components: wagon-http
Affects Versions: 2.4, 2.5, 2.6, 2.7
 Environment: Maven 3.0.4+
Reporter: Bruno Medeiros
Priority: Critical

 I always deployed artifacts to my repository without problems, until last 
 week when I was forced to migrate my repository to a different URL. I still 
 have control of the old domain, so I set a redirect in Apache on the old 
 domain, like this:
  bq.   Redirect permanent /maven2 http://newsubdomain.company.com/maven2
 Deploys works perfect with the old URL for maven 2.2.1 and 3.0.3, but all 
 maven 3.0.4+ are broken (even 3.1.1 and 3.2.3). Here follows my test:
 # ~/apache-maven-3.2.3/bin/mvn -X deploy
 error (full stacktrace):
 {code}
 [ERROR] Failed to execute goal 
 org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on 
 project jcompany_flex_util: Failed to retrieve remote metadata 
 br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml: Could 
 not transfer metadata 
 br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml from/to 
 company-repo (http://dev.company.com.br:80/maven2/libs-snapshots-local): Not 
 authorized , ReasonPhrase:Unauthorized. - [Help 1]
 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
 goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy 
 (default-deploy) on project jcompany_flex_util: Failed to retrieve remote 
 metadata br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml: 
 Could not transfer metadata 
 br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml from/to 
 company-repo (http://dev.company.com.br:80/maven2/libs-snapshots-local): Not 
 authorized , ReasonPhrase:Unauthorized.
   at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
   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:116)
   at 
 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
   at 
 org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
   at 
 org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
   at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
   at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   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 
 br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml: Could 
 not transfer metadata 
 br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml from/to 
 company-repo (http://dev.company.com.br:80/maven2/libs-snapshots-local): Not 
 authorized , ReasonPhrase:Unauthorized.
   at 
 org.apache.maven.plugin.deploy.DeployMojo.deployProject(DeployMojo.java:284)
   at 
 org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:169)
   at 
 org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
   at 
 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
   ... 19 more
 Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: 
 Failed to retrieve remote metadata 
 

[jira] (WAGON-421) Not authorized when deploying artifact following HTTP redirect

2014-09-21 Thread Bruno Medeiros (JIRA)
Bruno Medeiros created WAGON-421:


 Summary: Not authorized when deploying artifact following HTTP 
redirect
 Key: WAGON-421
 URL: https://jira.codehaus.org/browse/WAGON-421
 Project: Maven Wagon
  Issue Type: Bug
  Components: wagon-http
Affects Versions: 2.7, 2.6, 2.5, 2.4
 Environment: Maven 3.0.4+
Reporter: Bruno Medeiros
Priority: Critical


I always deployed artifacts to my repository without problems, until last week 
when I was forced to migrate my repository to a different URL. I still have 
control of the old domain, so I set a redirect in Apache on the old domain, 
like this:

 bq.   Redirect permanent /maven2 http://newsubdomain.company.com/maven2

Deploys works perfect with the old URL for maven 2.2.1 and 3.0.3, but all maven 
3.0.4+ are broken (even 3.1.1 and 3.2.3). Here follows my test:

# ~/apache-maven-3.2.3/bin/mvn -X deploy

error (full stacktrace):

{code}
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on 
project jcompany_flex_util: Failed to retrieve remote metadata 
br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml: Could not 
transfer metadata 
br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml from/to 
company-repo (http://dev.company.com.br:80/maven2/libs-snapshots-local): Not 
authorized , ReasonPhrase:Unauthorized. - [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on 
project jcompany_flex_util: Failed to retrieve remote metadata 
br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml: Could not 
transfer metadata 
br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml from/to 
company-repo (http://dev.company.com.br:80/maven2/libs-snapshots-local): Not 
authorized , ReasonPhrase:Unauthorized.
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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:116)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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 
br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml: Could not 
transfer metadata 
br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml from/to 
company-repo (http://dev.company.com.br:80/maven2/libs-snapshots-local): Not 
authorized , ReasonPhrase:Unauthorized.
at 
org.apache.maven.plugin.deploy.DeployMojo.deployProject(DeployMojo.java:284)
at 
org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:169)
at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: 
Failed to retrieve remote metadata 
br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml: Could not 
transfer metadata 
br.com.company:jcompany_flex_util:0.4.0-SNAPSHOT/maven-metadata.xml from/to 
company-repo (http://dev.company.com.br:80/maven2/libs-snapshots-local): Not 
authorized , ReasonPhrase:Unauthorized.