You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2023/07/23 22:54:55 UTC

[maven-site] branch MNG-7850-low-level-config created (now c15b3072)

This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a change to branch MNG-7850-low-level-config
in repository https://gitbox.apache.org/repos/asf/maven-site.git


      at c15b3072 [MNG-7850] Add example for low-level resolver configuration

This branch includes the following new commits:

     new c15b3072 [MNG-7850] Add example for low-level resolver configuration

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-site] 01/01: [MNG-7850] Add example for low-level resolver configuration

Posted by sj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch MNG-7850-low-level-config
in repository https://gitbox.apache.org/repos/asf/maven-site.git

commit c15b30728616a2e3d2cf828de779334fa716ef70
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Mon Jul 24 00:44:46 2023 +0200

    [MNG-7850] Add example for low-level resolver configuration
---
 .../guides/mini/guide-resolver-transport.md        | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/content/markdown/guides/mini/guide-resolver-transport.md b/content/markdown/guides/mini/guide-resolver-transport.md
index 32883ed7..83a72984 100644
--- a/content/markdown/guides/mini/guide-resolver-transport.md
+++ b/content/markdown/guides/mini/guide-resolver-transport.md
@@ -99,6 +99,60 @@ for example to allow the user to tell Maven how long to wait before giving up on
   </servers>
 </settings>
 ```
+## Low-level Resolver configuration
+
+All configuration items mentioned in  [Configuration Options](https://maven.apache.org/resolver/configuration.html) 
+which is not mapped by server/configuration tag must be provided in special way.
+
+### System level
+
+Configuration can be provided on global level as properties in `settings.xml`
+
+```xml
+<settings>
+  <profiles>
+    <profile>
+      <id>resolver-config</id>
+      <properties>
+        <aether.dependencyCollector.impl>bf</aether.dependencyCollector.impl>
+        <!-- set preemptiveAuth for all servers -->
+        <aether.connector.http.preemptiveAuth>true</aether.connector.http.preemptiveAuth>
+        
+        <!-- set preemptiveAuth for only for server with id - serverId -->
+        <aether.connector.http.preemptiveAuth.serverId>true</aether.connector.http.preemptiveAuth.serverId>
+      </properties>
+    </profile>
+  </profiles>
+
+  <activeProfiles>
+    <activeProfile>resolver-config</activeProfile>
+  </activeProfiles>
+</settings>
+```
+
+You can also use environment variable `MAVEN_OPTS` ot `MAVEN_ARGS`
+
+```
+export MAVEN_ARGS="-Daether.connector.http.preemptiveAuth=true"
+```
+
+### Project level
+
+You can add configuration items per project in `.mvn/maven.config`, like:
+
+```
+-Daether.dependencyCollector.impl=bf
+```
+
+### Execution level
+
+For particular execution can be provided as user settings on command line:
+
+```
+$ mvn ... -Daether.enhancedLocalRepository.split \
+          -Daether.enhancedLocalRepository.localPrefix=maven-resolver/mresolver-253
+          -Daether.enhancedLocalRepository.splitRemoteRepository
+```
 
 ## How To Upgrade from Wagon? (or "native transport does not work")