Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-10170

nexus-staging-maven-plugin does not use proxy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Using nexus-staging-maven-plugin behind a corporate proxy. The plugin does not seem to honor the proxy in settings.xml.

      Plugin config in pom.xml

      <plugin>
         <groupId>org.sonatype.plugins</groupId>
         <artifactId>nexus-staging-maven-plugin</artifactId>
         <version>1.6.7</version>
         <extensions>true</extensions>
         <configuration>
            <serverId>ossrh</serverId>
            <nexusUrl>https://oss.sonatype.org</nexusUrl>
            <autoReleaseAfterClose>true</autoReleaseAfterClose>
         </configuration>
      </plugin>
      

      Proxy config in settings.xml:

      <proxies>
         <proxy>
            <id>corp_proxy</id>
            <active>true</active>
            <protocol>http</protocol>
            <host>****</host>
            <port>8080</port>
         </proxy>
      </proxies>
      

      Here is a piece of the debug output when mvn deploy is executed:

      [INFO] Performing local staging (local stagingDirectory="/Users/seoj/Documents/workspace/jsmoothie/target/nexus-staging/staging")...
      [INFO]  + Using server credentials "ossrh" from Maven settings.
      [DEBUG] Client created for media-type application/xml; charset=UTF-8 and connection (url=https://oss.sonatype.org:443/,authc=UsernamePasswordAuthenticationInfo[username=seoj, password=****],sslCertificateValidation=STRICT,sslCertificateHostnameValidation=LAX)
      May 03, 2016 9:01:02 AM com.sun.jersey.api.client.filter.LoggingFilter log
      INFO: 1 * Client out-bound request
      1 > GET https://oss.sonatype.org:443/service/local/status
      1 > Content-Type: application/xml; charset=UTF-8
      1 > Accept: application/xml; charset=UTF-8
      
      [DEBUG] Connection request: [route: {s}->https://oss.sonatype.org:443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
      [DEBUG] Connection leased: [id: 0][route: {s}->https://oss.sonatype.org:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
      [DEBUG] Connecting to oss.sonatype.org:443
      

      The execution stops here and eventually times out.

      I've tested that the proxy is able to connect to oss.sonatype.org:443.
      I've tested that I am able to deploy successfully when outside the corporate network.
      Also, tested using plugin version 1.5.1 which uses the proxy, but has a different error:

      [INFO] Using server credentials with ID="ossrh" from Maven settings.
      [INFO] Using HTTP Proxy with ID="corp_proxy" from Maven settings.
      ...
      [ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.5.1:deploy (injected-nexus-deploy) on project jsmoothie: Nexus connection problem to URL [https://oss.sonatype.org ]: ProxyInfo and BaseUrl protocols does not align! -> [Help 1]
      
      • Is there a problem with my configuration using plugin version 1.6.7?
      • Is this is a bug, is there a workaround?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              seoj Jung Seo
              Last Updated By:
              Peter Lynch Peter Lynch
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title