public abstract class AbstractEarModule extends java.lang.Object implements EarModule
EarModule.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ALT_DD
The alt-dd module.
|
protected java.lang.String |
altDeploymentDescriptor
The alternate deployment descriptor.
|
private org.apache.maven.artifact.Artifact |
artifact |
private java.lang.String |
artifactId |
protected java.lang.String |
bundleDir
The bundleDir.
|
protected java.lang.String |
bundleFileName
The bundleFileName.
|
private java.lang.String |
classifier |
protected EarExecutionContext |
earExecutionContext
|
protected java.lang.Boolean |
excluded
excluded by default
false. |
private java.lang.String |
groupId |
protected static java.lang.String |
JAVA_MODULE
The java module.
|
protected static java.lang.String |
MODULE_ELEMENT
The module element.
|
private java.lang.String |
moduleId |
protected java.lang.Boolean |
unpack
unpack
|
private java.lang.String |
uri |
| Constructor and Description |
|---|
AbstractEarModule()
Empty constructor to be used when the module is built based on the configuration.
|
AbstractEarModule(org.apache.maven.artifact.Artifact a)
Creates an ear module from the artifact.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static boolean |
areNullOrEqual(java.lang.Object first,
java.lang.Object second)
Specify if the objects are both null or both equal.
|
boolean |
changeManifestClasspath() |
(package private) static java.lang.String |
cleanBundleDir(java.lang.String bundleDir)
Cleans the bundle directory so that it might be used properly.
|
java.lang.String |
getAltDeploymentDescriptor()
The alt-dd element specifies an optional URI to the post-assembly version of the deployment descriptor file for a
particular Java EE module.
|
org.apache.maven.artifact.Artifact |
getArtifact()
Returns the
Artifact representing this module. |
java.lang.String |
getArtifactId()
Returns the artifact's Id.
|
java.lang.String |
getBundleDir()
Returns the bundle directory.
|
java.lang.String |
getBundleFileName()
Returns the bundle file name.
|
java.lang.String |
getClassifier()
Returns the artifact's classifier.
|
java.lang.String |
getGroupId()
Returns the artifact's groupId.
|
java.lang.String |
getLibDir() |
java.lang.String |
getModuleId() |
java.lang.String |
getOriginalBundleFileName()
Based on MEAR-189 we need to get back
the original file name under any circumstances.
|
java.lang.String |
getUri()
Returns the URI for this module.
|
boolean |
isExcluded()
Specify whether this module should be excluded or not.
|
void |
resolveArtifact(java.util.Set<org.apache.maven.artifact.Artifact> artifacts)
Resolves the
Artifact represented by the module. |
void |
setEarExecutionContext(EarExecutionContext earExecutionContext) |
(package private) void |
setUri(java.lang.String uri)
Sets the URI of the module explicitly for testing purposes.
|
java.lang.Boolean |
shouldUnpack()
Specify whether this module should be unpacked in the EAR archive or not.
|
protected void |
startModuleElement(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.Boolean generateId)
Starts a new
MODULE_ELEMENT on the specified writer, possibly including an id attribute. |
java.lang.String |
toString() |
protected void |
writeAltDeploymentDescriptor(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String version)
Writes the alternative deployment descriptor if necessary.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappendModule, getTypeprotected static final java.lang.String MODULE_ELEMENT
protected static final java.lang.String JAVA_MODULE
protected static final java.lang.String ALT_DD
private org.apache.maven.artifact.Artifact artifact
private java.lang.String groupId
private java.lang.String artifactId
private java.lang.String classifier
protected java.lang.String bundleDir
protected java.lang.String bundleFileName
protected java.lang.Boolean excluded
false.private java.lang.String uri
protected java.lang.Boolean unpack
protected java.lang.String altDeploymentDescriptor
private java.lang.String moduleId
protected EarExecutionContext earExecutionContext
public AbstractEarModule()
public AbstractEarModule(org.apache.maven.artifact.Artifact a)
a - the artifactpublic void setEarExecutionContext(EarExecutionContext earExecutionContext)
setEarExecutionContext in interface EarModuleearExecutionContext - The execution context.public void resolveArtifact(java.util.Set<org.apache.maven.artifact.Artifact> artifacts)
throws EarPluginException,
org.apache.maven.plugin.MojoFailureException
Artifact represented by the module. Note that the EarExecutionContext might be used
to customize further the resolution.resolveArtifact in interface EarModuleartifacts - the project's artifactsEarPluginException - if the artifact could not be resolvedorg.apache.maven.plugin.MojoFailureException - if an unexpected error occurredpublic org.apache.maven.artifact.Artifact getArtifact()
EarModuleArtifact representing this module.
Note that this might return null till the module has been resolved.getArtifact in interface EarModuleartifactEarModule.resolveArtifact(java.util.Set)public java.lang.String getModuleId()
moduleIdpublic java.lang.String getUri()
EarModulepublic java.lang.String getGroupId()
groupIdpublic java.lang.String getArtifactId()
artifactIdpublic java.lang.String getClassifier()
public java.lang.String getBundleDir()
public java.lang.String getBundleFileName()
public java.lang.String getOriginalBundleFileName()
public java.lang.String getAltDeploymentDescriptor()
getAltDeploymentDescriptor in interface EarModulepublic boolean isExcluded()
isExcluded in interface EarModulepublic java.lang.Boolean shouldUnpack()
EarModuleshouldUnpack in interface EarModuleunpackprotected void writeAltDeploymentDescriptor(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.String version)
writer - the writer to useversion - the java EE version in useprotected void startModuleElement(org.codehaus.plexus.util.xml.XMLWriter writer,
java.lang.Boolean generateId)
MODULE_ELEMENT on the specified writer, possibly including an id attribute.writer - the XML writer.generateId - whether an id should be generatedpublic java.lang.String toString()
toString in class java.lang.Objectstatic java.lang.String cleanBundleDir(java.lang.String bundleDir)
bundleDir - the bundle directory to cleanstatic boolean areNullOrEqual(java.lang.Object first,
java.lang.Object second)
first - the first objectsecond - the second objectvoid setUri(java.lang.String uri)
uri - the uripublic boolean changeManifestClasspath()
changeManifestClasspath in interface EarModuletrue