I query my ivy repository which revisions of a module are already uploaded, to prevent overwriting an already released one. For that I have to add my uploadRepo to the project.repositories and do a manual resolve on any configuration which has dependencies. In the very rare case none of the standard configurations has any dependencies, I add a dummy configuration. The stupid thing is, that this configuration is then published in my ivy.xml file. That's why I want to remove the configration.

And in case you ask why I have to do a manual resolve:
well, I found out that without adding the uploadRepo to the project.repositories and without the manual resolve a NullPointerException is thrown by the ivy call:
uploadRepo.listRevisions(moduleEntry)

Somehow when doing a resolve some internal initialization is done, which 
prevents the NPE.

Am 09.08.2011 21:46, schrieb Peter Niederwieser:

Ruediger Schobbert wrote:

Is there a way to remove a configuration once it was added to the projects
configurations?

I tried

def dummyConf = project.configurations.dummyConfigForResolve
project.configurations.all.remove(dummyConf)


In milestone 4 and later, you can use "configurations.remove(...)". Before
that, I don't know. Why do you want to remove a configuration?

--
Peter Niederwieser
Principal Engineer, Gradleware
http://gradleware.com
Creator, Spock Framework
http://spockframework.org
Twitter: @pniederw


--
View this message in context: 
http://gradle.1045684.n5.nabble.com/remove-a-configuration-after-it-was-added-tp4682110p4683351.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



--
emesit GmbH & Co. KG
  Henkestr. 91
  91052 Erlangen
Handelsregister:
  HRA 8321, Fürth/Bayern
Komplementär:
  emesit Beteiligungs-GmbH
  HRB 10201, Fürth/Bayern
Geschäftsführer:
  Ralph Mayr, Rüdiger Schobbert

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

   http://xircles.codehaus.org/manage_email


Reply via email to