1.报错信息:
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project maven-01-parent: Failed to deploy artifacts: Could not transfer artifact org.example:maven-01-parent:pom:1.0-20240407.093659-2 from/to dongnan-snapshot
2.bug分析
在确保maven的setting.xml中的私服配置和pom文件中的仓库信息配置无误后,可能是idea中的maven默认路径错误的原因:
setting中查看默认maven的配置路径为c盘中的settings.xml文件,不是我们刚才自定义settings.xml文件的位置,导致settings.xml中的私服配置未生效
3.解决方法:
勾选Override重写,选择自己设置的settings.xml即可