Apache

Docs Plugins

EJB Plugin 3.3.0 · Other versions

Generates a Java Enterprise JavaBean (EJB) file as well as the associated client JAR.

Source
Edit this page
Wrong?
Report a problem

Using the ejb-client as a dependency

The EJB Plugin is capable of generating another artifact aside from the primary one which is EJB. To choose the EJB client as the dependency just specify the type as ejb-client.

Normal way of adding an EJB dependency

The following dependency declaration would include the primary EJB artifact ejb-project-1.0-SNAPSHOT.jar in your project's package.

<project>
  [...]
  <dependencies>
    <dependency>
      <groupId>com.example</groupId>
      <artifactId>ejb-project</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>ejb</type>
    </dependency>
  </dependencies>
  [...]
</project>

Using the ejb-client

Using the following dependency declaration would instead use the ejb-client artifact ejb-project-1.0-SNAPSHOT-client.jar in your project's package.

<project>
  [...]
  <dependencies>
    <dependency>
      <groupId>com.example</groupId>
      <artifactId>ejb-project</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>ejb-client</type>
    </dependency>
  </dependencies>
  [...]
</project>

Read more about Generating the EJB client.