ejb:ejb

Build an EJB (and optional client) from the current project.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Automatically executes within the lifecycle phase: package

Required Parameters

Name Type Description
ejbVersion String What EJB version should the ejb-plugin generate? ejbVersion can be "2.x" or "3.x" (where x is a digit), defaulting to "2.1". When ejbVersion is "3.x", the ejb-jar.xml file is optional. Usage:
<ejbVersion>3.0</ejbVersion>
Default value is 2.1.
jarName String The name of the EJB file to generate.
outputDirectory String Directory that resources are copied to during the build.

Optional Parameters

Name Type Description
archive MavenArchiveConfiguration The maven archiver to use.
classifier String Classifier to add to the artifact generated. If given, the artifact will be an attachment instead.
clientExcludes List Excludes.

Usage:
<clientIncludes>
<clientInclude>**/*Ejb.class</clientInclude>
<clientInclude>**/*Bean.class</clientInclude>
</clientIncludes>


Attribute is used only if client jar is generated.

Default exclusions: **/*Bean.class, **/*CMP.class, **/*Session.class, **/package.html
clientIncludes List Includes.

Usage:
<clientIncludes>
<clientInclude>**/*</clientInclude>
</clientIncludes>


Attribute is used only if client jar is generated.

Default value: **/**
generateClient String Whether the ejb client jar should be generated or not. Default is false.

Parameter Details

archive

The maven archiver to use.

  • Type: org.apache.maven.archiver.MavenArchiveConfiguration
  • Required: No

classifier Classifier to add to the artifact generated. If given, the artifact will be an attachment instead.
  • Type: java.lang.String
  • Required: No

clientExcludes Excludes.

Usage:
<clientIncludes>
<clientInclude>**/*Ejb.class</clientInclude>
<clientInclude>**/*Bean.class</clientInclude>
</clientIncludes>


Attribute is used only if client jar is generated.

Default exclusions: **/*Bean.class, **/*CMP.class, **/*Session.class, **/package.html
  • Type: java.util.List
  • Required: No

clientIncludes Includes.

Usage:
<clientIncludes>
<clientInclude>**/*</clientInclude>
</clientIncludes>


Attribute is used only if client jar is generated.

Default value: **/**
  • Type: java.util.List
  • Required: No

ejbVersion What EJB version should the ejb-plugin generate? ejbVersion can be "2.x" or "3.x" (where x is a digit), defaulting to "2.1". When ejbVersion is "3.x", the ejb-jar.xml file is optional. Usage:
<ejbVersion>3.0</ejbVersion>

  • Type: java.lang.String
  • Required: Yes
  • Default: 2.1

generateClient Whether the ejb client jar should be generated or not. Default is false.
  • Type: java.lang.String
  • Required: No

jarName The name of the EJB file to generate.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${project.build.finalName}

outputDirectory Directory that resources are copied to during the build.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${project.build.outputDirectory}