idea 中使用maven遇到的坑

1.在pom中添加dependency 后 没法把依赖下载到项目中【External Libraries】apache

视图如:segmentfault

解决方法:maven

(1)检查idea 的setting.xl文件配置路径是否配置正确ide

(2)从新导入maven依赖到项目中(reimport)idea

 

备注:能够在idea中把import Maven projects automatically 选项选中 ,那么在pom中添加dependency依赖 后 jar就会自动引入到项目中spa

参考连接:https://segmentfault.com/a/1190000009449467.net

 

2.每次down项目时检查idea 的file-->settings--->maven 的配置,确保下载下来的项目能够正确使用mavendebug

 

 

3.Idea不能新建package的解决3d

参考连接:https://blog.csdn.net/cherry_xiu/article/details/80008982orm

 

 

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没法删除。

相关文章
相关标签/搜索