I'm using the war-Plugin to create a web application.
As this application provides a webservice, I also build a jar with the
client classes.

dependencies {
    ...
    addConfiguration 'client'
    client 'org.codehaus.jra:jra:1.0-alpha-4'
    ...
}
...
createTask('clientCompile', type:Compile, dependsOn:resources).configure {
    project.dependencies.linkConfWithTask 'client', name
    ...
}
...
libs {
    jar(baseName: "${project.name}-client") {
        dependsOn = [ 'clientCompile' ]
        fileSet(dir: new File(buildDir, clientClassesDirName))
    }
}

This works, however, the jar is published with the configuration libs
instead of client. Published ivy.xml:
    <artifact name="...-client" type="jar" ext="jar" conf="libs"/>
    ...
    <dependency org="org.codehaus.jra" name="jra" rev="1.0-alpha-4"
conf="client->default"/>

If, on the other hand, I specify in the jar-Task:
    configurations = [ 'client' ]

then the ivy.xml is correct:
    <artifact name="...-client" type="jar" ext="jar" conf="client"/>

however, the jar-File is NOT copied to the repository!
Bug or feature?
-- 
View this message in context: 
http://www.nabble.com/Publishing-an-artifact-with-a-specific-configuration-tp21874960p21874960.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