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

(Matias Bjarland) #1

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 ‘’. 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.

(Dan Stine) #2

This is only a partial answer, but you can set

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.

(Peter Niederwieser) #3

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

(Matias Bjarland) #4

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 : ).

(Peter Niederwieser) #5

Then go for Dan’s suggestion.