Can I override plugin's declared repositories?


(Normand Fortier) #1

I am trying Gradle to replace Ant on a mid-sized project. So far it is very satisfactory, except for the requirement to be able to build the project on a laptop that does not have internet access. I export the dependencies from a connected machine and copy them to a local directory on the laptop and declare that as a repository (flatDir), which works.
The problem is that a plugin I must use declares a remote repository (mavenCentral) and then builds fail because it cannot connect to the maven repository for one of the configurations defined by the plugin – even if I put the required jar in the local directory and declare it as a dependency.
Is there any way to override that behaviour? Otherwise, that would mean that a major part of Gradle’s flexibility, i.e. the possibility to select repositories, is negated by the possibility for any plugin to hard-code repositories.
I welcome any suggestion that will spare me the pain of maven…