What I am trying to accomplish:

I'm trying to piece together the steps for creating and publishing both
implementation and interface jars from the same source set in gradle into an
Ivy file based repository.  My goal is to publish the jars as separate
artifacts such that clients that only need the interface jar need only
depend on it.  This seems like a fairly common build pattern and I've seen
some examples of doing this on this mailing list as well as a variant of
this in the docs (
http://www.gradle.org/0.9-rc-2/docs/userguide/multi_project_builds.html
example 37.27) 

My problem:

My interface jar artifact will produce a properly named archive into its
build directory but will not publish into the Ivy repository.  The resultant 
http://gradle.1045684.n5.nabble.com/file/n3244100/ivy.xml ivy.xml  seems to
think its published by the file never makes it to the repository.

Any ideas of what I am doing wrong?  I've seen others on this list have
success doing this, so I feel that I'm missing something.

Thanks,

Bill Pfeiffer


---start build.gradle snippet
repositories
{
    add(new org.apache.ivy.plugins.resolver.FileSystemResolver())
    {
        name = 'repo'
        addIvyPattern
"$projectDir/../repo/[organisation]/[module]-ivy-[revision].xml"
        addArtifactPattern
"$projectDir/../repo/[organisation]/[module]-[revision](-[classifier]).[ext]"
        descriptor = 'optional'
        checkmodified = true
    }
    mavenCentral()
    mavenRepo urls: 'http://repository.jboss.com/maven2'
    mavenRepo urls: 'http://download.java.net/maven/2'
}

task intfJar(type: Jar) {
    from sourceSets.main.classes
    include '**/svc/*.class'
    dependsOn classes
    baseName = project.module.name + '-intf'
}

artifacts {
    archives intfJar
}

uploadArchives
{
    uploadDescriptor = true
    repositories
    {
        add project.repositories.repo
    }
}
---end build.gradle snippet

-- 
View this message in context: 
http://gradle.1045684.n5.nabble.com/Additional-artifact-jar-not-publishing-tp3244100p3244100.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to