Maven 更新项目在 Eclipse 中做什么? [英] What does Maven Update Project do in Eclipse?

查看:39
本文介绍了Maven 更新项目在 Eclipse 中做什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Maven -> 更新项目..."在 Eclipse 中有什么作用?

解决方案

它将 Eclipse 项目设置与 pom 的设置同步.例如,如果您更改重要的插件设置,例如输出 java 版本,您会发现 Eclipse 会要求您更新项目,然后项目中配置的 Java 运行时将发生更改以反映您的 Maven pom 指示.

要牢记这一点很重要:Maven pom 是此类项目设置的主导者.如果您想要更改设置,请尝试通过 pom 而不是直接通过 Eclipse 项目设置来执行此操作,否则执行项目更新可能会还原您更改的内容.不过,通常有些事情我必须自己纠正,例如 m2eclipse 喜欢放入的构建路径排除和奇怪的部署程序集配置.

What does "Maven -> Update Project..." do in Eclipse?

解决方案

It syncs the Eclipse project settings with that of the pom. If you for example change important plugin settings, such as the output java version, you will find that Eclipse will ask you to update the project and afterwards the configured Java runtime in the project will have changed to reflect what your Maven pom indicates.

That is an important thing to keep in mind: the Maven pom is the lead in this kind of project setup. If you want settings to change, try to do that through the pom and not through Eclipse project settings directly or doing a project update might revert what you have changed. There are usually some things I have to correct myself anyway though, such as build path exclusions that m2eclipse likes to put in and strange deployment assembly configurations.

这篇关于Maven 更新项目在 Eclipse 中做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆