# mvn-up

> Upload an artifact to a maven repository

Latest version **1.1.6** (published 2022-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install mvn-up
pnpm add mvn-up
yarn add mvn-up
bun add mvn-up
```

Provides the command `mvn-up`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2022-05-11 |
| First published | 2020-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 22.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Andreas Lindgren |
| Maintainers | auo |
| Keywords | maven, repository, artifact, nexus |

## Links

- npm: https://www.npmjs.com/package/mvn-up
- Repository: https://github.com/Auo/mvn-up
- Homepage: https://github.com/Auo/mvn-up#readme
- Issues: https://github.com/Auo/mvn-up/issues
- npm.io page: https://npm.io/package/mvn-up

## Dependencies (2)

- [got](https://npm.io/package/got.md) ^11.8.3
- [commander](https://npm.io/package/commander.md) ^8.3.0

## Recent versions

- 1.1.6 (latest) — 2022-05-11
- 1.1.5 — 2022-01-26
- 1.1.3 — 2021-06-16
- 1.1.2 — 2021-04-01
- 1.1.1 — 2020-05-18
- 1.1.0 — 2020-05-14
- 1.0.0 — 2020-05-13

## README

# mvn-up
![run-tests](https://github.com/Auo/maven-upload/workflows/run-tests/badge.svg?branch=master) 
[![](https://img.shields.io/npm/v/mvn-up?logo=npm)](https://www.npmjs.com/package/mvn-up)

Upload artifacts to a maven repository, when it's not a maven-project. Inspired by [nexus-deployer](https://github.com/cthorne66/nexus-deployer).

## Dependency

`npm install --save-dev mvn-up`

```js
const mvnUp = require('mvn-up');

mvnUp('com.some.group', // groupId
    'some_artifact_id', // artifactId
    '1.0.2-SNAPSHOT', // version
    'zip', // packaging
    'Distribution', // classifier
    '/path/to/file.zip', // artifact
    'http://localhost:8081/repository/maven-snapshots', // base url to repo
    { username: 'user', password: 'password' } // authentication
    ).then(() => console.log('📦 upload done'))
    .catch(err => console.error('❌upload failed', err));
```

## CLI

### Run with npx
```bash
npx mvn-up -g com.some.group -a test_package -v 1.0.3-SNAPSHOT -P zip -f ./test/test.zip -u username -p password -U http://localhost:8081/repository/maven-snapshots
```

### Options

```bash
Usage: cli [options]

Options:
  -g, --groupId <id>                 group id of artifact
  -a, --artifactId <id>              artifact id
  -v, --artifactVersion <version>   version of artifact
  -P, --packaging <extension>       file extension of artifact
  -f, --file <path>                  artifact to upload
  -c, --classifier <classifier>      classifier of artifact
  -u, --user <user>                  maven repository user
  -p, --password <password>          password for user
  -U, --url <url>                    base url to repository
  -V, --version                      output the version number
  -h, --help                         display help for command
```

---
_Source: https://npm.io/package/mvn-up · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
