Hi Adam, Thanks that worked. Sorry could not find the remove method in the javadoc. Is it something not exposed by the interface ?
Thanks and regards, - Ashish On Wed, 6 Apr 2011 16:46:18 +1000 Adam Murdoch <[email protected]> wrote: > > On 03/04/2011, at 6:19 PM, Ashish Shinde wrote: > > > Hi, > > > > I have a build script for a webservice module that needs to publish > > the service war and the java client to a maven repository. I have a > > "wsclient" configuration for the client dependencies and I want the > > client artifact to be published with only the dependencies from the > > "wsclient" configuration. > > > > Here is the relevant portion of the gradle build > > > > configurations { > > deployerJars > > jaxws > > wsclient > > } > > > > uploadArchives { > > repositories.mavenDeployer { > > ..... > > > > // Create filters for the client and the service war > > addFilter('client') {artifact, file -> > > artifact.name == project.name + "-client" > > } > > > > addFilter('war') {artifact, file -> > > artifact.name == project.name > > } > > > > // Apply custom dependencies to the client > > pom('client').getScopeMappings().setSkipUnmappedConfs(true) > > pom('client').getScopeMappings().addMapping(1000, > > configurations.wsclient, "compile") > > You can do something like: > > pom('client').scopeMappings.mappings.remove(configurations.compile) > > Or, to get rid of all the mappings: > > pom('client').scopeMappings.mappings.clear() > > > > > } > > } > > > > I went over the javadocs for MavenPom, ConfigurationContainer, > > Conf2ScopeMappingContainer but could not find a way to remove the > > mapping from the gradle compile configuration to maven "compile" > > scope. > > > > The possibilities are > > 1. create a > > with just "wsclient" and use MavenPomsetConfigurations(). But I > > could not find a way to create a ConfigurationContainer > > 2. remove mappings from Conf2ScopeMappingContainer. But no method > > for that as well. > > > > Thanks and regards, > > - Ashish > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > -- > Adam Murdoch > Gradle Co-founder > http://www.gradle.org > VP of Engineering, Gradleware Inc. - Gradle Training, Support, > Consulting http://www.gradleware.com > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
