如何配置 settings.groovy 以使用多个存储库?

How to configure settings.groovy in order to use several repositories?

我刚刚安装了 Grails 3.3.0,我想在 ${HOME}/user/.grails/settings.groovy 文件中配置一些自定义存储库。

这是我目前所做的(<someUrl1|2> 的真实 URL 已被替换):

grails {
  profiles {
    repositories {
      repo1 {
        url = "<someUrl1>"
        snapshotsEnabled = true
      }
      repo2 {
        url = "<someUrl2>"
        snapshotsEnabled = true
      }
    }
  }
}

现在,当我在 bash (Ubutu 16.04) 上执行 grails 命令时,它总是尝试从第一个存储库 (<someUrl1>)

中解决依赖关系

Java:jdk8u141

这个配置要像我一样吗?

如果没有,如何配置此文件以便为 grails 使用多个存储库?

如果有连接问题(或其他问题),第一次尝试连接到第一个存储库会失败,Grails 托盘是否可以访问声明的其他存储库?

Should this configuration be done like I did?

是的,根据 documentation

Does Grails tray to access the other ones declared?

是的,存储库列表已传递到此 class 的构造函数中。 https://github.com/grails/grails-core/blob/master/grails-shell/src/main/groovy/org/grails/cli/profile/repository/MavenProfileRepository.groovy#L48