org.apache.maven.plugin.ear
Class WebModule

java.lang.Object
  extended by org.apache.maven.plugin.ear.AbstractEarModule
      extended by org.apache.maven.plugin.ear.WebModule
All Implemented Interfaces:
EarModule

public class WebModule
extends AbstractEarModule

The EarModule implementation for a Web application module.

Version:
$Id: WebModule.java 1228837 2012-01-08 13:19:38Z rfscholte $
Author:
Stephane Nicoll

Field Summary
protected static String CONTEXT_ROOT_FIELD
           
protected static String WEB_MODULE
           
protected static String WEB_URI_FIELD
           
 
Fields inherited from class org.apache.maven.plugin.ear.AbstractEarModule
ALT_DD, altDeploymentDescriptor, bundleDir, bundleFileName, earExecutionContext, excluded, JAVA_MODULE, MODULE_ELEMENT, unpack
 
Constructor Summary
WebModule()
           
WebModule(Artifact a)
           
 
Method Summary
 void appendModule(XMLWriter writer, String version, Boolean generateId)
          Appends the XML representation of this module.
 String getContextRoot()
          Returns the context root to use for the web module.
 String getLibDir()
           
 String getType()
          Returns the type associated to the module.
 void resolveArtifact(Set<Artifact> artifacts)
          Resolves the Artifact represented by the module.
 
Methods inherited from class org.apache.maven.plugin.ear.AbstractEarModule
changeManifestClasspath, getAltDeploymentDescriptor, getArtifact, getArtifactId, getBundleDir, getBundleFileName, getClassifier, getGroupId, getModuleId, getUri, isExcluded, setEarExecutionContext, shouldUnpack, startModuleElement, toString, writeAltDeploymentDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WEB_MODULE

protected static final String WEB_MODULE
See Also:
Constant Field Values

WEB_URI_FIELD

protected static final String WEB_URI_FIELD
See Also:
Constant Field Values

CONTEXT_ROOT_FIELD

protected static final String CONTEXT_ROOT_FIELD
See Also:
Constant Field Values
Constructor Detail

WebModule

public WebModule()

WebModule

public WebModule(Artifact a)
Method Detail

appendModule

public void appendModule(XMLWriter writer,
                         String version,
                         Boolean generateId)
Description copied from interface: EarModule
Appends the XML representation of this module.

Parameters:
writer - the writer to use
version - the version of the application.xml file
generateId - whether an id should be generated

resolveArtifact

public void resolveArtifact(Set<Artifact> artifacts)
                     throws EarPluginException,
                            MojoFailureException
Description copied from class: AbstractEarModule
Resolves the Artifact represented by the module. Note that the EarExecutionContext might be used to customize further the resolution.

Specified by:
resolveArtifact in interface EarModule
Overrides:
resolveArtifact in class AbstractEarModule
Parameters:
artifacts - the project's artifacts
Throws:
EarPluginException - if the artifact could not be resolved
MojoFailureException - if an unexpected error occurred

getContextRoot

public String getContextRoot()
Returns the context root to use for the web module.

Note that this might return null till the artifact has been resolved.

Returns:
the context root

getType

public String getType()
Description copied from interface: EarModule
Returns the type associated to the module.

Returns:
the artifact's type of the module

getLibDir

public String getLibDir()
Specified by:
getLibDir in interface EarModule
Overrides:
getLibDir in class AbstractEarModule


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.