Package org.apache.maven.plugins.ear
Interface EarModule
- All Known Implementing Classes:
AbstractEarModule
,AppClientModule
,EjbClientModule
,EjbModule
,HarModule
,JarModule
,ParModule
,RarModule
,SarModule
,WebModule
,WsrModule
public interface EarModule
The ear module interface.
- Author:
- Stephane Nicoll
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendModule
(org.codehaus.plexus.util.xml.XMLWriter writer, String version, Boolean generateId) Appends theXML
representation of this module.boolean
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
Returns theArtifact
representing this module.Returns the bundle file name.getType()
Returns the type associated to the module.getUri()
Returns theURI
for this module.boolean
If module should be included into the Class-Path entry of MANIFEST.mf.boolean
Specify whether this module should be excluded or not.void
resolveArtifact
(Set<org.apache.maven.artifact.Artifact> artifacts) Resolves theArtifact
represented by the module.void
setEarExecutionContext
(EarExecutionContext earExecutionContext) Specify whether this module should be unpacked in the EAR archive or not.
-
Method Details
-
getArtifact
org.apache.maven.artifact.Artifact getArtifact()Returns theArtifact
representing this module. Note that this might returnnull
till the module has been resolved.- Returns:
- the artifact
- See Also:
-
getUri
String getUri()Returns theURI
for this module.- Returns:
- the
URI
-
getType
String getType()Returns the type associated to the module.- Returns:
- the artifact's type of the module
-
isExcluded
boolean isExcluded()Specify whether this module should be excluded or not.- Returns:
- true if this module should be skipped, false otherwise
-
shouldUnpack
Boolean shouldUnpack()Specify whether this module should be unpacked in the EAR archive or not. Returns null if no configuration was specified so that defaulting may apply.- Returns:
- true if this module should be bundled unpacked, false otherwise
-
getAltDeploymentDescriptor
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. The URI must specify the full pathname of the deployment descriptor file relative to the application's root directory.- Returns:
- the alternative deployment descriptor for this module
- Since:
- JavaEE 5
-
appendModule
void appendModule(org.codehaus.plexus.util.xml.XMLWriter writer, String version, Boolean generateId) Appends theXML
representation of this module.- Parameters:
writer
- the writer to useversion
- the version of theapplication.xml
filegenerateId
- whether an id should be generated
-
resolveArtifact
void resolveArtifact(Set<org.apache.maven.artifact.Artifact> artifacts) throws EarPluginException, org.apache.maven.plugin.MojoFailureException Resolves theArtifact
represented by the module. Note that theEarExecutionContext
might be used to customize further the resolution.- Parameters:
artifacts
- the project's artifacts- Throws:
EarPluginException
- if the artifact could not be resolvedorg.apache.maven.plugin.MojoFailureException
- if an unexpected error occurred
-
setEarExecutionContext
- Parameters:
earExecutionContext
- The execution context.
-
changeManifestClasspath
boolean changeManifestClasspath()- Returns:
- the state if manifest classpath will be changed or not.
-
getLibDir
String getLibDir()- Returns:
- The directory of the module which contains the JAR libraries packaged within the module.
Can be
null
, which means that module doesn't contain any packaged libraries.
-
getBundleFileName
String getBundleFileName()Returns the bundle file name. Ifnull
, the artifact's file name is returned.- Returns:
- the bundle file name
-
isClassPathItem
boolean isClassPathItem()If module should be included into the Class-Path entry of MANIFEST.mf. Doesn't impact Class-Path entry of MANIFEST.mf of modules which contain all of their dependencies unless skinnyWars / skinnyModules is turned on.- Returns:
- True} if module should be included into the Class-Path entry of MANIFEST.mf
-