阿里云 Maven 仓库拉取 MySQL 依赖失败的原因与解决方法
分类记录
本文最后编辑于 1 年前,文章内容可能已过时。
依赖
<!-- mysql-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>这个依赖在拉取时报了下面的错误。
mysql:mysql-connector-java:jar:unknown was not found in https://maven.aliyun.com/repository/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of aliyunmaven has elapsed or updates are forced
尝试使用 -U 标记(强制更新快照)运行 Maven 导入解决
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>- 作者: 柚子
- 链接: https://blog.xuezero.com/archives/TBav1Cad
- 版权: 除特别声明外,本文采用 CC BY-NC-SA 4.0 许可协议进行许可,转载请注明出处。