# mvn-artifact-filename

> create filename for maven artifact

Latest version **6.1.2** (published 2026-04-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install mvn-artifact-filename
pnpm add mvn-artifact-filename
yarn add mvn-artifact-filename
bun add mvn-artifact-filename
```

## Health

**Score 55/100 (C)** — status: stable.

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 6.1.2 |
| Published | 2026-04-11 |
| First published | 2015-12-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Sigurd Fosseng |
| Maintainers | laat |
| Keywords | maven, artifact |

## Links

- npm: https://www.npmjs.com/package/mvn-artifact-filename
- Repository: https://github.com/laat/mvn-dl
- Homepage: https://github.com/laat/mvn-dl#readme
- Issues: https://github.com/laat/mvn-dl/issues
- npm.io page: https://npm.io/package/mvn-artifact-filename

## Recent versions

- 6.1.2 (latest) — 2026-04-11
- 6.1.0 — 2023-05-16
- 6.0.0 — 2021-06-03
- 5.1.0 — 2020-05-28
- 5.0.0 — 2020-05-18
- 4.1.0 — 2019-11-28
- 4.0.0 — 2018-09-02
- 3.0.2 — 2018-02-04
- 3.0.1 — 2017-09-08
- 3.0.0 — 2017-09-07
- 2.0.1 — 2017-05-13
- 2.0.0 — 2017-05-13
- 1.0.5 — 2016-08-10
- 1.0.4 — 2016-04-11
- 1.0.3 — 2016-03-02
- … 3 more at https://npm.io/package/mvn-artifact-filename/versions

## README

# mvn-artifact-filename

## Install

```
$ npm install --save mvn-artifact-filename
```

## Usage

```javascript
import createFilename from 'mvn-artifact-filename';

let artifact;

artifact = {
  groupId: 'org.apache.commons',
  artifactId: 'commons-lang3',
  version: '3.4',
};
createFilename(artifact);
//=> "commons-lang3-3.4.jar"

artifact = {
  groupId: 'org.apache.commons',
  artifactId: 'commons-lang3',
  extension: 'war',
  version: '3.4',
};
createFilename(artifact);
//=> "commons-lang3-3.4.war"

artifact = {
  groupId: 'org.apache.commons',
  artifactId: 'commons-lang3',
  extension: 'war',
  classifier: 'tests',
  version: '3.4',
};
createFilename(artifact);
//=> "commons-lang3-3.4-tests.war"

artifact = {
  groupId: 'org.apache.commons',
  artifactId: 'commons-lang3',
  version: '3.4',
  isSnapShot: true,
  snapShotVersion: '123',
};
createFilename(artifact);
//=> "commons-lang3-3.4-123.jar"
```

## License

MIT © [Sigurd Fosseng](http://github.com/laat)

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