Skip to content

Commit 71e479e

Browse files
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 <[email protected]>
1 parent 2bc29da commit 71e479e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,29 @@ repositories {
7070
}
7171
}
7272
----
73+
74+
**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:
75+
76+
```xml
77+
<mirror>
78+
<id>my-mirror</id>
79+
<mirrorOf>*</mirrorOf>
80+
<url>https://my-company-repository.com/maven</url>
81+
</mirror>
82+
```
83+
84+
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:
85+
86+
```xml
87+
<mirror>
88+
<id>my-mirror</id>
89+
<mirrorOf>*,!spring-snapshots,!central-portal-snapshots</mirrorOf>
90+
<url>https://my-company-repository.com/maven</url>
91+
</mirror>
92+
```
93+
94+
This configuration allows Maven to access Spring snapshot repositories directly while still using your mirror for other dependencies.
95+
7396
======
7497

7598
[[dependency-management]]

0 commit comments

Comments
 (0)