Maven 2.x Javadoc Plugin

Http proxy does not work any more

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: 2.6, 2.7
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Maven 2.0.9
    JDK5 (Sun)
  • Number of attachments :
    0

Description

It appears the update of Wagon Provider in 2.6 is not compatible with Maven 2.0.x. Here is the
email snippet as posted to maven users group (no responses)
I am using Maven 2.0.9 and maven-javadoc-plugin 2.6. I have the "links" configured in my
plugin config. Now all resolution of external links fail (we are behind a proxy not NTLM)
with this:

Aug 12, 2009 12:02:31 AM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: ntlm authentication scheme selected
Aug 12, 2009 12:02:31 AM org.apache.commons.httpclient.HttpMethodDirector authenticate

The wagon provider appears to have been upgraded to 1.0-beta-6 in the maven-javadoc-plugin 2.6
(as opposed to 1.0-beta-2 in 2.5). I seem to remember that (maybe it is wrong) that wagon 1.0-beta-6
requires Maven 2.1.x and above? If that is the case, I don't understand how the plugin was released with
prerequisite of 2.0.9?
Is there a workaround to disable the default ntlm auth scheme via a magical system property? TIA

Issue Links

Activity

Hide
Mohan K added a comment -

Sorry, it appears my CAPS LOCK was on when entering the title

Show
Mohan K added a comment - Sorry, it appears my CAPS LOCK was on when entering the title
Hide
Vincent Siveton added a comment -

Does the MJAVADOC-252 patch help you?

Show
Vincent Siveton added a comment - Does the MJAVADOC-252 patch help you?
Hide
Vincent Siveton added a comment -

In 2.6, the implementation uses HttpClient and not wagon.
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 - In 2.6, the implementation uses HttpClient and not wagon. For NTLM, I guess you need to add Joption param, ie
<configuration>
  <additionalJOption>-J-Dhttp.auth.ntlm.domain=MYDOMAIN</additionalJOption>
  ...
</configuration>
Hide
Mohan K added a comment -

Hi vincent, the problem is I am using 2.0.9. I don't have NTLM proxy, but if you look at the error message,
the httpclient is defaulting to it and I cannot change it?

Show
Mohan K added a comment - Hi vincent, the problem is I am using 2.0.9. I don't have NTLM proxy, but if you look at the error message, the httpclient is defaulting to it and I cannot change it?
Hide
Vincent Siveton added a comment -

I bet that you are using an isaproxy which asks for NTLM authentication. IIRC httpclient supports NTLMv1, not NTLMv2.
Since I have no proxy there, could you please try to provide a patch?

Show
Vincent Siveton added a comment - I bet that you are using an isaproxy which asks for NTLM authentication. IIRC httpclient supports NTLMv1, not NTLMv2. Since I have no proxy there, could you please try to provide a patch?
Hide
Vincent Siveton added a comment -

Also, a workaround could be to use additionalJOption, ie

<configuration>
  <additionalJOption>-J-Dhttp.proxySet=true -J-Dhttp.proxyHost=proxy.somewhere.com -J-Dhttp.proxyPort=3128 -J-Dhttp.nonProxyHosts="java.sun.com|*.somewhere.com" \
    -J-Dhttp.proxyUser="foo" -J-Dhttp.proxyPassword="bar" </additionalJOption>
  ...
</configuration>
Show
Vincent Siveton added a comment - Also, a workaround could be to use additionalJOption, ie
<configuration>
  <additionalJOption>-J-Dhttp.proxySet=true -J-Dhttp.proxyHost=proxy.somewhere.com -J-Dhttp.proxyPort=3128 -J-Dhttp.nonProxyHosts="java.sun.com|*.somewhere.com" \
    -J-Dhttp.proxyUser="foo" -J-Dhttp.proxyPassword="bar" </additionalJOption>
  ...
</configuration>
Hide
Mohan K added a comment -

Hello Vincent,
Sorry could not get back on this, it appears that we do have NTLMv2 proxy. So the plugin change to commons-httpclient
is really put a blocker to move to 2.6.x version of the plugin.

A potential fix would be to provide a plugin option to choose the built-in JDK and default to commons-httpclient.

But for those who are requiring to use 2.6.1, the workaround is to use the additionalparam option and turn
of all detection and resolution by the javadoc plugin. Which means some of the automatic detection features
of 2.6.x would have to be sacrificed.

An e.g. would be
<detectJavaApiLink>false</detectJavaApiLink>
<detectOfflineLinks>false</detectOfflineLinks>
<detectLinks>false</detectLinks>
<additionalJOption>-J-Dhttp.proxySet=true -J-Dhttp.proxyHost=proxy.somewhere.com -J-Dhttp.proxyPort=3128 -J-Dhttp.nonProxyHosts="java.sun.com|*.somewhere.com" \
-J-Dhttp.proxyUser="foo" -J-Dhttp.proxyPassword="bar" </additionalJOption>

<additionalparam>
-link http://java.sun.com/javase/6/docs/api
</additionalparam>

NOTE: you must not use the
<link>, <linkoffline> tags, just delegate it to the javadoc exe.

Show
Mohan K added a comment - Hello Vincent, Sorry could not get back on this, it appears that we do have NTLMv2 proxy. So the plugin change to commons-httpclient is really put a blocker to move to 2.6.x version of the plugin. A potential fix would be to provide a plugin option to choose the built-in JDK and default to commons-httpclient. But for those who are requiring to use 2.6.1, the workaround is to use the additionalparam option and turn of all detection and resolution by the javadoc plugin. Which means some of the automatic detection features of 2.6.x would have to be sacrificed. An e.g. would be <detectJavaApiLink>false</detectJavaApiLink> <detectOfflineLinks>false</detectOfflineLinks> <detectLinks>false</detectLinks> <additionalJOption>-J-Dhttp.proxySet=true -J-Dhttp.proxyHost=proxy.somewhere.com -J-Dhttp.proxyPort=3128 -J-Dhttp.nonProxyHosts="java.sun.com|*.somewhere.com" \ -J-Dhttp.proxyUser="foo" -J-Dhttp.proxyPassword="bar" </additionalJOption> <additionalparam> -link http://java.sun.com/javase/6/docs/api </additionalparam> NOTE: you must not use the <link>, <linkoffline> tags, just delegate it to the javadoc exe.
Hide
Martijn Verburg added a comment -

Affects version should also have 2.7 added to it. I can't seem to edit that myself.

Show
Martijn Verburg added a comment - Affects version should also have 2.7 added to it. I can't seem to edit that myself.

People

  • Assignee:
    Unassigned
    Reporter:
    Mohan K
Vote (3)
Watch (5)

Dates

  • Created:
    Updated: