错误:java: 程序包com.qiniu.common不存在
发现在Build中有个warning:
[WARNING] com.qiniu:qiniu-java-sdk/maven-metadata.xml failed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer metadata com.qiniu:qiniu-java-sdk/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [public (http://maven.aliyun.com/nexus/content/groups/public/, default, releases+snapshots)]
参考博客:
C:\Users\...\.m2\settings.xml 这个文件里面没有下面的代码
<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>external:http:*</mirrorOf>
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
<url>http://0.0.0.0/</url>
<blocked>true</blocked>
</mirror>
怀疑可能是使用maven目录里面的settings.xml的问题
注销 G:\IntelliJ IDEA 2024.1.2\plugins\maven\lib\maven3\conf\settings.xml 文件中的上述代码
再重启idea即可
原因:虽然配置的不是idea里面的这个settings.xml,但是可能还是用到了?