# Eclipse EAR plugin problem

**URL:** <https://discuss.gradle.org/t/eclipse-ear-plugin-problem/4647>\
**Category:** Old Forum Archive\
**Created:** [February 16, 2013, 9:32pm UTC](https://discuss.gradle.org/t/eclipse-ear-plugin-problem/4647 "2013-02-16T21:32:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian\_Beikov](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/christian_beikov/32/9334_2.png) [@Christian\_Beikov](https://discuss.gradle.org/u/Christian_Beikov)\
**Post date:** [February 16, 2013, 9:32pm UTC](https://discuss.gradle.org/t/eclipse-ear-plugin-problem/4647/1 "2013-02-16T21:32:00Z")

</div>

How to configure gradle ear plugin to generate the eclipse files needed to be able to deploy a ear project to a server? When I import the gradle projects into my eclipse workspace and try to add my EAR project to my JBoss AS, I normally should see the sub modules when expanding the tree. The sub modules are not there, also they don’t get deployed to the server. When I build the project with gradle on command line, I get the EAR I expected. How to alter the configuration to get the right entries in the eclipse config files so that I can actually deploy the EAR project?

The code for the project is summarized on pastebin: [http://pastebin.com/8krhXMn7](http://pastebin.com/8krhXMn7)

I am using Gradle 1.4 and Eclipse 4.2 SR1

---

<div class="post-metadata">

**Author:** ![Christian\_Beikov](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/christian_beikov/32/9334_2.png) [@Christian\_Beikov](https://discuss.gradle.org/u/Christian_Beikov)\
**Post date:** [February 16, 2013, 11:34pm UTC](https://discuss.gradle.org/t/eclipse-ear-plugin-problem/4647/2 "2013-02-16T23:34:00Z")

</div>

I just found my problem… When using

```gradle
apply plugin: 'java'

```

for allprojects the ear project also gets that plugin which in the end generates the wrong eclipse configurations. This is a pitty, since now I have to spread all my configurations into all projects except the ear project. IMO the ear project should not be affected by the

```gradle
apply plugin: 'java'

```

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [February 17, 2013, 8:53am UTC](https://discuss.gradle.org/t/eclipse-ear-plugin-problem/4647/3 "2013-02-17T08:53:00Z")

</div>

Configuration injection allows you to configure any subset of projects. For example:

```gradle
configure(allprojects - project(":foo")) {
    apply plugin: "java"
}

```
