3

idea未识别出maven的pom.xml等一系列问题总结

 2 years ago
source link: https://blog.51cto.com/u_15328731/5118370
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

idea未识别出maven的pom.xml等一系列问题总结

原创

爱学习的大鱼 2022-03-18 16:42:14 博主文章分类:错误总结 ©著作权

文章标签 maven pom.xml idea 文章分类 Java 编程语言 阅读数1030

idea未识别出maven的pom.xml等一系列问题总结_pom.xml

针对问题的总结
问题原因:
更改了工程项目名由springMVC_dome1---->springMVC_demo1,导致系统无法识别maven配置文件
解决方法:
右键pom文件,点击Add as Maven Project即可
idea未识别出maven的pom.xml等一系列问题总结_idea_02
出现了新的小问题:
idea未识别出maven的pom.xml等一系列问题总结_pom.xml_03
解决方法:
针对问题1:
右键项目,点击Refactor–>Rename–>Rename Model,修改为与项目名一致即可
idea未识别出maven的pom.xml等一系列问题总结_pom.xml_04
针对问题2:
更改artifactId名称,点击刷新Maven即可
idea未识别出maven的pom.xml等一系列问题总结_pom.xml_05
又又又出现了新问题!!!
点击运行tomcat显示失败
idea未识别出maven的pom.xml等一系列问题总结_idea_06
显示失败信息如下:

Cannot build artifact 'springMVC_dome1:war exploded' because it is included into a circular dependency (artifact 'springMVC_dome1:war exploded', artifact 'springMVC_demo1:war exploded')

解决方法:
找到项目目录中的.idea目录,进入artifacts文件目录,删除多余的两个的文件即可
idea未识别出maven的pom.xml等一系列问题总结_pom.xml_07

  • 打赏
  • 收藏
  • 评论
  • 分享
  • 举报

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK