# Project name different from published artifact group:NAME:version?

**URL:** <https://discuss.gradle.org/t/project-name-different-from-published-artifact-group-name-version/5952>\
**Category:** Old Forum Archive\
**Created:** [December 19, 2011, 8:52pm UTC](https://discuss.gradle.org/t/project-name-different-from-published-artifact-group-name-version/5952 "2011-12-19T20:52:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbjarland1](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mbjarland1](https://discuss.gradle.org/u/mbjarland1)\
**Post date:** [December 19, 2011, 8:52pm UTC](https://discuss.gradle.org/t/project-name-different-from-published-artifact-group-name-version/5952/1 "2011-12-19T20:52:00Z")

</div>

I have projects in my multi-project build where the project directory name needs to be different from the published artifact name. I.e. my project name is ‘bar’ but when I publish the resulting artifact jar to artifactory I want the published artifact name to be ‘[some.package.name](http://some.package.name):foo:1.0.-SNAPSHOT’. I am sure this is dead simple, but I have failed to figure out how to do it.

I am using M6, the latest artifactory plugin, the java plugin, and the maven plugin. Any help much appreciated.

---

<div class="post-metadata">

**Author:** ![Dan\_Stine](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dan\_Stine](https://discuss.gradle.org/u/Dan_Stine)\
**Post date:** [December 19, 2011, 9:23pm UTC](https://discuss.gradle.org/t/project-name-different-from-published-artifact-group-name-version/5952/2 "2011-12-19T21:23:00Z")

</div>

This is only a partial answer, but you can set

```gradle
archivesBaseName = 'foo'

```

to override the default behavior whereby the artifact is named for the project.

I’m not experienced with publishing to Artifactory yet, so I can’t help there.

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [December 19, 2011, 9:58pm UTC](https://discuss.gradle.org/t/project-name-different-from-published-artifact-group-name-version/5952/3 "2011-12-19T21:58:00Z")

</div>

Do you really need the project name to be “bar”, or just the directory name?

---

<div class="post-metadata">

**Author:** ![mbjarland1](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mbjarland1](https://discuss.gradle.org/u/mbjarland1)\
**Post date:** [December 19, 2011, 10:37pm UTC](https://discuss.gradle.org/t/project-name-different-from-published-artifact-group-name-version/5952/4 "2011-12-19T22:37:00Z")

</div>

I would like the project name and the domain of the developer using the multi-project build structure to remain as is, but rename the artifact getting deployed according to a naming convention. The multi-project build mirrors a third party package structure…so the developer understands what a specific sub project is since the project name maps to a concept in a domain he is already familiar with. Running “gradle projects” gives a tree he can relate to.

So I guess in the ideal case, yes, I would like the project name to be ‘bar’ and the deployed artifact name to be ‘foo’. I can work around this, but all work arounds I have come up with so far lead to compromises. So if it’s not doable I’ll run with one of the compromises, but I was hoping for some magic from the gurus : ).

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [December 19, 2011, 10:58pm UTC](https://discuss.gradle.org/t/project-name-different-from-published-artifact-group-name-version/5952/5 "2011-12-19T22:58:00Z")

</div>

Then go for Dan’s suggestion.
