【问题标题】:m2eclipse: How to set Eclipse project settings when importing a maven project?m2eclipse:导入maven项目时如何设置Eclipse项目设置?
【发布时间】:2011-06-01 12:49:52
【问题描述】:

使用 m2eclipse Eclipse 插件,开发团队中的每个人都应该能够签出源代码,在 Eclipse 中导入 Maven 项目并成为good to go

我看到 m2eclipse 正在被合并到 Eclipse 3.7 中,maven-eclipse-plugin 将不再维护,所以我正在寻找基于 m2eclipse 的解决方案(不运行“mvn eclipse:clean eclipse:eclipse”在项目导入之前,这是 maven-eclipse-plugin 所做的)。

maven-eclipse-plugin 允许在 pom.xml 中这样做

<additionalConfig>
<file>
    <name>.settings/com.google.gdt.eclipse.core.prefs</name>
    <content><![CDATA[
        eclipse.preferences.version=2
        jarsExcludedFromWebInfLib=
        warSrcDir=${project.build.directory}/${project.build.finalName}
        warSrcDirIsOutput=true
        ]]>
    </content>
</file>

更普遍的问题是 m2eclipse 如何做类似的事情? 在某些情况下,只需保存 eclipse .settings/prefs 文件即可(例如 org.eclipse.jdt.ui.prefs),但在这种情况下,com.google.gdt.eclipse.core.prefs 总是在 m2eclipse 项目导入时被覆盖.

具体问题是asked here,没有回复。 谢谢!

更新:现在不可能,请参阅request

【问题讨论】:

    标签: eclipse maven-2 m2eclipse


    【解决方案1】:

    Can I Configure m2eclipse through pom.xml? 中有这个话题的答案:完全自动化的配置只能通过 ProjectConfigurator 来实现。但即使是 Google Eclipse Plugin GEP,也有基于 AntRun 和 XMLTask 的解决方案。结帐后只需手动触发一次。

    【讨论】:

      【解决方案2】:

      尝试在 eclipse.org 上的 m2eclipse 论坛上提问。通过这种方式,您可能会接触到更多熟悉 m2eclipse 的人。

      http://www.eclipse.org/forums/index.php?t=thread&frm_id=61

      【讨论】:

      • 感谢康斯坦丁,我发现现在不可能(查看更新)
      猜你喜欢
      • 2019-01-03
      • 1970-01-01
      • 1970-01-01
      • 2018-03-07
      • 1970-01-01
      • 2011-05-09
      • 2023-03-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多