Eclipse Spring MVC模板项目和Maven依赖
我在使用 Eclipse STS 套件使用 Maven 开发 Spring MVC 项目时遇到问题。默认情况下,Spring MVC 模板使用maven 进行构建。它使用 maven 构建(在 pom.xml 上进行 rmc -> Run As -> Maven install),但 eclipse 将所有 maven 管理的依赖项以红色突出显示。 (并将它们标记为错误)我正在使用 m2eclipse 作为 eclipse WTP。 这是一个屏幕截图: http://rghost.ru/24803261
这是我的 pom.xml 文件: http://pastebin.com/5EvNQvHe
I have a problem using Eclipse STS suite for developing Spring MVC project with Maven. By default, Spring MVC template uses maven for building. It builds with maven (rmc on pom.xml -> Run As -> Maven install) but eclipse highligts all maven-managemented dependencies in red. (and mark them as an errors) I'm using m2eclipse for eclipse WTP.
Here is a screenshot:
http://rghost.ru/24803261
And here is my pom.xml file: http://pastebin.com/5EvNQvHe
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果 pom.xml 中没有错误标记,那么大多数情况下只是引用问题。
(确保该项目启用了 Maven 支持(“package explorer”/Project/Maven/Enable Dependency Management)。
然后尝试:在“package explorer”中右键单击您的项目,选择
Maven/Update Project配置
来更新项目配置。If there is no error marker in the pom.xml then is mostly only a refereshing problem.
(Make sure, that Maven support is enables for this project ("package explorer"/Project/Maven/Enable Dependency Management).
Then Try: right click on your project in the "package explorer", select
Maven/Update Project Configuration
to update the project configuration.