You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2009/07/13 22:40:18 UTC
svn commit: r793705 -
/maven/site/trunk/src/site/apt/guides/mini/guide-wagon-providers.apt
Author: jdcasey
Date: Mon Jul 13 20:40:18 2009
New Revision: 793705
URL: http://svn.apache.org/viewvc?rev=793705&view=rev
Log:
[MNG-4228] Adding documentation for wagon providers for Maven 2.2.1
Added:
maven/site/trunk/src/site/apt/guides/mini/guide-wagon-providers.apt (with props)
Added: maven/site/trunk/src/site/apt/guides/mini/guide-wagon-providers.apt
URL: http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/guides/mini/guide-wagon-providers.apt?rev=793705&view=auto
==============================================================================
--- maven/site/trunk/src/site/apt/guides/mini/guide-wagon-providers.apt (added)
+++ maven/site/trunk/src/site/apt/guides/mini/guide-wagon-providers.apt Mon Jul 13 20:40:18 2009
@@ -0,0 +1,75 @@
+ ---
+ Guide to Selecting Alternative Wagon Providers
+ ---
+ John Casey
+ ---
+ 13 July 2009
+ ---
+
+Guide to Selecting Alternative Wagon Providers
+
+ By default, Maven uses the <<<java.net.URLConnection>>> (<<<HttpURLConnection>>>) classes provided with the JDK to
+ access repositories that use the HTTP/HTTPs protocols. Unfortunately, since this implementation contains
+ certain bugs, Maven users may find themselves unable to connect to servers that demand some configurations.
+ A couple examples of weird behavior include line-wrapping the Authorization header's Base64 value when passwords
+ are long, and using cached values in preemptive authentication for successive connections to the same server.
+
+ Maven 2.2.0 attempted to amend this problem by switching over to a Wagon implementation that's based on
+ Apache HttpClient. Unfortunately, it soon became apparent that HttpClient doesn't support NTLM (at least,
+ version 2), which effectively means users behind NTLMv2 proxies cannot use Maven 2.2.0.
+
+ To hopefully resolve this once and for all, Maven 2.2.1 will contain support for specifying which Wagon
+ provider you want to use for a given protocol during the build. The provider name will then be appended
+ to the protocol using the format <<<\<protocol\>-\<provider\>>>> to form the component role-hint for the Wagon.
+
+ As of Maven 2.2.1, there are two ways to specify which Wagon provider should be used: via the command line,
+ or in the <<<\<server\>>>> configuration section of the <<<settings.xml>>>.
+
+*Command-Line Configuration
+
+ To specify the Wagon provider from the command line, simply use the
+ <<<-Dmaven.wagon.provider.\<protocol\>=\<provider-name\>>>> command-line option, like the following:
+
++---+
+mvn -Dmaven.wagon.provider.http=httpclient clean install
++---+
+
+ This instructs Maven to use the HttpClient-based Wagon implementation for connections to HTTP repositories.
+
+*<<<settings.xml>>> Configuration
+
+ To specify which Wagon provider to use for a particular server, modify your <<<settings.xml>>> file to add
+ the <<<\<wagonProvider\>>>> configuration to your <<<\<server\>>>> entry, like the following:
+
++---+
+<settings>
+ [...]
+ <servers>
+ <server>
+ <id>central</id>
+ <configuration>
+ <wagonProvider>httpclient</wagonProvider>
+ [...]
+ </configuration>
+ </server>
++---+
+
+*Available Wagon Providers
+
+ Maven 2.2.1 provides two providers for HTTP/HTTPS Wagons: <<<lightweight>>> and <<<httpclient>>>.
+ If you add a new HTTP Wagon implementation via build extension, you'll need to make sure the
+ extension binds its Wagon components to role-hints of the form <<<\<protocol\>-\<provider\>>>>
+ in order to allow users to specify your alternative Wagon provider. For instance, the HttpClient
+ HTTP Wagon component definition looks like this:
+
++---+
+<component>
+ <role>org.apache.maven.wagon.Wagon</role>
+ <role-hint>http-httpclient</role-hint>
+ <implementation>org.apache.maven.wagon.providers.http.HttpWagon</implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+</component>
++---+
+
+ <<NOTE:>> The default provider for HTTP/HTTPS Wagons is <<<lightweight>>>.
+
\ No newline at end of file
Propchange: maven/site/trunk/src/site/apt/guides/mini/guide-wagon-providers.apt
------------------------------------------------------------------------------
svn:eol-style = native
Re: svn commit: r793705 - /maven/site/trunk/src/site/apt/guides/mini/guide-wagon-providers.apt
Posted by John Casey <jd...@commonjava.org>.
The command-line setting should win, IMO...but I don't think this is
really tested ATM...
Brett Porter wrote:
> Hi John,
>
> On 14/07/2009, at 6:40 AM, jdcasey@apache.org wrote:
>
>> + As of Maven 2.2.1, there are two ways to specify which Wagon
>> provider should be used: via the command line,
>> + or in the <<<\<server\>>>> configuration section of the
>> <<<settings.xml>>>.
>> +
>> +*Command-Line Configuration
>> +
>> + To specify the Wagon provider from the command line, simply use the
>> + <<<-Dmaven.wagon.provider.\<protocol\>=\<provider-name\>>>>
>> command-line option, like the following:
>> +
>> ++---+
>> +mvn -Dmaven.wagon.provider.http=httpclient clean install
>> ++---+
>> +
>> + This instructs Maven to use the HttpClient-based Wagon
>> implementation for connections to HTTP repositories.
>> +
>> +*<<<settings.xml>>> Configuration
>> +
>> + To specify which Wagon provider to use for a particular server,
>> modify your <<<settings.xml>>> file to add
>> + the <<<\<wagonProvider\>>>> configuration to your <<<\<server\>>>>
>> entry, like the following:
>
> If both are given, which wins?
>
> Cheers,
> Brett
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: svn commit: r793705 - /maven/site/trunk/src/site/apt/guides/mini/guide-wagon-providers.apt
Posted by Brett Porter <br...@apache.org>.
Hi John,
On 14/07/2009, at 6:40 AM, jdcasey@apache.org wrote:
> + As of Maven 2.2.1, there are two ways to specify which Wagon
> provider should be used: via the command line,
> + or in the <<<\<server\>>>> configuration section of the
> <<<settings.xml>>>.
> +
> +*Command-Line Configuration
> +
> + To specify the Wagon provider from the command line, simply use the
> + <<<-Dmaven.wagon.provider.\<protocol\>=\<provider-name\>>>>
> command-line option, like the following:
> +
> ++---+
> +mvn -Dmaven.wagon.provider.http=httpclient clean install
> ++---+
> +
> + This instructs Maven to use the HttpClient-based Wagon
> implementation for connections to HTTP repositories.
> +
> +*<<<settings.xml>>> Configuration
> +
> + To specify which Wagon provider to use for a particular server,
> modify your <<<settings.xml>>> file to add
> + the <<<\<wagonProvider\>>>> configuration to your <<<\<server
> \>>>> entry, like the following:
If both are given, which wins?
Cheers,
Brett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org