How to externalise Maven credentials in Grails 2.4

后端 未结 1 367
小鲜肉
小鲜肉 2021-02-09 08:41

I\'m trying to migrate from using Ivy to using the Aether resolver in a Grails 2.4 project.

The issue I am having is in relation to externalising the credentials. Info r

相关标签:
1条回答
  • 2021-02-09 09:26

    Define your repo with an id:

     mavenRepo(id:'myrepo', url:"http://localhost:8085/artifactory/libs-release-local/") 
    

    Then define your credentials in ~/.grails/settings.groovy using the previously specified id:

    grails.project.dependency.authentication = {
      credentials {
        id = "myrepo"
        username = "foo"
        password = "bar"
      } 
    }
    
    0 讨论(0)
提交回复
热议问题