当我尝试构建或编译我的Maven项目时,我收到以下错误消息:
[ERROR] Failed to execute goal on project dss-services: Could not resolve dependencies for project net.jnd.thesis:dss-services:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [log4j:log4j:jar:1.2.16 (compile), org.slf4j:slf4j-api:jar:1.6.4 (compile), org.slf4j:jcl-over-slf4j:jar:1.6.4 (compile), org.slf4j:slf4j-log4j12:jar:1.6.4 (compile), net.sf.flexjson:flexjson:jar:2.1 (compile), commons-beanutils:commons-beanutils:jar:1.8.3 (compile), org.apache.commons:commons-lang3:jar:3.1 (compile), org.eclipse.jetty:jetty-websocket:jar:8.1.4.v20120524 (compile), net.jnd.thesis:dss-common:jar:0.0.1-SNAPSHOT (compile)]: Failed to read artifact descriptor for net.jnd.thesis:dss-common:jar:0.0.1-SNAPSHOT: Could not find artifact net.jnd.thesis:dss:pom:0.0.1-SNAPSHOT -> [Help 1]
Run Code Online (Sandbox Code Playgroud)
在我的研究期间,我发现了两种可能的解
然而,倘若不适用,因为我已经是答案从零重新创建的项目(我看不出如何改变目录的名称会有所帮助),因为我的错误信息,从这些具体案件提出的错误消息不同.
我认为,在我的Eclipse插件M2E必须有某种配置的问题,因此它不能下载或找到所需的Maven构件,但我对如何解决问题不知道:S
你能尝试只用控制台吗?
"mvn clean compile"应该足以检查问题是否与eclipse有关.
有时我在某个maven项目中遇到了依赖项问题,通常是因为我没有为它们添加特定的存储库.某些依赖项未安装在maven central repo中,因此您必须检查此repo中是否有可用的依赖项.如果没有,你可以在你的pom中添加更多的存储库,以告诉maven"嘿,在这个其他仓库中寻找我的依赖关系".
经过许多头疼和时间,我只是意识到m2e插件及其版本存在很大的问题。因此,我通过进入项目并mvn clean compile随后进行来解决了我的问题mvn install。
无论如何,谢谢您的帮助!
| 归档时间: |
|
| 查看次数: |
44364 次 |
| 最近记录: |