Eclipse EAR plugin problem

(Christian Beikov) #1

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:

I am using Gradle 1.4 and Eclipse 4.2 SR1

(Christian Beikov) #2

I just found my problem… When using

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

apply plugin: 'java'

(Peter Niederwieser) #3

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

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