uploadArchives not creating sub-directories in Artifactory based on the project group

I’m experiencing some expected results when attempting to use the uploadArchives task with a very simple java project:

version = '1.0.0.SNAPSHOT'
group = 'com.acme'
apply plugin: 'java'
  uploadArchives {
    repositories {
        ivy {
            credentials {
                username "foo"
                password "foo"
            }
            url "http://acme.com/artifactory/releases/"
        }
    }
}

When executing gradle uploadArchives, the URL gradle will push the artifact to is:

Upload to http://acme.com/artifactory/releases/com.acme/auth/1.0.0.SNAPSHOT/auth-1.0.0.SNAPSHOT.jar

You’ll notice it’s taking the group name literally and using it as one directory within Artifactory. What I’d expect is that com/acme would be created to place the artifact in. Is this expected behavior?

My gradle, groovy, ivy versions

Gradle 1.2
------------------------------------------------------------
  Gradle build time: Wednesday, September 12, 2012 10:46:02 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.6.0_37 (Apple Inc. 20.12-b01-434)
OS: Mac OS X 10.7.5 x86_64

Thanks!

Yes, it’s expected behavior. To get a ‘com/acme’ style layout, you can declare a ‘maven’ layout, or a ‘pattern’ layout with ‘m2compatible = true’. The former looks like this:

...
ivy {
    ...
    layout "maven"
}

For more information, see the Gradle User Guide.

beautiful, worked like a charm. Thanks Peter.