ejb:ejb

Full name:

org.apache.maven.plugins:maven-ejb-plugin:2.2.1:ejb

Description:

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

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: runtime.
  • Binds by default to the lifecycle phase: package.

Optional Parameters

Name Type Since Description
archive MavenArchiveConfiguration - The archive configuration to use. See Maven Archiver Reference. This version of the EJB Plugin uses Maven Archiver 2.4.
classifier String - Classifier to add to the artifact generated. If given, the artifact will be an attachment instead.
clientExcludes List - The files and directories to exclude from the client jar. Usage:
<clientExcludes>
  <clientExclude>**/*Ejb.class</clientExclude>
  <clientExclude>**/*Bean.class</clientExclude>
</clientExcludes>

Attribute is used only if client jar is generated.
Default exclusions: **/*Bean.class, **/*CMP.class, **/*Session.class, **/package.html
clientIncludes List - The files and directories to include in the client jar. Usage:
<clientIncludes>
  <clientInclude>**/*</clientInclude>
</clientIncludes>

Attribute is used only if client jar is generated.
Default value: **/**
ejbVersion String 2.1 What EJB version should the EJB Plugin generate? Valid values are "2.x" or "3.x" (where x is a digit). When ejbVersion is "3.x", the ejb-jar.xml file is optional.

Usage:
<ejbVersion>3.0</ejbVersion>

Default value is: 2.1.
excludes List - The files and directories to exclude from the main EJB jar. Usage:
<excludes>
  <exclude>**/*Ejb.class</exclude>
  <exclude>**/*Bean.class</exclude>
</excludes>

Default exclusions: META-INF/ejb-jar.xml, **/package.html
generateClient boolean - Whether the EJB client jar should be generated or not.
Default value is: false.
jarName String - The name of the EJB file to generate.
Default value is: ${project.build.finalName}.
outputDirectory File - Directory that resources are copied to during the build.
Default value is: ${project.build.outputDirectory}.

Parameter Details

archive:

The archive configuration to use. See Maven Archiver Reference. This version of the EJB Plugin uses Maven Archiver 2.4.
  • 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
  • Expression: ${ejb.classifier}

clientExcludes:

The files and directories to exclude from the client jar. Usage:
<clientExcludes>
  <clientExclude>**/*Ejb.class</clientExclude>
  <clientExclude>**/*Bean.class</clientExclude>
</clientExcludes>

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:

The files and directories to include in the client jar. 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? Valid values are "2.x" or "3.x" (where x is a digit). When ejbVersion is "3.x", the ejb-jar.xml file is optional.

Usage:
<ejbVersion>3.0</ejbVersion>
  • Type: java.lang.String
  • Since: 2.1
  • Required: No
  • Expression: ${ejb.ejbVersion}
  • Default: 2.1

excludes:

The files and directories to exclude from the main EJB jar. Usage:
<excludes>
  <exclude>**/*Ejb.class</exclude>
  <exclude>**/*Bean.class</exclude>
</excludes>

Default exclusions: META-INF/ejb-jar.xml, **/package.html
  • Type: java.util.List
  • Required: No

generateClient:

Whether the EJB client jar should be generated or not.
  • Type: boolean
  • Required: No
  • Expression: ${ejb.generateClient}
  • Default: false

jarName:

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

outputDirectory:

Directory that resources are copied to during the build.
  • Type: java.io.File
  • Required: No
  • Expression: ${outputDirectory}
  • Default: ${project.build.outputDirectory}