Use Maven Central Repository Search from your command line!
Use mcs
to quickly lookup dependency coordinates in Maven Central, without having to switch to your browser.
This tool supports the following modes of searching:
- Wildcard search
This will give you all artifacts in Maven Central that have "plexus-utils" in their name. The output is in a tabular form, showing the exact coordinate of each artifact and the moment when its latest version was deployed.
mcs search plexus-utils
- Coordinate search
If there are multiple hits, you will get the same table output as above. But if there's only one hit, this will give you by default a pom.xml snippet for the artifact you searched for. Ready for copy & paste in your favourite IDE!
mcs search org.codehaus.plexus:plexus-utils mcs search org.codehaus.plexus:plexus-utils:3.4.1
If you require snippet in different format, use-f <type>
or--format=<type>
. Supported types are:maven
,gradle
,gradle-short
,gradle-kotlin
,sbt
,ivy
,grape
,leiningen
,buildr
. - Class-name search
This will give you all artifacts in Maven Central that contain a particular class. If you set the
mcs class-search CommandLine mcs class-search -f picocli.CommandLine
-f
flag, the search term is considered a "fully classified" class name, so including the package name.
All modes recognise the -l <number>
switch, which lets you specify how many results you want to see at most.
You can install mcs using the package manager of your choice:
Package manager | Platform | Installation | Remarks |
---|---|---|---|
Homebrew | 🍎 🐧 | brew install mthmulders/tap/mcs |
|
Snap | 🐧 | snap install maven-central-search |
|
SDKMAN! | 🍎 🐧 | sdk install mcs |
|
Chocolatey | 🪟 | choco install mcs |
- The macOS and Linux binaries only work on x86_64 CPU's. If you have a Mac with Apple Silicon, you can use mcs through Rosetta.
Probably the easiest way to get a working development environment is to use Gitpod:
It will configure a workspace in your browser and show that everything works as expected by running mvn verify
.
This setup does not touch your computer - as soon as you close your browser tab, it's gone.
- Proper support for multiple classifiers at a particular coordinate.
- Immediately copy the pom.xml snippet to the clipboard.
- Show the coordinates in a different form (Ivy, Gradle, SBT).