运行时grails prod war target/my.war
在 Grails 2.5.3 上,有没有办法将位置更改为下载 maven 依赖项的位置?
与 maven
有一个可以在命令行设置的变量:-Dmaven.repo.local=/some/foo/bar/path
grails prod war target/my.war
有类似的东西吗?命令?
我需要这个的原因是因为我在 Jenkins 上构建我的应用程序并且无权创建 /jslave/.m2/repository/org/grails
文件夹。所以,我需要改变路径。
最佳答案
我相信您必须在 BuildConfig.groovy
中使用以下任一选项
grails.dependency.cache.dir = ".path/to/your/custom/repo"
或者你也可以使用
grails.project.dependency.resolution = {
cacheDir "absolute/path/to/your/custom/repo"
}
引用 Where are the JARs? 有关上述和使用 Aether vs Ivy 的更多详细信息。
关于maven - 如何更改下载的 Maven 依赖项的位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43023007/