简体   繁体   English

安装Gradle Eclipse插件后,Gradle构建文件夹未显示

[英]Gradle build folder not showing up after installing the Gradle Eclipse Plugin

I have a project that I use gradle to build. 我有一个项目,我使用gradle来构建。 Before I installed Gradle Eclipse plugin, I was able to see the gradle build folder in Eclipse. 在我安装Gradle Eclipse插件之前,我能够在Eclipse中看到gradle build文件夹。 But after installing the plugin (Buildship) and creating and building a new Gradle project, I am no longer able to see the build folder in Project Explorer or Package Explorer or Navigator. 但在安装插件(Buildship)并创建和构建新的Gradle项目后,我无法再在Project Explorer或Package Explorer或Navigator中看到build文件夹。 I am able to see the build folder and the jar file from Windows Explorer. 我能够从Windows资源管理器中看到build文件夹和jar文件。 I tried to change the settings from Customize View..., but it didn't solve the issue. 我试图从自定义视图...更改设置,但它没有解决问题。 Can someone please let me know how to let the build folder show up ? 有人可以让我知道如何让build文件夹出现吗? Thanks. 谢谢。

This is the build.gradle: 这是build.gradle:

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
mainClassName = 'com.ii.mainClass'

repositories {
    mavenCentral()
 }

 sourceCompatibility = 1.7
 targetCompatibility = 1.7

 dependencies {
      compile 'com.fasterxml.jackson.core:jackson-annotations:2.6.1'
      compile 'com.fasterxml.jackson.core:jackson-core:2.6.1'
      compile 'com.fasterxml.jackson.core:jackson-databind:2.6.1'
      compile 'org.springframework:spring-beans:4.2.0.RELEASE'
      compile 'org.springframework:spring-context:4.2.0.RELEASE'
      compile 'org.springframework:spring-core:4.2.0.RELEASE'
      compile 'org.springframework:spring-expression:4.2.0.RELEASE'
      compile 'org.springframework.xd:spring-xd-tuple:1.0.4.RELEASE'
   }

I found the solution in a topic on the Gradle forum ( https://discuss.gradle.org/t/setting-eclipse-native-library-location/11075/2 ). 我在Gradle论坛上找到了一个主题的解决方案( https://discuss.gradle.org/t/setting-eclipse-native-library-location/11075/2 )。

The plugin installs a resource filter with an exclude pattern, which you can manually remove in the project's properties (Resource -> Resource Filters). 该插件安装了一个带有排除模式的资源过滤器,您可以在项目的属性中手动删除(资源 - >资源过滤器)。

您可以通过项目资源管理器选项中的自定义过滤器禁用过滤器,并取消选中其中的gradle构建选项。

You can disable filter through customize filter in project explorer options, and uncheck the gradle build option in it. 您可以通过项目资源管理器选项中的自定义过滤器禁用过滤器,并取消选中其中的gradle构建选项。

Select the project and then select the project menu as given in the below image. 选择项目,然后选择下图中给出的项目菜单。 screenshot 截图
And then uncheck the 'Grale build folder' and then you can see the build folder as shown in below image. 然后取消选中“Grale build folder”,然后您可以看到build文件夹,如下图所示。 screenshot 截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM