Is it possible to use predefined ivysettings.xml from a grails app
Today we use ivy for our existing Java projects. We are looking at adding a grails application. I have found how to set up the BuildConfig.groovy to use our repos. However we have all of this information defined in a shared ivysettings.xml file for all of our Java apps, is it possible to tell Grails to use the d开发者_如何学Pythonefault resolver from that ivysettings file?
You can do something like this in BuildConfig.groovy (example found from Users mailing list)
repositories {
resolver sandboxResolver()
}
private DependencyResolver sandboxResolver() {
def ivySettings = new IvySettings()
ivySettings.load(new File("C:\myivysettingsfile.xml")) //You also can pass a URL object here
def ivyResolver = ivySettings.getDefaultResolver()
return ivyResolver
}
精彩评论