Adding version to filename for ivy resolved dependencies

(Andreas) #1


I’m using a local ivy repository as following:

repositories {
    ivy {
= "${project.rootDir.absolutePath}/../ivy/ivy-repositories/shared/"
        layout "pattern", {
            artifact "[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
            ivy "[organisation]/[module]/[revision]/ivy.xml"
        resolve.dynamicMode = true

I’m using the distribution plugin and set content with:

distributions {
    main {
        contents {
              into ('libs')
            { from {
                } }

My problem is that the filename of the resolved artifacts (jars) lacks the version. Ie ‘commons-codec.jar’ instead of ‘commons-codec-1.6.jar’. Both on my Eclipse classpath and in the distribution.

Is there any way i can let the version be part of the filename? I can not (easliy) change the layout/pattern of the local ivy repository.

Thanks, Andreas