Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6.1
    • Labels:
      None
    • Environment:
      maven-2.0.10
      jdk 1.6_014
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      • Prerequisite :
        --------------------
      • web access via http proxy
      • javadoc-plugin configuration with <detectLinks>true</detectLinks>
      • $MVN_HOME/conf/settings.xml with configuration above ( internal-host is host to access the internal javadoc web sites )
        <proxies>
        <proxy>
        <active>true</active>
        <protocol>http</protocol>
        <host>myproxyhost</host>
        <port>myproxyport</port>
        <nonProxyHosts>internal-host</nonProxyHosts>
        </proxy>
        </proxies>

      Launch the mvn site-deploy command.
      If you have a dependency with an internal javadoc web site, the plugin tried to link this javadoc with the http proxy and logged:
      "Error fetching link: http://internal-host/..../apidocs/package-list. Ignored it."

      This is a bug because this javadoc isn't accessible via http proxy.

      So I attached 2 patches :

      • the first one (link_nonproxy_2.0.10.patch) is compatible (and tested) with mvn 2.0.9 and 2.0.10 but included a method directly copied from ProxyUtils.java (wagon-provider-api-1.0-beta-6.jar)
      • the second (link_nonproxy_2.2.0.patch) used 2 classes from wagon-provider-api-1.0-beta-6.jar dependency so it requires mvn 2.2
      1. link_nonproxy_2.0.10.patch
        4 kB
        Maxime Gréau
      2. link_nonproxy_2.2.0.patch
        5 kB
        Maxime Gréau

        Issue Links

          Activity

          Hide
          Martijn Verburg added a comment -

          I think we have the same issue with the NTLM proxy:

          INFO: ntlm authentication scheme selected
          Sep 10, 2009 12:29:40 PM org.apache.commons.httpclient.HttpMethodDirector authenticate
          SEVERE: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials
          org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials
          at org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:332)
          at org.apache.commons.httpclient.HttpMethodDirector.authenticateProxy(HttpMethodDirector.java:320)
          at org.apache.commons.httpclient.HttpMethodDirector.authenticate(HttpMethodDirector.java:232)
          at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
          at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
          at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
          at org.apache.maven.plugin.javadoc.JavadocUtil.fetchURL(JavadocUtil.java:773)
          at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.isValidJavadocLink(AbstractJavadocMojo.java:4680)
          at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.addLinkArguments(AbstractJavadocMojo.java:3229)
          at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.addStandardDocletOptions(AbstractJavadocMojo.java:3885)
          at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.executeReport(AbstractJavadocMojo.java:1761)
          at org.apache.maven.plugin.javadoc.TestJavadocReport.executeReport(TestJavadocReport.java:149)
          at org.apache.maven.plugin.javadoc.JavadocReport.generate(JavadocReport.java:122)
          at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139)
          at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269)
          at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101)
          at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:133)
          at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:100)
          at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
          at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
          at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
          at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
          at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
          Sep 10, 2009 12:29:40 PM org.apache.commons.httpclient.HttpMethodDirector processProxyAuthChallenge
          INFO: Failure authenticating with NTLM <any realm>@prx:80
          [ERROR] Error fetching link: http://java.sun.com/j2se/1.5.0/docs/api/package-list. Ignored it.

          <proxy>
          <id>optional</id>
          <active>true</active>
          <protocol>http</protocol>
          <username>username</username>
          <password>password</password>
          <host>proxy server</host>
          <port>80</port>
          </proxy>
          </proxies>

          Show
          Martijn Verburg added a comment - I think we have the same issue with the NTLM proxy: INFO: ntlm authentication scheme selected Sep 10, 2009 12:29:40 PM org.apache.commons.httpclient.HttpMethodDirector authenticate SEVERE: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials at org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:332) at org.apache.commons.httpclient.HttpMethodDirector.authenticateProxy(HttpMethodDirector.java:320) at org.apache.commons.httpclient.HttpMethodDirector.authenticate(HttpMethodDirector.java:232) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) at org.apache.maven.plugin.javadoc.JavadocUtil.fetchURL(JavadocUtil.java:773) at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.isValidJavadocLink(AbstractJavadocMojo.java:4680) at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.addLinkArguments(AbstractJavadocMojo.java:3229) at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.addStandardDocletOptions(AbstractJavadocMojo.java:3885) at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.executeReport(AbstractJavadocMojo.java:1761) at org.apache.maven.plugin.javadoc.TestJavadocReport.executeReport(TestJavadocReport.java:149) at org.apache.maven.plugin.javadoc.JavadocReport.generate(JavadocReport.java:122) at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:139) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:269) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:101) at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:133) at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:100) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:356) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Sep 10, 2009 12:29:40 PM org.apache.commons.httpclient.HttpMethodDirector processProxyAuthChallenge INFO: Failure authenticating with NTLM <any realm>@prx:80 [ERROR] Error fetching link: http://java.sun.com/j2se/1.5.0/docs/api/package-list . Ignored it. <proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>username</username> <password>password</password> <host>proxy server</host> <port>80</port> </proxy> </proxies>
          Hide
          Vincent Siveton added a comment -

          Fixed in r816155, snapshot deployed. Please review it so I could close it. Thanks!

          @Martijn For NTLM, I guess you need to add Joption param, ie

          <configuration>
            <additionalJOption>-J-Dhttp.auth.ntlm.domain=MYDOMAIN</additionalJOption>
            ...
          </configuration>
          
          Show
          Vincent Siveton added a comment - Fixed in r816155 , snapshot deployed. Please review it so I could close it. Thanks! @Martijn For NTLM, I guess you need to add Joption param, ie <configuration> <additionalJOption>-J-Dhttp.auth.ntlm.domain=MYDOMAIN</additionalJOption> ... </configuration>
          Hide
          Vincent Siveton added a comment -

          Maxime confirmed me the resolution in private

          Show
          Vincent Siveton added a comment - Maxime confirmed me the resolution in private
          Hide
          Martijn Verburg added a comment -

          Hi Vincent, sorry to take so long to get back to you. Is that option you mention to be used in conjunction with your patched version of this plugin?

          Show
          Martijn Verburg added a comment - Hi Vincent, sorry to take so long to get back to you. Is that option you mention to be used in conjunction with your patched version of this plugin?
          Hide
          Vincent Siveton added a comment -

          @Martijn, the patch doesn't affect NTLM proxy. You could use <additionalJOption/> for this proxy, feel free to try it and create a new issue if it doesn't work

          Show
          Vincent Siveton added a comment - @Martijn, the patch doesn't affect NTLM proxy. You could use <additionalJOption/> for this proxy, feel free to try it and create a new issue if it doesn't work

            People

            • Assignee:
              Vincent Siveton
              Reporter:
              Maxime Gréau
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: