【问题标题】:Is there a Gradle plugin for Eclipse Luna?Eclipse Luna 有 Gradle 插件吗?
【发布时间】:2014-08-15 20:22:47
【问题描述】:

我正在尝试将Eclipse Luna 与Gradle 集成。

Eclipse Integration Gradle GitHub 页面包含Installing Gradle Tooling from update site 的说明。

我按照发布(稳定)版本的说明进行操作。

选择所有组件后(如下所示),我继续安装。

它没有按预期进行,并把我带到 Install Remediation Page(如下),显示只能安装 Gradle IDE 组件。 (Click here 获取更大的图像)。

目前我不确定是什么导致了问题以及如何处理。

【问题讨论】:

    标签: eclipse eclipse-plugin gradle eclipse-luna


    【解决方案1】:

    您使用的插件是错误的。 Luna here有更新。

    您也可以使用this integration link 直接在eclipse 中安装插件。

    【讨论】:

    【解决方案2】:

    Gradleware 现在提供对 Eclipse IDE 的直接支持。简介见http://www.vogella.com/tutorials/EclipseGradle/article.html。

    【讨论】:

    • 它似乎预定用于 Eclipse 4.5 (Mars)。
    • 应该也适用于旧版本,如果不是,请打开 Buildship 项目的错误。
    • 我希望本教程可以带我完成drdobbs.com/jvm/writing-build-scripts-with-gradle/… 的“Hello World”项目。将它们粘贴到 build.gradle 中不起作用。
    【解决方案3】:

    除了@Campiador 提到的插件。您必须在 eclipse 的 .project 文件中支持项目性质,以便您的项目显示在“Gradle Tasks”视图中。

    参见以下示例:

    在 build.gradle 文件中添加一种或多种性质:

    eclipse.project {
      natures 'org.springsource.ide.eclipse.gradle.core.nature', 'org.eclipse.jdt.core.javanature'
    }
    

    在此更改之后,只需从您的 shell/命令提示符运行 gradle eclipse 命令。新生成的 .project 将具有适当的性质。只需在 Eclipse 中刷新您的项目,现在您将在 Gradle Tasks 视图中看到您的项目。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-18
      • 2014-12-10
      • 2014-11-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多