cstamas commented on issue #11469:
URL: https://github.com/apache/maven/issues/11469#issuecomment-3554598019
Maven is all about (various) scopes 😄
Hint: try it with Maven 4.0.0-rc-5.
The important difference between Maven 3 and Maven 4:
3.9.11:
```
[cstamas@angeleyes ~]$ mvn -V toolbox:gav-effective-model
-Dgav=org.springframework.boot:spring-boot-dependencies:3.5.6 | grep -A 2 -B 2
central
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
--
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
[cstamas@angeleyes ~]$
```
4.0.0-rc-5:
```
[cstamas@angeleyes ~]$ mvn -V toolbox:gav-effective-model
-Dgav=org.springframework.boot:spring-boot-dependencies:3.5.6 | grep -A 2 -B 2
central
[INFO]
[INFO] Scanning for projects...
[INFO] Loaded 21611 auto-discovered prefixes for remote repository central
(prefixes-central.txt)
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom
>-------------------
[cstamas@angeleyes ~]$
```
All this happens due "super POM" of Maven 3.x:
https://github.com/apache/maven/blob/f0ecd472a1d11b16916d3e9be8b5b09f7ebd6465/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
Compare it with Maven 4 "super POM":
https://github.com/apache/maven/blob/a336a2c579ac62958f2a9a3e3853637c13c4e03c/impl/maven-impl/src/main/resources/org/apache/maven/model/pom-4.0.0.xml
Hint: there is no repository stanza in Maven 4 superpom.
Long outstanding issue (created against 3.6.3 I guess):
https://github.com/apache/maven/issues/8494
So, yes, this was a "feature" of Maven 3, fixed finally in Maven 4 among
many other things.
But, in your case and with Maven 3 "usual practice" is to _mirror_ and
_redefine_ (exactly due this issue) the central:
https://maven.apache.org/guides/mini/guide-mirror-settings.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]