public abstract class AbstractEarModule extends Object implements EarModule
EarModule
.Modifier and Type | Field and Description |
---|---|
protected static String |
ALT_DD
The alt-dd module.
|
protected String |
altDeploymentDescriptor
The alternate deployment descriptor.
|
protected String |
bundleDir
The bundleDir.
|
protected String |
bundleFileName
The bundleFileName.
|
protected EarExecutionContext |
earExecutionContext
|
protected Boolean |
excluded
excluded by default
false . |
protected static String |
JAVA_MODULE
The java module.
|
protected static String |
MODULE_ELEMENT
The module element.
|
protected Boolean |
unpack
unpack
|
Constructor and Description |
---|
AbstractEarModule()
Empty constructor to be used when the module is built based on the configuration.
|
AbstractEarModule(Artifact a)
Creates an ear module from the artifact.
|
Modifier and Type | Method and Description |
---|---|
boolean |
changeManifestClasspath() |
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.
|
Artifact |
getArtifact()
Returns the
Artifact representing this module. |
String |
getArtifactId()
Returns the artifact's Id.
|
String |
getBundleDir()
Returns the bundle directory.
|
String |
getBundleFileName()
Returns the bundle file name.
|
String |
getClassifier()
Returns the artifact's classifier.
|
String |
getGroupId()
Returns the artifact's groupId.
|
String |
getLibDir() |
String |
getModuleId() |
String |
getOriginalBundleFileName()
Based on MEAR-189 we need to get back
the original file name under any circumstances.
|
String |
getUri()
Returns the URI for this module.
|
boolean |
isExcluded()
Specify whether this module should be excluded or not.
|
void |
resolveArtifact(Set<Artifact> artifacts)
Resolves the
Artifact represented by the module. |
void |
setEarExecutionContext(EarExecutionContext earExecutionContext) |
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,
Boolean generateId)
Starts a new
MODULE_ELEMENT on the specified writer, possibly including an id attribute. |
String |
toString() |
protected void |
writeAltDeploymentDescriptor(org.codehaus.plexus.util.xml.XMLWriter writer,
String version)
Writes the alternative deployment descriptor if necessary.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendModule, getType
protected static final String MODULE_ELEMENT
protected static final String JAVA_MODULE
protected static final String ALT_DD
protected String bundleDir
protected String bundleFileName
protected Boolean excluded
false
.protected Boolean unpack
protected String altDeploymentDescriptor
protected EarExecutionContext earExecutionContext
public AbstractEarModule()
public AbstractEarModule(Artifact a)
a
- the artifactpublic void setEarExecutionContext(EarExecutionContext earExecutionContext)
setEarExecutionContext
in interface EarModule
earExecutionContext
- The execution context.public void resolveArtifact(Set<Artifact> artifacts) throws EarPluginException, MojoFailureException
Artifact
represented by the module. Note that the EarExecutionContext
might be used
to customize further the resolution.resolveArtifact
in interface EarModule
artifacts
- the project's artifactsEarPluginException
- if the artifact could not be resolvedMojoFailureException
- if an unexpected error occurredpublic Artifact getArtifact()
EarModule
Artifact
representing this module.
Note that this might return null till the module has been resolved.getArtifact
in interface EarModule
artifact
EarModule.resolveArtifact(java.util.Set)
public String getUri()
EarModule
public String getArtifactId()
artifactId
public String getClassifier()
public String getBundleDir()
public String getBundleFileName()
public String getOriginalBundleFileName()
public String getAltDeploymentDescriptor()
getAltDeploymentDescriptor
in interface EarModule
public boolean isExcluded()
isExcluded
in interface EarModule
public Boolean shouldUnpack()
EarModule
shouldUnpack
in interface EarModule
unpack
protected void writeAltDeploymentDescriptor(org.codehaus.plexus.util.xml.XMLWriter writer, String version)
writer
- the writer to useversion
- the java EE version in useprotected void startModuleElement(org.codehaus.plexus.util.xml.XMLWriter writer, Boolean generateId)
MODULE_ELEMENT
on the specified writer, possibly including an id attribute.writer
- the XML writer.generateId
- whether an id should be generatedpublic boolean changeManifestClasspath()
changeManifestClasspath
in interface EarModule
true
Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.