Package org.apache.maven.plugins.ear
Class WebModule
java.lang.Object
org.apache.maven.plugins.ear.AbstractEarModule
org.apache.maven.plugins.ear.WebModule
- All Implemented Interfaces:
EarModule
The
EarModule
implementation for a Web application module.- Author:
- Stephane Nicoll
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Default type of the artifact of a Web application module.Fields inherited from class org.apache.maven.plugins.ear.AbstractEarModule
ALT_DD, altDeploymentDescriptor, bundleDir, bundleFileName, classPathItem, earExecutionContext, excluded, JAVA_MODULE, libDirectory, MODULE_ELEMENT, type, unpack
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendModule
(org.codehaus.plexus.util.xml.XMLWriter writer, String version, Boolean generateId) Appends theXML
representation of this module.Returns the context root to use for the web module.void
resolveArtifact
(Set<org.apache.maven.artifact.Artifact> artifacts) Resolves theArtifact
represented by the module.Methods inherited from class org.apache.maven.plugins.ear.AbstractEarModule
changeManifestClasspath, getAltDeploymentDescriptor, getArtifact, getArtifactId, getBundleDir, getBundleFileName, getClassifier, getGroupId, getLibDir, getModuleId, getType, getUri, isClassPathItem, isExcluded, setEarExecutionContext, shouldUnpack, startModuleElement, toString, writeAltDeploymentDescriptor
-
Field Details
-
DEFAULT_ARTIFACT_TYPE
Default type of the artifact of a Web application module.- See Also:
-
-
Constructor Details
-
WebModule
public WebModule()Create an instance. -
WebModule
public WebModule(org.apache.maven.artifact.Artifact a) - Parameters:
a
-Artifact
-
-
Method Details
-
appendModule
public 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
public 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.- Specified by:
resolveArtifact
in interfaceEarModule
- Overrides:
resolveArtifact
in classAbstractEarModule
- Parameters:
artifacts
- the project's artifacts- Throws:
EarPluginException
- if the artifact could not be resolvedorg.apache.maven.plugin.MojoFailureException
- if an unexpected error occurred
-
getContextRoot
Returns the context root to use for the web module. Note that this might returnnull
till the artifact has been resolved.- Returns:
- the context root
-