# Wtp-eclipse plugin: wb-resources not generated correctly when using task "eclipse"

**URL:** <https://discuss.gradle.org/t/wtp-eclipse-plugin-wb-resources-not-generated-correctly-when-using-task-eclipse/1746>\
**Category:** Old Forum Archive\
**Created:** [February 20, 2014, 2:36pm UTC](https://discuss.gradle.org/t/wtp-eclipse-plugin-wb-resources-not-generated-correctly-when-using-task-eclipse/1746 "2014-02-20T14:36:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Todd\_Gerspacher](https://avatars.discourse-cdn.com/v4/letter/t/58956e/32.png) [@Todd\_Gerspacher](https://discuss.gradle.org/u/Todd_Gerspacher)\
**Post date:** [February 20, 2014, 3:37pm UTC](https://discuss.gradle.org/t/wtp-eclipse-plugin-wb-resources-not-generated-correctly-when-using-task-eclipse/1746/2 "2014-02-20T15:37:00Z")

</div>

This sounds like a similar problem I had with the eclipse-wtp plugin. Check out the forum topic “Eclipse - Glassfish - Struts 2.x” Basically I was using Gradle to manage all my jar dependencies, but I wanted to run the web application through Eclipse using the Glassfish server.

```gradle
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'eclipse-wtp'
  repositories {
 mavenLocal()
 mavenCentral()
}
  dependencies {
    // ...
}
  eclipse {
  wtp {
    component {
      resource deployPath: '/', sourcePath: '/WebContent'
      resource deployPath: '/WEB-INF/classes', sourcePath: '/src'
    }
  }
}
  sourceSets {
    main {
        java {
            srcDirs "src"
        }
          resources {
            srcDir "src"
        }
    }
}

```

Next run the eclipse task and then import the project into Eclipse. Right clicked on the project, select Project Facets and click on the Runtimes tab. Put a check mark on the GlassFish runtime. Select the “Default Configuration for GlassFish” from the Configuration drop down box and then clicked ok.

---

_[View the full topic](https://discuss.gradle.org/t/wtp-eclipse-plugin-wb-resources-not-generated-correctly-when-using-task-eclipse/1746)._
