javamaven

How do I use transport-http instead of wagon in maven?


I'd like to use maven-resolver-transport-http in maven instead of the default wagon.
So far I just downloaded the jar and its dependencies and copied it in my maven/3.8.4/libexec/lib installation and it worked.
But I can't find the configuration to make that happen in a cleaner way.


Solution

  • Since Maven 3.9.0, the default resolver transport is "native http" (which is in fact maven-resolver-transport-http). So if you're using an older version, upgrade to 3.9.0 or later and it's not required to specify anything.

    According to the official guide, since version 3.9.0 it's possible to configure the resolver transport with the flag -Dmaven.resolver.transport which accepts the following values:

    Just as an example, to explicitly tell Maven to use maven-resolver-transport-http, add the following flag to Maven: -Dmaven.resolver.transport=native.