From f759883c6cff4437bfe44267bdc470ed5b2a6292 Mon Sep 17 00:00:00 2001 From: shishuiwuhen2009 <90782280+shishuiwuhen2009@users.noreply.github.com> Date: Fri, 25 Apr 2025 10:59:26 +0800 Subject: [PATCH] Update getting-started.adoc docs: add Maven mirror config note for Spring AI snapshots Add documentation about Maven mirror configuration when using Spring AI snapshots, including examples of correct mirrorOf settings to allow access to Spring repositories. Signed-off-by: shishuiwuhen2009 <90782280+shishuiwuhen2009@users.noreply.github.com> --- .../modules/ROOT/pages/getting-started.adoc | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc index e4f2f4391..782704375 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc @@ -70,13 +70,29 @@ repositories { } } ---- -**NOTE:** If you're using Maven mirror settings (typically in `settings.xml`), ensure your `` configuration excludes Spring repositories: + +**NOTE:** When using Maven with Spring AI snapshots, pay attention to your Maven mirror configuration. If you have configured a mirror in your `settings.xml` like this: + ```xml - *,!spring-snapshots,!central-portal-snapshots - + my-mirror + * + https://my-company-repository.com/maven ``` + +The wildcard `*` will redirect all repository requests to your mirror, preventing access to Spring snapshot repositories. To fix this, modify the `mirrorOf` configuration to exclude Spring repositories: + +```xml + + my-mirror + *,!spring-snapshots,!central-portal-snapshots + https://my-company-repository.com/maven + +``` + +This configuration allows Maven to access Spring snapshot repositories directly while still using your mirror for other dependencies. + ====== [[dependency-management]]