mvn-artifact-download
TypeScript icon, indicating that this package has built-in type declarations

6.1.1 • Public • Published

mvn-artifact-download

Install

$ npm install --save mvn-artifact-download

Usage

import download from 'mvn-artifact-download';

download('org.apache.commons:commons-lang3:3.4');
// Promise that resolves to destination filename

download({
  groupId: 'org.apache.commons',
  artifactId: 'commons-lang3',
  version: '3.4',
});
// Promise that resolves to destination filename

download('org.apache.commons:commons-lang3:3.4', '/path/to/destination/dir');
// Promise that resolves to destination filename

download(
  'org.apache.commons:commons-lang3:3.4',
  null,
  'http://alternative.repo'
);
// Promise that resolves to destination filename

download(
  'org.apache.commons:commons-lang3:3.4',
  null,
  'http://alternative.repo',
  { timout: 1000 } // with optional timeout
);
// Promise that resolves to destination filename

API

download(artifactName, [destinationFolder], [repository], [fetchOptions])

Downloads an artifact from the repository

artifactName

Type: string | Artifact

destinationFolder

Type: string Default: process.cwd()

repository

Type: string

fetchOptions

An optional object containing

Attribute: timeout number req/res timeout in ms Attribute: agent http.Agent allows custom proxy, certificate etc.

License

MIT © Sigurd Fosseng

Readme

Keywords

Package Sidebar

Install

npm i mvn-artifact-download

Weekly Downloads

1,515

Version

6.1.1

License

MIT

Unpacked Size

5.19 kB

Total Files

4

Last publish

Collaborators

  • laat