@Mojo(name="generate-application-xml",
defaultPhase=GENERATE_RESOURCES,
threadSafe=true,
requiresDependencyResolution=TEST)
public class GenerateApplicationXmlMojo
extends AbstractEarMojo
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
applicationId
Defines the application id used when generating the deployment descriptor.
|
private java.lang.String |
applicationName
Application name of the application to be used when the application.xml file is auto-generated.
|
static java.lang.String |
DEFAULT
The DEFAULT library folder.
|
private java.lang.String |
description
Description of the application to be used when the application.xml file is auto-generated.
|
private java.lang.String |
displayName
Display name of the application to be used when the application.xml file is auto-generated.
|
private org.codehaus.plexus.configuration.PlexusConfiguration |
ejbRefs
The
ejb-ref entries. |
static java.lang.String |
EMPTY
The empty folder.
|
private org.codehaus.plexus.configuration.PlexusConfiguration |
envEntries
The env-entries to be added to the auto-generated application.xml file.
|
private java.lang.Boolean |
generateApplicationXml
Whether the application.xml should be generated or not.
|
private java.lang.Boolean |
generateModuleId
Whether a module ID should be generated if none is specified.
|
private java.lang.Boolean |
initializeInOrder
Defines the value of the initialize in order element to be used when the application.xml file is auto-generated.
|
private java.lang.String |
libraryDirectoryMode
Defines how the library-directory element should be written in the application.xml file.
|
static java.lang.String |
NONE
The NONE not existent folder.
|
private org.codehaus.plexus.configuration.PlexusConfiguration |
security
The security-roles to be added to the auto-generated application.xml file.
|
APPLICATION_XML_URI, artifactTypeMappings, defaultLibBundleDir, encoding, generatedDescriptorLocation, META_INF, project, UTF_8, version| Constructor and Description |
|---|
GenerateApplicationXmlMojo() |
| Modifier and Type | Method and Description |
|---|---|
private java.util.List<EjbRef> |
buildEjbEntries()
Builds the ejb-ref based on the configuration.
|
private java.util.List<EnvEntry> |
buildEnvEntries()
Builds the env-entries based on the configuration.
|
private java.util.List<SecurityRole> |
buildSecurityRoles()
Builds the security roles based on the configuration.
|
void |
execute() |
protected void |
generateJbossDeploymentDescriptor()
Generates the jboss deployment descriptor.
|
protected void |
generateStandardDeploymentDescriptor(JavaEEVersion javaEEVersion)
Generates the deployment descriptor.
|
private java.lang.String |
getActualLibraryDirectory()
Returns the value to use for the library-directory element, based on the library directory mode.
|
private java.lang.String |
interpolate(org.codehaus.plexus.interpolation.Interpolator interpolator,
java.lang.String element)
This help method was needed otherwise the interpolate method of interpolator will make an empty string of a
null element which results in supplemental elements for env-entry. |
getJbossConfiguration, getModules, getProject, getTempFolder, getWorkDirectorypublic static final java.lang.String DEFAULT
public static final java.lang.String EMPTY
public static final java.lang.String NONE
@Parameter(defaultValue="true") private java.lang.Boolean generateApplicationXml
@Parameter(defaultValue="false") private java.lang.Boolean generateModuleId
@Parameter private java.lang.String applicationName
@Parameter(defaultValue="${project.artifactId}")
private java.lang.String displayName
@Parameter(defaultValue="${project.description}")
private java.lang.String description
@Parameter(defaultValue="DEFAULT") private java.lang.String libraryDirectoryMode
DEFAULT (default) generates a library-directory element with the value of the
defaultLibBundleDir parameterEMPTY generates an empty library-directory element. Per spec, this disables the
scanning of jar files in the lib directory of the ear fileNONE does not write the library-directory element at all. A corner case that can be used in
Oracle Weblogic to delegate the classloading to the container@Parameter private java.lang.Boolean initializeInOrder
@Parameter private java.lang.String applicationId
@Parameter private org.codehaus.plexus.configuration.PlexusConfiguration security
@Parameter(alias="env-entries") private org.codehaus.plexus.configuration.PlexusConfiguration envEntries
@Parameter(alias="ejb-refs") private org.codehaus.plexus.configuration.PlexusConfiguration ejbRefs
ejb-ref entries.public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
execute in interface org.apache.maven.plugin.Mojoexecute in class AbstractEarMojoorg.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected void generateStandardDeploymentDescriptor(JavaEEVersion javaEEVersion) throws EarPluginException
javaEEVersion - JavaEEVersionEarPluginException - if the configuration is invalidprotected void generateJbossDeploymentDescriptor()
throws EarPluginException
EarPluginException - if the configuration is invalidprivate java.util.List<SecurityRole> buildSecurityRoles() throws EarPluginException
EarPluginException - if the configuration is invalidprivate java.lang.String interpolate(org.codehaus.plexus.interpolation.Interpolator interpolator,
java.lang.String element)
throws org.codehaus.plexus.interpolation.InterpolationException
null element which results in supplemental elements for env-entry.interpolator - The interpolatorelement - The elementorg.codehaus.plexus.interpolation.InterpolationException - in case of an error.private java.util.List<EnvEntry> buildEnvEntries() throws EarPluginException
EarPluginException - if the configuration is invalidprivate java.util.List<EjbRef> buildEjbEntries() throws EarPluginException
EarPluginException - if the configuration is invalidprivate java.lang.String getActualLibraryDirectory()
throws EarPluginException
EarPluginException