Chris311
Chris311

Reputation: 3992

What is the difference between the dependency types ejb and ejb-client

What is the difference if you include a dependency in your pom.xml like

<dependency>
    <groupId>group.Id</groupId>
    <artifactId>artifact.Id</artifactId>
    <type>ejb-client</type>
    <scope>runtime</scope>
</dependency>

versus

<dependency>
    <groupId>group.Id</groupId>
    <artifactId>artifact.Id</artifactId>
    <type>ejb</type>
    <scope>runtime</scope>
</dependency>

Upvotes: 5

Views: 2055

Answers (1)

user392004
user392004

Reputation:

The ejb type refers to a jar file containing the ejb interfaces and implementation, config files, etc.

The ejb-client type refers to a jar file containing just the ejb interface classes. ie. only what is needed by a client of the ejb in order to invoke it.

The maven-ejb-plugin has default or customized in its configuration, that allows for the EJB implementation classes to be excluded from the client.

Upvotes: 6

Related Questions