- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我在公司网络上,因此要检索我们使用 Nexus 的依赖项。 Grails repo 已添加到 nexus 存储库,所以现在剩下的就是配置 grails 以使用 nexus。
对于 Java Maven 项目的开发,我只需要指定哪个 settings.xml
它应该注意文件,因为 Nexus URL 和凭据存储在那里。
现在我们切换到 Grails 并且在创建新项目时 grails 在配置类路径上挂起大约 200 秒(因为它被配置为在 200 秒后超时)然后说:
Resolve error obtaining dependencies: Failed to read artifact descriptor for jline:jline:jar:2.12 (Use --stacktrace to see the full trace)
Error |
Required Grails build dependencies were not found. This is normally due to internet connectivity issues (such as a misconfigured proxy) or missing repositories in grails-app/conf/BuildConfig.groovy. Please verify your configuration to continue.
Process was killed
现在这可能是 repo 配置的问题,但是我无法正确调试它。
我试过调用 grails refresh-dependencies --stacktrace
,我尝试从 error
更改日志记录至 debug
和 trace
在 Config.groovy
.尝试将日志记录设置为 verbose
在 BuildConfig.groovy
(但那是针对 Ivy 的,我们正在使用 Maven,所以它当然什么都不做),现在我不确定该怎么做。
如果有帮助,这是我在 BuildConfig.groovy
中的当前 repo 配置:
repositories {
//inherits true // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
mavenLocal()
mavenRepo(id:'nexusconf', url:"https://nexusurl/repository/rootrepo/") {
auth username: "user", password: "pass"
}
//grailsCentral()
//mavenCentral()
// uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
}
最佳答案
我认为这取决于您使用的是哪个版本的 grails,以及您是使用 aether 还是 ivy 来解决依赖关系(在 BuildConfig 中使用 grails.project.dependency.resolver
进行设置)。根据 grails 2.4.4 文档,要使用 Aether 进行身份验证,需要在 BuildConfig 和 USER_HOME/.grails/settings.groovy 中进行配置。要使用 Ivy 进行身份验证,配置仅在 USER_HOME/.grails/settings.groovy 中进行。
文档是这样说的:
Aether 身份验证
要使用 Aether 进行身份验证,您可以在存储库定义中定义凭据:
mavenRepo(url:"http://localhost:8082/myrepo") {
auth 用户名:“foo”,密码:“bar”
}
或者您可以在存储库上指定一个 id:
mavenRepo(id:'myrepo', url:"http://localhost:8082/myrepo")
然后在 USER_HOME/.grails/settings.groovy 中声明您的凭据:
grails.project.dependency.authentication = {
证书 {
id = "myrepo"
用户名 = “管理员”
密码 = "密码"
}
}
Ivy 身份验证
如果您的存储库需要身份验证,您可以使用凭据 block 进行配置:
凭据{
领域=“..”
主机=“本地主机”
用户名 = "我的用户"
密码=“我的密码”
}
这可以使用 grails.project.ivy.authentication 设置放在您的 USER_HOME/.grails/settings.groovy 文件中:
grails.project.ivy.authentication = {
证书 {
领域=“..”
主机=“本地主机”
用户名 = "我的用户"
密码=“我的密码”
}
}
关于java - 使用 Maven\issues with Nexus 调试 Grails 命令 "refresh-dependencies",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27636919/
如果我有一个包含 debian/control 和 Build-Depends 条目的 Depends 文件。 如何安装两组依赖项? 目前我正在使用以下命令创建一个依赖于 Build-Depends
我一直在查看衬底节点模板的Cargo.toml文件,并注意到,对于大多数 crate 而言,其依赖性如下所示: [dependencies.grandpa] package = 'sc-finalit
我在 Netbeans 7.1 IDE 中有一个 Maven 项目。 我想为 Dependencies 添加相同的依赖项和 Test Dependencies . 添加到一个中会将其从另一个中删除。
我正在尝试解决此处描述的问题: http://www.jayway.com/2013/04/12/solving-asm-conflicts-after-upgrading-to-groovy-2-1
我研究过这个问题,但找不到共识。如果“A 依赖于 B”,术语“依赖性”指的是: 一个 B A和B的关系 这个术语在计算机技术的不同子领域中是否有不同的含义? 最佳答案 B 将是依赖项。您可能会以“B
WebLogic 10.3.6Java 1.6 所以我在使用 Eclipse 时遇到了 XML 问题。 7天前我去度假之前,这一切运行良好。事实上,在我离开之前,我恢复到了旧版本,因为我在一些不太重要
在问这个问题之前,我想说 this stackoverflow 中的问题与我的问题非常相似,但概念仍然不清楚,非常困惑。 我想了解依赖倒置原则,但我无法完全理解它? 下面是DIP说的两点 A. Hig
很难说出这里问的是什么。这个问题是模棱两可的、模糊的、不完整的、过于宽泛的或修辞的,无法以目前的形式得到合理的回答。如需帮助澄清这个问题以便重新打开它,visit the help center .
我正在尝试使用 apache maven 创建一个包。当我运行 mvn clean install 命令时,出现以下错误: dependencies.dependency.version' is mi
在 Real World Ocaml Chapter 9这是关于仿函数的: Dependency injection Makes the implementations of some compone
我已经构建了类似用于创建网站的基本模板/工作流的东西,主要使用 Grunt。 该模板的一部分是 Modernizr 特征检测库,我的一项 Grunt 任务依赖于它。 目前我只是将该依赖项存储在我的 b
我有固定依赖项的 python 项目。由于第三方依赖项中的错误,在我的包中发现了错误。该依赖项已发布修复该错误的补丁。然而,根据 semantic versioning ,是否为固定依赖项的每个补丁版
使用插件io.spring.dependency-management ,我的依赖的一些版本是从其他依赖中扣除的 id("io.spring.dependency-management") versi
我有这两个表“员工表,从属表” 员工表有“ID, employee_id, employee_name” 从属表有“ID, employee_id, dependent_name, relations
我正在使用 Eclipse 中的一个 mavenised java 项目,其中有几个模块无法构建并从 pom 文件中抛出错误: Project build error: 'dependencies.d
我有一个包含多个模块的 maven 项目。在 Eclipse(Juno,带有 m2e)中,它似乎编译得很好。但是当我在其中一个模块上进行 maven 安装时,构建会立即失败。 父 pom: com
我使用 eclipse juno 创建了一个 maven 项目并编辑了 pom 文件。当我通过“mvn clean install”使用命令提示符运行 pom 文件时,出现此错误。 [ERROR] T
关闭。这个问题是opinion-based 。目前不接受答案。 想要改进这个问题吗?更新问题,以便 editing this post 可以用事实和引文来回答它。 . 已关闭 6 年前。 Improv
似乎包括与 provided 的直接依赖关系范围很好理解。似乎还包括带有 runtime 的传递依赖项。范围也很容易实现。 但是我如何才能包含两个间接级别的依赖项? 例子: A --> B --> C
我有以下情况: 我想在我的另一个项目中使用我的一个项目(托管在 bintray.com 上)。 我设置了一个 Maven 存储库,上传了 Artifact 和 pom 文件,然后能够使用上传到 bin
我是一名优秀的程序员,十分优秀!