Skip to content
forked from mthmulders/mcs

Search the Maven Central Repository from your command line!

License

Notifications You must be signed in to change notification settings

willemvanlent/mcs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Central Search

Build status Mutation testing badge Snapcraft.io status

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.

Usage

This tool supports the following modes of searching:

  1. Wildcard search
    mcs search plexus-utils
    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.
  2. Coordinate search
    mcs search org.codehaus.plexus:plexus-utils
    mcs search org.codehaus.plexus:plexus-utils:3.4.1
    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 a pom.xml snippet for the artifact you searched for. Ready for copy & paste in your favourite IDE!
  3. Class-name search
    mcs class-search CommandLine
    mcs class-search -f picocli.CommandLine
    This will give you all artifacts in Maven Central that contain a particular class. If you set the -f flag, the search term is considered a "fully classified" class name, so including the package name.

All modi recognise the -l <number> switch, which lets you specify how many results you want to see at most.

Installation

You can install mcs using the package manager of your choice:

Package manager Platform Installation Remarks
Homebrew 🍎 🐧 brew install mthmulders/tap/mcs ⚠️ 1
Snap 🐧 snap install maven-central-search
SDKMAN! 🍎 🐧 sdk install mcs ℹ️ 2
Chocolatey 🪟 choco install mcs --version=0.1.18 ℹ️ 3
  1. 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.
  2. There is no global alias (yet), so you have to run maven-central-search.mcs. Alternatively, you can define one in your favourite shell; alias mcs=maven-central-search.mcs should do.
  3. For now, you have to specify the exact version when installing mcs. When the Chocolatey community has approved of the package, this requirement will be lifted.

Ideas for future development

  • 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).

About

Search the Maven Central Repository from your command line!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%