1.在pom中添加dependency 后 无法把依赖下载到项目中【External Libraries】
视图如:
解决方法:
(1)检查idea 的setting.xl文件配置路径是否配置正确
(2)重新导入maven依赖到项目中(reimport)
备注:可以在idea中把import Maven projects automatically 选项选中 ,那么在pom中添加dependency依赖 后 jar就会自动引入到项目中
参考链接:https://segmentfault.com/a/1190000009449467
2.每次down项目时检查idea 的file-->settings--->maven 的配置,确保下载下来的项目可以正确使用maven

3.Idea不能新建package的解决
参考链接:https://blog.youkuaiyun.com/cherry_xiu/article/details/80008982
4.mvn clean 失败error 如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.0.0:clean (default-clean) on project projectX: Failed to clean project: Failed to delete D:\idea-workspace\branches\projectX\target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
可以原因target 目录正在被使用
场景:

此时我正停留在target目录中,所以导致target无法删除。
本文档详细解答了在使用IntelliJ IDEA与Maven进行项目开发时遇到的常见问题,包括依赖下载失败、自动引入依赖、新建package失败及mvn clean命令执行失败等,提供了实用的解决步骤和参考链接。

806

被折叠的 条评论
为什么被折叠?



