How to pubish jar and war to an ivy repository using uploadArchives?


(aadi4287) #1

Currently I see that for a war project, only the war is published to the ivy repository. Is there a way to configure it so that both jar and war produced by the project are published to the ivy repository?

If I use the ivy-publish plugin, I can achieve this, but the generated ivy.xml is in incorrect format. (See http://forums.gradle.org/gradle/topics/publish_task_adds_every_dependency_to_the_runtime_scope_in_pom_xml).

This is the basic configuration I’ve used to publish to a local ivy file repo.

uploadArchives {
    repositories {
        ivy {
           url "file://some-path"
        }
    }
}

Thanks in advance.