What is right way to build EJB jar with Gradle in Eclipse

I need to build an EJB Jar using Gradle. This beast is not an ear file, I just want the EJB jar. God only knows why it’s set up that way. I looked at the Ear plugin and it doesn’t sound like it contains what I need.

Has anyone ever done this?

I find that using the Jar plugin, I can more or less get what I want but Eclipse is very confused with the setup I have.

You need to apply both the java and eclipse-wtp plugin. That will turn your project into what Eclipse WTP calls a “utility project”.

Thank you, Stefan, this seems to do the trick.