我还遇到过其他问题相关maven配置错误的问题,例如:
- 1,无法从无法从 https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip下载 ZIP 分发。请检查 distributionUrl Maven 包装器已被禁用。将改用 Maven 捆绑版本
- 2,No archetype found in remote catalog. Defaulting to internal catalog
- 3,Could not transfer artifact org.apache.ant:ant:jar:1.8.1 from/to central (Central Repository:): GET request of: org/apache/ant/ant/1.8.1/ant-1.8.1.jar from central failed
心得:如果在使用Maven构建项目时没有出现src文件,或者出现以上提示情况,其实都是关于maven没有正确配置产生的原因,我曾经尝试更改当前项目存储设置,可以重新读写或许会缓解,又或许我把缓存文件清理了,但是发现每次重新打开项目都需要重新更改一次。这十分浪费时间,于是我决定对Maven进行重新配置。
快速步骤阅读:
- 首先,我在Maven官网上下载了与当前IDEA版本相对应的压缩包,将其下载到电脑中,并创建了一个新的文件夹。我选择将Maven直接下载到C盘,并创建了一个名为repository的空文件夹。
- 然后,我打开了阿里云公共仓库网站(仓库服务
- 打开 maven 的配置文件( windows 机器一般在 maven 安装目录的 conf/settings.xml ),在<mirrors><