解决 maven 异常 Could not resolve dependencies for project

执行maven操作

  • 编译,测试,打包等命令,都可以触发异常
mvn dependency:tree

异常信息

[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< com.xzlawin.maven:prj3_2 >----------------------
[INFO] Building prj3_2 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.xzlawin.maven:prj3_3:jar:1.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.295 s
[INFO] Finished at: 2022-04-19T14:01:33+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project prj3_2: Could not resolve dependencies for project com.xzlawin.maven:prj3_2:jar:1.0-SNAPSHOT: Could not find artifact com.xzlawin.maven:prj3_3:jar:1.0-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

分析原因

  • 不是有效的依赖,本地库不存在依赖
[WARNING] The POM for com.xzlawin.maven:prj3_3:jar:1.0-SNAPSHOT is missing, no dependency information available

解决方法

  • 进入项目,安装项目到本地库
cd prj3_3
mvn install
GitHub 加速计划 / de / Dependencies
8.6 K
704
下载
A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
最近提交(Master分支:1 个月前 )
1997a400 - 2 年前
2f423539 - 2 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐