0

I use a dependency with ejb-client type in a Maven project:

<dependency>
    <groupId>mygroup</groupId>
    <artifactId>foo</artifactId>
    <type>ejb-client</type>
</dependency>

It works properly when I build the project with Maven: it includes a version of the dependency that has remote EJB interfaces only (no implementations).

However, when I export the project to Eclipse Luna, and deploy it from Eclipse to jBoss/WildFly, Eclipse copies the full version of the dependency as if I used <type>ejb</type>.

Eclipse also gives me a warning:

Dependency to project foo with type ejb-client is not fully supported. Classpath and/or deployment issues might arise. Try Maven->Disable Workspace Resolution...

Is there a way to make ejb-client dependencies to work in Eclipse? Or is there any workaround?

Alex
  • 883
  • 4
  • 11
  • 23

1 Answers1

2

In the past I've found that ejb-client jars are not a very good idea. They share the same dependencies as the full ejb-jar and you normally don't want that. You will also find that IDE support for these is a little weak.

You're far better off hand building your remote EJB API as a separate jar artefact and including it where needed.

Steve C
  • 18,876
  • 5
  • 34
  • 37