Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/davidafsilva/mvn-search-cli

CLI script for searching artifacts at maven central
https://github.com/davidafsilva/mvn-search-cli

Last synced: 8 days ago
JSON representation

CLI script for searching artifacts at maven central

Awesome Lists containing this project

README

        

# mvn-search-cli
CLI script for searching artifacts at maven central

## Requirements
- Make sure you have python 2.7+ (<3) installed and the mvn-search script executable
- update your PATH variable to include the executable.

## Usage
```
mvn-search [-h] [-r max_results] [-f format] [-v] query
```
The supported formats are: 'table', 'mvn', 'buildr', 'ivy', 'grape', 'gradle', 'sbt', 'leiningen'. 'table' is the default output.

The query supports all coordinates, classname and SHA-1 checksum parameters:
* g:group.identifier
* a:artifact.identifier
* v:version.identifier
* l:classifier
* p:packaging-type
* fc:fully.classified.classname
* c:classname
* 1:hash

These query parameters can be mixed together. if separated by the AND keyword, all
parameters must be satisfied. e.g. "g:io.vertx AND a:vertx-core AND v:3.1.0"

## Examples
Search for vertx artifacts:
```
→ mvn-search vertx
┌────────────────────────────────────────────────────────────┐
│ group id │ artifact id │ version │
├────────────────────────────────────────────────────────────┤
│ io.vertx │ vertx-dependencies │ 3.1.0 │
│ com.englishtown.vertx │ vertx-httpservlet-parent │ 2.1.0 │
│ com.englishtown.vertx │ vertx-cassandra-parent │ 3.1.0 │
│ com.englishtown.vertx │ vertx-zookeeper-parent │ 2.1.0 │
│ com.englishtown.vertx │ vertx-jersey-parent │ 4.2.0 │
│ com.englishtown.vertx │ vertx-when-parent │ 4.1.0 │
│ com.englishtown.vertx │ vertx-guice-parent │ 2.1.0 │
│ com.englishtown.vertx │ vertx-hk2-parent │ 2.1.0 │
│ com.englishtown.vertx │ oss-parent-vertx │ 2.1.0 │
│ io.vertx │ vertx-stack │ 3.1.0 │
└────────────────────────────────────────────────────────────┘
```
Search for the first three results of artifacts from io.vertx with mvn specific output:
```
→ mvn-search -f mvn -r 3 g:io.vertx

io.vertx
vertx-stack-npm/artifactId>
3.1.0

io.vertx
vertx-stack-docs/artifactId>
3.1.0

io.vertx
vertx-stack-docker/artifactId>
3.1.0

```