阿里云maven-MySQL依赖避坑

阿里云maven-MySQL依赖避坑

依赖

<!-- 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>

和平精英异地/异设备人脸 2024-07-14
阿里云maven 2024-07-09

评论区