• Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    Java
  • License
    MIT License
  • Created about 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Search the Maven Central Repository from your command line!

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 by default a pom.xml snippet for the artifact you searched for. Ready for copy & paste in your favourite IDE!
    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.
  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 modes 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
Chocolatey 🪟 choco install mcs
  1. The Linux binaries only work on x86_64 CPU's. There Apple binaries for both x86_64 and Apple Silicon, so you don't need Rosetta.

Usage with custom trust store

In certain situations, such as when you work behind a TLS-intercepting (corporate) firewall, MCS may fail with

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

In layman's speak: the default, built-in trust store (the set of trusted X.509 certificates) does not contain anything that allows to trust the certificate(s) presented by the server. Maven Central uses a certificate that would've been trusted, but the culprit here is the TLS-intercepting (corporate) firewall that presents an internal certificate.

The solution is to create a trust store that has the "highest" certificate in the certificate chain, e.g. that of the (internal) certificate authority. You can use a tool like Portecle to create such a trust store. Next, point MCS to that trust store like so

mcs -Djavax.net.ssl.trustStore=/path/to/keystore search something

Contributing

Probably the easiest way to get a working development environment is to use Gitpod:

Open in 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.

Checkout the issues if you're looking for something to work on. If you have a new idea, feel free to bring it up using the discussions.

More Repositories

1

hyperion

Hyperion is a system that observes a 'Smart Energy Meter'
Scala
11
star
2

homebrew-maven-snapshot

Homebrew tap to install the latest Maven build
Ruby
10
star
3

brainfuck-jvm

This project provides a Brainfuck implementation on the JVM.
Brainfuck
9
star
4

clocky

Time-related test utilities for Java
Java
8
star
5

dapr-workshop-java

Source code for the Java version of the Dapr workshop (see README for more info).
Java
6
star
6

pit-stryker-dashboard-reporter

A PIT reporter that publishes to the Stryker Mutator Dashboard
Java
5
star
7

whats-cooking-maven-demos

What's Cooking in Maven? -- Demo's
Java
4
star
8

playing-with-loom

Some sample code to accompany my blog post "Playing with Loom"
Java
4
star
9

maven4-examples

Examples for "Wait no more, here comes Maven 4!"
Java
3
star
10

reveal-theme-im-blue

A very blue theme for Reveal.js-based presentations
HTML
3
star
11

hyperion-web

TypeScript
2
star
12

lin2go

JavaScript
2
star
13

dapr-examples

Examples of using Dapr
Java
1
star
14

mthmulders

1
star
15

oci-terraform-demo-vm

Terraform demo with virtual machine on Oracle Cloud
HCL
1
star
16

dapr-issue-tracing

Shows the issue with distributed tracing in Dapr for Java SDK not workin
Java
1
star
17

shades-of-grey

A Reveal.js theme where a dark shade of grey is dominant
CSS
1
star
18

dapr-traffic-control

Simple sample application for learning Dapr
Java
1
star
19

quarkus-mvc

This is an experiment to see if JSR-371 (Model-View-Controller) could work in Quarkus.
Java
1
star
20

custom-maven-release-strategies

Custom strategies for the Maven Release Plugin
Java
1
star
21

spotithrow

Throws your Spotify songs to a DLNA player
Groovy
1
star
22

enterprise-beers

Sample application used in my talk "Mastering Microservices with Kong"
Java
1
star
23

maven-release-plugin-demos

Demos of the Maven Release Plugin
Java
1
star