From 54c1b2f28a83d2255a28ccc174e60720f9fd4e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Mon, 29 Jan 2024 16:54:04 +0100 Subject: [PATCH] [MNG-8029] improve documentation about mirror settings --- apache-maven/src/site/site.xml | 5 ----- .../src/main/mdo/settings.mdo | 19 ++++++++++++++----- maven-artifact/src/site/site.xml | 3 --- maven-builder-support/src/site/site.xml | 3 --- maven-compat/src/site/site.xml | 3 --- .../maven/bridge/MavenRepositorySystem.java | 11 ++++++----- maven-core/src/site/site.xml | 6 ------ maven-embedder/src/site/site.xml | 7 ------- maven-model-builder/src/site/site.xml | 7 ------- maven-model/src/site/site.xml | 3 --- maven-plugin-api/src/site/site.xml | 3 --- maven-repository-metadata/src/site/site.xml | 3 --- maven-resolver-provider/src/site/site.xml | 3 --- maven-settings-builder/src/site/site.xml | 3 --- maven-settings/src/site/apt/index.apt | 12 ++++++++++++ maven-settings/src/site/site.xml | 3 --- maven-slf4j-provider/src/site/site.xml | 3 --- src/site/site.xml | 11 ++++++----- 18 files changed, 38 insertions(+), 70 deletions(-) diff --git a/apache-maven/src/site/site.xml b/apache-maven/src/site/site.xml index cd7807c147..71da9b0f1a 100644 --- a/apache-maven/src/site/site.xml +++ b/apache-maven/src/site/site.xml @@ -23,9 +23,4 @@ under the License. xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 http://maven.apache.org/xsd/decoration-1.8.0.xsd"> ${project.scm.url} - - - - - \ No newline at end of file diff --git a/api/maven-api-settings/src/main/mdo/settings.mdo b/api/maven-api-settings/src/main/mdo/settings.mdo index 75862fb107..2135ae3e93 100644 --- a/api/maven-api-settings/src/main/mdo/settings.mdo +++ b/api/maven-api-settings/src/main/mdo/settings.mdo @@ -28,7 +28,7 @@ This is a reference for the user-specific configuration for Maven.

-

Includes things that should not be distributed with the pom.xml file, such as developer identity, along with +

Includes things that should not be distributed with the pom.xml file, such as developer identity, along with local settings, like proxy information.

The default location for the settings file is {@code ~/.m2/settings.xml}.

]]> @@ -90,6 +90,7 @@ String default true + Item identifier. @@ -125,7 +126,7 @@ usePluginRegistry 1.0.0+ - Whether Maven should use the plugin-registry.xml file to manage plugin versions. + Whether Maven should use the {@code plugin-registry.xml} file to manage plugin versions. boolean false @@ -405,7 +406,7 @@ nonProxyHosts 1.0.0+ - The list of non-proxied hosts (delimited by |). + The list of non-proxied hosts (delimited by {@code |}). String @@ -541,8 +542,12 @@ 1.0.0+ String - The server ID of the repository being mirrored, e.g., - "central". This MUST NOT match the mirror id. + central or *,!repo1. + * (since Maven 2.0.5), external:* (since Maven 2.0.9) and external:http:* (since Maven 3.8.0) have + a special meaning: see Mirror Settings guide. + ]]> @@ -586,7 +591,11 @@ boolean false + Default value is: false +
Since: Maven 3.8.0 + ]]>
diff --git a/maven-artifact/src/site/site.xml b/maven-artifact/src/site/site.xml index 8ffe43d07c..78e98089a6 100644 --- a/maven-artifact/src/site/site.xml +++ b/maven-artifact/src/site/site.xml @@ -31,8 +31,5 @@ under the License.
- - - \ No newline at end of file diff --git a/maven-builder-support/src/site/site.xml b/maven-builder-support/src/site/site.xml index 8ffe43d07c..78e98089a6 100644 --- a/maven-builder-support/src/site/site.xml +++ b/maven-builder-support/src/site/site.xml @@ -31,8 +31,5 @@ under the License. - - - \ No newline at end of file diff --git a/maven-compat/src/site/site.xml b/maven-compat/src/site/site.xml index 8ffe43d07c..78e98089a6 100644 --- a/maven-compat/src/site/site.xml +++ b/maven-compat/src/site/site.xml @@ -31,8 +31,5 @@ under the License. - - - \ No newline at end of file diff --git a/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java b/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java index 54766d5086..1810c50a90 100644 --- a/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java +++ b/maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java @@ -62,6 +62,7 @@ import org.eclipse.aether.repository.ProxySelector; import org.eclipse.aether.repository.RemoteRepository; /** + * @since 3.2.3 */ @Named("default") @Singleton @@ -691,11 +692,11 @@ public class MavenRepositorySystem { /** * This method checks if the pattern matches the originalRepository. Valid patterns: *
    - *
  • {@code *} = everything,
  • - *
  • {@code external:*} = everything not on the localhost and not file based,
  • - *
  • {@code external:http:*} = any repository not on the localhost using HTTP,
  • - *
  • {@code repo,repo1} = {@code repo} or {@code repo1},
  • - *
  • {@code *,!repo1} = everything except {@code repo1}.
  • + *
  • {@code *} (since 2.0.5)= everything,
  • + *
  • {@code external:*} (since 2.0.9)= everything not on the localhost and not file based,
  • + *
  • {@code external:http:*} (since 3.8.0)= any repository not on the localhost using HTTP,
  • + *
  • {@code repo,repo1} (since 2.0.9)= {@code repo} or {@code repo1},
  • + *
  • {@code *,!repo1} (since 2.0.9)= everything except {@code repo1}.
  • *
* * @param originalRepository to compare for a match. diff --git a/maven-core/src/site/site.xml b/maven-core/src/site/site.xml index 09663df667..e1daa24380 100644 --- a/maven-core/src/site/site.xml +++ b/maven-core/src/site/site.xml @@ -33,14 +33,8 @@ under the License.
- - - - - - \ No newline at end of file diff --git a/maven-embedder/src/site/site.xml b/maven-embedder/src/site/site.xml index c1bd4a7df2..78e98089a6 100644 --- a/maven-embedder/src/site/site.xml +++ b/maven-embedder/src/site/site.xml @@ -31,12 +31,5 @@ under the License. - - - - - - - \ No newline at end of file diff --git a/maven-model-builder/src/site/site.xml b/maven-model-builder/src/site/site.xml index 61e47a68fe..78e98089a6 100644 --- a/maven-model-builder/src/site/site.xml +++ b/maven-model-builder/src/site/site.xml @@ -31,12 +31,5 @@ under the License. - - - - - - - \ No newline at end of file diff --git a/maven-model/src/site/site.xml b/maven-model/src/site/site.xml index 8ffe43d07c..78e98089a6 100644 --- a/maven-model/src/site/site.xml +++ b/maven-model/src/site/site.xml @@ -31,8 +31,5 @@ under the License. - - - \ No newline at end of file diff --git a/maven-plugin-api/src/site/site.xml b/maven-plugin-api/src/site/site.xml index 1cbf42b096..598e443943 100644 --- a/maven-plugin-api/src/site/site.xml +++ b/maven-plugin-api/src/site/site.xml @@ -35,8 +35,5 @@ - - - \ No newline at end of file diff --git a/maven-repository-metadata/src/site/site.xml b/maven-repository-metadata/src/site/site.xml index 8ffe43d07c..78e98089a6 100644 --- a/maven-repository-metadata/src/site/site.xml +++ b/maven-repository-metadata/src/site/site.xml @@ -31,8 +31,5 @@ under the License. - - - \ No newline at end of file diff --git a/maven-resolver-provider/src/site/site.xml b/maven-resolver-provider/src/site/site.xml index 8ffe43d07c..78e98089a6 100644 --- a/maven-resolver-provider/src/site/site.xml +++ b/maven-resolver-provider/src/site/site.xml @@ -31,8 +31,5 @@ under the License. - - - \ No newline at end of file diff --git a/maven-settings-builder/src/site/site.xml b/maven-settings-builder/src/site/site.xml index 8ffe43d07c..78e98089a6 100644 --- a/maven-settings-builder/src/site/site.xml +++ b/maven-settings-builder/src/site/site.xml @@ -31,8 +31,5 @@ under the License. - - - \ No newline at end of file diff --git a/maven-settings/src/site/apt/index.apt b/maven-settings/src/site/apt/index.apt index 95193e910a..93388edb8e 100644 --- a/maven-settings/src/site/apt/index.apt +++ b/maven-settings/src/site/apt/index.apt @@ -37,3 +37,15 @@ Maven Settings Model * A {{{./settings.html}Descriptor Reference}} * An {{{https://maven.apache.org/xsd/settings-1.2.0.xsd}XSD}} + +* See Also User Documentation + + * {{{https://maven.apache.org/settings.html} Settings Reference}}, + + * {{{https://maven.apache.org/guides/mini/guide-mirror-settings.html} Mirror Settings}}, + + * {{{https://maven.apache.org/guides/mini/guide-deployment-security-settings.html} Security and Deployment Settings}}, + + * {{{https://maven.apache.org/guides/mini/guide-encryption.html} Password Encryption}}, + + * {{{https://maven.apache.org/guides/mini/guide-proxies.html} Configuring a proxy}}. diff --git a/maven-settings/src/site/site.xml b/maven-settings/src/site/site.xml index 8ffe43d07c..78e98089a6 100644 --- a/maven-settings/src/site/site.xml +++ b/maven-settings/src/site/site.xml @@ -31,8 +31,5 @@ under the License. - - - \ No newline at end of file diff --git a/maven-slf4j-provider/src/site/site.xml b/maven-slf4j-provider/src/site/site.xml index 8ffe43d07c..78e98089a6 100644 --- a/maven-slf4j-provider/src/site/site.xml +++ b/maven-slf4j-provider/src/site/site.xml @@ -31,8 +31,5 @@ under the License. - - - \ No newline at end of file diff --git a/src/site/site.xml b/src/site/site.xml index 3ba52bda59..71a31a02b1 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -46,25 +46,26 @@ under the License. - + - + + - + - - + + \ No newline at end of file