org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6:deploy-staged-repository (default-cli) on project staging-test-project: Execution default-cli of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6:deploy-staged-repository failed: Nexus connection problem to URL [https://localhost:8443/nexus ]: ProxyInfo and BaseUrl protocols does not align!

Sonatype JIRA | Peter Lynch | 3 years ago
  1. 0

    # Nexus at https://localhost:8443 # use the regular maven-deploy-plugin to deploy to a local directory. https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin#image-upload # configure Maven settings.xml to have a proxy like: {noformat} <proxy> <id>debug</id> <active>true</active> <protocol>http</protocol> <host>spunge.local</host> <port>8888</port> <nonProxyHosts>fakehost</nonProxyHosts> </proxy> {noformat} and setup a proxy that can proxy a tunnel to https hosts ( Charles Proxy ) # execute nexus-staging:deploy-staged-repository to the https://localhost:8443 instance # build fails with {noformat} > ./mvn nexus-staging:deploy-staged-repository -DnexusUrl=https://localhost:8443/nexus -DrepositoryDirectory=/Users/plynch/project/altDeployRepo -DstagingProfileId=1364e809b8f892e8 -DserverId=dist-release -e Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T13:37:52-04:00) Maven home: /Volumes/OSX/app/maven/latest Java version: 1.8.0, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.9.2", arch: "x86_64", family: "mac" [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Inspecting build with total of 1 modules... [INFO] Not installing Nexus Staging features: [INFO] * Preexisting staging related goal bindings found in 1 modules. [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building staging-test 1.0 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- nexus-staging-maven-plugin:1.6:deploy-staged-repository (default-cli) @ staging-test-project --- [INFO] Staging remotely locally deployed repository... [INFO] + Using server credentials "dist-snapshot" from Maven settings. [INFO] + Using "debug" HTTP Proxy from Maven settings [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.895 s [INFO] Finished at: 2014-04-14T14:42:55-04:00 [INFO] Final Memory: 12M/305M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6:deploy-staged-repository (default-cli) on project staging-test-project: Execution default-cli of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6:deploy-staged-repository failed: Nexus connection problem to URL [https://localhost:8443/nexus ]: ProxyInfo and BaseUrl protocols does not align! -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6:deploy-staged-repository (default-cli) on project staging-test-project: Execution default-cli of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6:deploy-staged-repository failed: Nexus connection problem to URL [https://localhost:8443/nexus ]: ProxyInfo and BaseUrl protocols does not align! at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224) 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:108) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) 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:483) 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.PluginExecutionException: Execution default-cli of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6:deploy-staged-repository failed: Nexus connection problem to URL [https://localhost:8443/nexus ]: ProxyInfo and BaseUrl protocols does not align! at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:144) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more Caused by: java.lang.IllegalArgumentException: Nexus connection problem to URL [https://localhost:8443/nexus ]: ProxyInfo and BaseUrl protocols does not align! at org.sonatype.nexus.maven.staging.remote.RemoteNexus.createNexusClient(RemoteNexus.java:209) at org.sonatype.nexus.maven.staging.remote.RemoteNexus.<init>(RemoteNexus.java:103) at org.sonatype.nexus.maven.staging.deploy.strategy.AbstractStagingDeployStrategy.createRemoteNexus(AbstractStagingDeployStrategy.java:56) at org.sonatype.nexus.maven.staging.deploy.strategy.ImageDeployStrategy.finalizeDeploy(ImageDeployStrategy.java:72) at org.sonatype.nexus.maven.staging.deploy.DeployRepositoryMojo.execute(DeployRepositoryMojo.java:88) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) ... 20 more Caused by: java.lang.IllegalArgumentException: ProxyInfo and BaseUrl protocols does not align! at org.sonatype.nexus.client.rest.jersey.NexusClientFactoryImpl.applyProxyIfAny(NexusClientFactoryImpl.java:284) at org.sonatype.nexus.client.rest.jersey.NexusClientFactoryImpl.doCreateHttpClientFor(NexusClientFactoryImpl.java:141) at org.sonatype.nexus.client.rest.jersey.NexusClientFactoryImpl.createFor(NexusClientFactoryImpl.java:123) at org.sonatype.nexus.maven.staging.remote.RemoteNexus.createNexusClient(RemoteNexus.java:190) ... 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/PluginExecutionException {noformat} Expected: Proxy server at http is used to tunnel an https connection to nexus host when Maven proxy is active AND (proxy protocol is not set OR is set to protocol matching the remote host) If we change proxy protocol to https, this fails as well, because Staging tries to talk https on http proxy port. {noformat} Remote staging failed: IO failure: Unrecognized SSL message, plaintext connection? {noformat}

    Sonatype JIRA | 3 years ago | Peter Lynch
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6:deploy-staged-repository (default-cli) on project staging-test-project: Execution default-cli of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6:deploy-staged-repository failed: Nexus connection problem to URL [https://localhost:8443/nexus ]: ProxyInfo and BaseUrl protocols does not align!
  2. 0
    I was missing a partitioning column because I did not specify the "basePath" option on read
  3. 0
    URI part of the request contains invalid characters. You may try to encode the path from the URI. Check RFC7230 and RFC3986 documentation below. https://www.ietf.org/rfc/rfc3986.txt and https://tools.ietf.org/html/rfc7230
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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. java.lang.IllegalArgumentException

      ProxyInfo and BaseUrl protocols does not align!

      at org.sonatype.nexus.client.rest.jersey.NexusClientFactoryImpl.applyProxyIfAny()
    2. org.sonatype.nexus
      DeployRepositoryMojo.execute
      1. org.sonatype.nexus.client.rest.jersey.NexusClientFactoryImpl.applyProxyIfAny(NexusClientFactoryImpl.java:284)
      2. org.sonatype.nexus.client.rest.jersey.NexusClientFactoryImpl.doCreateHttpClientFor(NexusClientFactoryImpl.java:141)
      3. org.sonatype.nexus.client.rest.jersey.NexusClientFactoryImpl.createFor(NexusClientFactoryImpl.java:123)
      4. org.sonatype.nexus.maven.staging.remote.RemoteNexus.createNexusClient(RemoteNexus.java:190)
      5. org.sonatype.nexus.maven.staging.remote.RemoteNexus.<init>(RemoteNexus.java:103)
      6. org.sonatype.nexus.maven.staging.deploy.strategy.AbstractStagingDeployStrategy.createRemoteNexus(AbstractStagingDeployStrategy.java:56)
      7. org.sonatype.nexus.maven.staging.deploy.strategy.ImageDeployStrategy.finalizeDeploy(ImageDeployStrategy.java:72)
      8. org.sonatype.nexus.maven.staging.deploy.DeployRepositoryMojo.execute(DeployRepositoryMojo.java:88)
      8 frames
    3. Maven Plugin
      DefaultBuildPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
      1 frame
    4. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
      6. org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
      8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
      9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
      9 frames
    5. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
      2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
      3. org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
      3 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:483)
      4 frames
    7. Plexus
      Launcher.main
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      4 frames