# maven-repository-manager

> A library that provides an implementation for managing maven artifacts

Latest version **1.0.2** (published 2019-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install maven-repository-manager
pnpm add maven-repository-manager
yarn add maven-repository-manager
bun add maven-repository-manager
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-06-16 |
| First published | 2019-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 17.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | David Op de Beeck |
| Maintainers | daxude |

## Links

- npm: https://www.npmjs.com/package/maven-repository-manager
- Repository: https://github.com/DavidOpDeBeeck/maven-repository-manager
- Homepage: https://github.com/DavidOpDeBeeck/maven-repository-manager#readme
- Issues: https://github.com/DavidOpDeBeeck/maven-repository-manager/issues
- npm.io page: https://npm.io/package/maven-repository-manager

## Dependencies (4)

- [request](https://npm.io/package/request.md) ^2.88.0
- [typescript](https://npm.io/package/typescript.md) ^3.3.3
- [@types/node](https://npm.io/package/@types/node.md) ^11.9.4
- [@types/request](https://npm.io/package/@types/request.md) ^2.48.1

## Recent versions

- 1.0.2 (latest) — 2019-06-16
- 1.0.1 — 2019-06-16
- 1.0.0 — 2019-03-30

## README

## Installation

```sh
npm install maven-repository-manager
```

## RepositoryManager

The main entrypoint of this library is the `RepositoryManager` class. It provides a `download` method to retrieve artifacts from a local or remote repository. 

### Configuration

```typescript
export interface RepositoryManagerOptions {
    offlineMode?: boolean,
    localRepository?: LocalRepository
    remoteRepositories?: RemoteRepository[]
}
```

#### Offline mode

Specifies whether only the local repository will be used when downloading artifacts.

#### Local repository

Specifies the local maven repository to use when downloading artifacts. The local repository is always queried before the remote repositories. 
It will default to `~/.m2/repository/` when omitted.

#### Remote repositories

Specifies a list of remote maven repositories to use when downloading artifacts. Extra configuration can be supplied by using the `RemoteRepositoryOptions` interface. 
It will default to the maven central repository when omitted.

### Usage

```js
const repositoryManager = new RepositoryManager();
const seleniumArtifact = Artifact.from('org.seleniumhq.selenium:selenium-java:1.0.0');

repositoryManager.download(seleniumArtifact)
    .then(readable => readable.pipe(createWriteStream('./selenium.jar')));
```

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