今天我要记录一个错误
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< com.hxhshr:untitled1 >------------------------
[INFO] Building untitled1 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/com/hxhshr/untitled12/1.0.0/untitled12-1.0.0.pom
[WARNING] The POM for com.hxhshr:untitled12:jar:1.0.0 is missing, no dependency information available
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/com/hxhshr/untitled12/1.0.0/untitled12-1.0.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.568 s
[INFO] Finished at: 2024-01-04T07:31:52+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project untitled1: Could not resolve dependencies for project com.hxhshr:untitled1:jar:1.0.0: Could not find artifact com.hxhshr:untitled12:jar:1.0.0 in alimaven (http://maven.aliyun.com/nexus/content/groups/public/) -> [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
根据坐标看看本地仓库有没有相应的jar包
解决方法
一、找到相应依赖所在坐标的本地目录,删除掉。
二、去idea重新创建这个依赖
三、查看结果
点击运行仍然报这个错:
那好,就用上面说到的install,去本地仓库看看有没有jar
思考为什么第一次只编译程序,程序构建不成功呢?
我想肯定是idea自身的问题,最后我找到了原因:
然后我删除掉本地仓库的jar包,只编译
在运行程序:
非常nice!
我再次勾选上:如果程序启动/构建失败说明就是这个选项的问题
就是这个问题终于找到了。