解决 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