diff --git a/content/markdown/guides/introduction/introduction-to-profiles.md b/content/markdown/guides/introduction/introduction-to-profiles.md index ef08d00979..49eb5410c9 100644 --- a/content/markdown/guides/introduction/introduction-to-profiles.md +++ b/content/markdown/guides/introduction/introduction-to-profiles.md @@ -126,6 +126,8 @@ Example to set a profile active by default. ``` +**Note for resolver configuration:** When configuring [Maven Resolver](../mini/guide-resolver-transport.html#system-level) low-level options (`aether.*` system properties) in a `settings.xml` profile, `true` does **not** suffice -- the resolver session is built before profile activation conditions are evaluated. List the profile id under `` (or pass `-P `) instead. + ##### JDK The following configuration will trigger the profile when the JDK's version _starts with_ `1.4` (for example `1.4.0_08`, `1.4.2_07`, `1.4`), in particular it _won't be active_ for **newer** versions like `1.8` or `11`: diff --git a/content/markdown/guides/mini/guide-resolver-transport.md b/content/markdown/guides/mini/guide-resolver-transport.md index 2abadec7e1..409e462075 100644 --- a/content/markdown/guides/mini/guide-resolver-transport.md +++ b/content/markdown/guides/mini/guide-resolver-transport.md @@ -148,10 +148,14 @@ Configuration can be provided on global level as properties in `settings.xml` ``` -**NOTICE** -- only profiles activated by `settings/activeProfiles` will be taken for consideration - you can not use `profile/activation` in such case +**NOTICE:** Only profiles activated explicitly are honored here: -You can also use environment variable `MAVEN_OPTS` ot `MAVEN_ARGS` +* via `` (the explicit list at the bottom of `settings.xml`), or +* via CLI `-P `. + +Profiles activated through `` conditions in the profile itself — ``, ``, ``, ``, `` — are **not** taken into account for the resolver session config: the resolver session is built before Maven evaluates those conditions. + +You can also use environment variable `MAVEN_OPTS` or `MAVEN_ARGS` ``` export MAVEN_ARGS="-Daether.connector.http.preemptiveAuth=true"