在使用maven管理项目时候,难免会出现一些找不到依赖的问题
入下面这种
如果出现上面的红色报错,此时还用maven 的clean 或者install操作
你会看到控制台出现以下信息
INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mybatis-generator 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://maven.aliyun/repository/public/org/mybatis/generator/mybatis-generator-maven-plugin/1.3.7/mybatis-generator-maven-plugin-1.3.7.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.056 s
[INFO] Finished at: 2022-06-01T10:42:06+08:00
[INFO] Final Memory: 13M/232M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.mybatis.generator:mybatis-generator-maven-plugin:jar:1.3.7: Could not transfer artifact org.mybatis.generator:mybatis-generator-maven-plugin:pom:1.3.7 from/to nexus-aliyun (https://maven.aliyun/repository/public): Connect to maven.aliyun:443 [maven.aliyun/127.0.1.2] failed: Connection refused: connect -> [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/confluence/display/MAVEN/PluginResolutionException
Process finished with exit code 1
注意这句
点击它
得到一个下载的文件
你仔细看控制台的提示信息发现
[ERROR] Plugin org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.mybatis.generator:mybatis-generator-maven-plugin:jar:1.3.7: Could not transfer artifact org.mybatis.generator:mybatis-generator-maven-plugin:pom:1.3.7 from/to nexus-aliyun (https://maven.aliyun/repository/public): Connect to maven.aliyun:443 [maven.aliyun/127.0.1.2] failed: Connection refused: connect -> [Help 1]
他是说不能去xxx服务器下载这个玩意
那就手动下载下来
既然是maven需要下载下来的,肯定是下载到具体某个位置的
那么继续看看我们maven的pom中具体配置的是什么信息
没错了,就是这里 ,这里在你的maven仓库中可找到具体位置
接着把手动下载下来的文件放进来,把.lastUpdated文件删除
再执行install一次看看
仓库位置中增加了几个新的文件
以上问题解决
更多推荐
解决[ERROR] Plugin org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7 or o
发布评论