gpt4 book ai didi

maven - Grails 3.x 修改 mavenLocal() 以定向到默认位置以外的另一个位置和名称

转载 作者:行者123 更新时间:2023-12-03 06:31:35 28 4
gpt4 key购买 nike

我正在尝试在 VMware VDI(虚拟桌面基础架构)上运行 Grails 3.0.6 应用程序。我想将我的 Maven 本地存储库定向到 <Username>/.m2/repository 以外的位置

我该怎么做?
VDI 对开发人员来说是一个痛苦的环境,但我的任务是让它发挥作用。

提前致谢。

最佳答案

由于 Grails 3.x 使用 Gradle,您可以在 build.gradle 中轻松定义它。文件。

buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
// mavenLocal()
maven { url "file://<your path here>" } // this one does the job
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.5.0'
}
}

关于maven - Grails 3.x 修改 mavenLocal() 以定向到默认位置以外的另一个位置和名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33023993/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com