# How to get the archive name of a project's jarfile using the gradle API

**URL:** <https://discuss.gradle.org/t/how-to-get-the-archive-name-of-a-projects-jarfile-using-the-gradle-api/19714>\
**Category:** Help/Discuss\
**Created:** [September 25, 2016, 9:13pm UTC](https://discuss.gradle.org/t/how-to-get-the-archive-name-of-a-projects-jarfile-using-the-gradle-api/19714 "2016-09-25T21:13:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Redrield](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@Redrield](https://discuss.gradle.org/u/Redrield)\
**Post date:** [September 25, 2016, 9:13pm UTC](https://discuss.gradle.org/t/how-to-get-the-archive-name-of-a-projects-jarfile-using-the-gradle-api/19714/1 "2016-09-25T21:13:27Z")

</div>

Title says it all. Is it possible to get the name of a Project’s jarfile name from the Project object?

---

<div class="post-metadata">

**Author:** ![mark\_vieira](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mark_vieira/32/5396_2.png) [@mark\_vieira](https://discuss.gradle.org/u/mark_vieira)\
**Post date:** [September 26, 2016, 4:37pm UTC](https://discuss.gradle.org/t/how-to-get-the-archive-name-of-a-projects-jarfile-using-the-gradle-api/19714/2 "2016-09-26T16:37:02Z")

</div>

Yes. Depends on what you mean by “name”. The name is something like _foo-1.0.jar_ and the “path” is _/Users/me/workspaces/project/build/libs/foo-1.0.jar_. I’ll assume you mean the latter 🙂

[https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html#org.gradle.api.tasks.bundling.Jar:archivePath](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html#org.gradle.api.tasks.bundling.Jar:archivePath)

```
jar.archivePath
```
