What's the difference between https://search.maven.org/ and https://mvnrepository.com/?
2 Answers
search.maven.org
is the official central search engine of Central Repository handled and very well maintained by
- Sonatype Inc.
- with support etc. https://central.sonatype.org/
- Status Information about Central: https://status.maven.org/
Whereas the part https://repo.maven.apache.org/maven2/ is the real Central repository (distributed world wide via CDN) which is being used by default by Apache Maven, Gradle etc.
mvnrepository.com
is a search engine (not always up to date) and sometimes misused as a repository, which does not work because it's only a search engine. The site says it is maintained by Twitter user @frodriguez whose profile identifies them as Fernando Rodriguez Olivera.

- 6,997
- 6
- 48
- 74

- 92,914
- 28
- 189
- 235
-
8does that mean better stick to the https://search.maven.org/ and https://repo.maven.apache.org/maven2/ right? – zyxue Jul 13 '20 at 20:36
-
2Right @zyxue that's the recommended way. – julian-alarcon Dec 01 '21 at 11:09
-
1If it's official, it would really be helpful to mention it somewhere in maven's official documentation. I just spent dozens of minutes searching. Thanks anyway! – Nicolas Seiller Sep 28 '22 at 14:41
-
mvnrepository.com used to be better than search.maven.org in terms of usability but it seems like search.maven.org has improved a bit over the past few years. – Captain Man Feb 22 '23 at 22:38
This answer is very in-depth and likely to answer all of your questions. It is true that search.maven.org
is the official search engine.
One thing that mvnrepository.com
still does better (because search.maven.org
does not do it at all) is tell you what libraries are popular. For example, see here that JUnit is the most popular with over 121,000 uses! This can be a useful feature for developers who are hesitant to add dependencies to their projects because they don't want their consumers to have to pull in yet another dependency.
For example, if you were considering pulling in org.apache.commons:commons-lang3
then you may feel better knowing that it is the 6th most popular library overall (and 2nd most popular "core utility"). It is more likely that your consumers are using this library already than something else.
Of course that's not the most scientific thing but it's still a cool feature that is unique to it.

- 6,997
- 6
- 48
- 74
-
BTW: A hint about your link to most popular (junit) which references to out dated JUnit 4 and Junit 3... which also has the last release in 2021... I would never recommend to start a project today with JUnit 4... Start with JUnit Jupiter (aka JUnit 5)... it shows from my understanding only the usage of other artifacts in repos (referenced in other pom files) but **not** the overall usage of JUnit 4 or alike (in number of downloads from central or other repos)...121,000 uses is the total over all version which includes vulnerable versions etc... – khmarbaise Feb 23 '23 at 21:29
-
Very important for example https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin shows used by 141 artifacts (which is in general an issue; a plugin as a dependency is wrong!). The number of downloads on central for maven-compiler-plugin counts ca. 22,5 million times (for all different versions) only in january 2023.. (https://twitter.com/khmarbaise/status/1628872566147280899?s=20) – khmarbaise Feb 23 '23 at 21:43