Class WebModule

All Implemented Interfaces:
EarModule

public class WebModule extends AbstractEarModule
The EarModule implementation for a Web application module.
Author:
Stephane Nicoll
  • Field Details

    • DEFAULT_ARTIFACT_TYPE

      public static final String 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 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<org.apache.maven.artifact.Artifact> artifacts) throws EarPluginException, org.apache.maven.plugin.MojoFailureException
      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
      org.apache.maven.plugin.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