org.apache.maven.plugin.ear
Class AbstractEarModule

java.lang.Object
  extended by org.apache.maven.plugin.ear.AbstractEarModule
All Implemented Interfaces:
EarModule
Direct Known Subclasses:
EjbModule, JavaModule, RarModule, SarModule, WebModule

public abstract class AbstractEarModule
extends java.lang.Object
implements EarModule

A base implementation of an EarModule.

Version:
$Id: AbstractEarModule.java 332974 2005-11-13 12:42:44Z snicoll $
Author:
Stephane Nicoll

Field Summary
protected  java.lang.String bundleDir
           
protected  java.lang.String bundleFileName
           
protected  java.lang.Boolean excluded
           
protected static java.lang.String MODULE_ELEMENT
           
 
Constructor Summary
AbstractEarModule()
          Empty constructor to be used when the module is built based on the configuration.
AbstractEarModule(org.apache.maven.artifact.Artifact a)
          Creates an ear module from the artifact.
 
Method Summary
 org.apache.maven.artifact.Artifact getArtifact()
          Returns the Artifact representing this module.
 java.lang.String getArtifactId()
          Returns the artifact's Id.
 java.lang.String getBundleDir()
          Returns the bundle directory.
 java.lang.String getBundleFileName()
          Returns the bundle file name.
 java.lang.String getGroupId()
          Returns the artifact's groupId.
protected abstract  java.lang.String getType()
          Returns the type associated to the module.
 java.lang.String getUri()
          Returns the URI for this module.
 boolean isExcluded()
          Specify whether this module should be excluded or not.
 void resolveArtifact(java.util.Set artifacts, java.lang.String defaultJavaBundleDir)
          Resolves the Artifact represented by the module with the specified execution configuration.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.maven.plugin.ear.EarModule
appendModule
 

Field Detail

MODULE_ELEMENT

protected static final java.lang.String MODULE_ELEMENT
See Also:
Constant Field Values

bundleDir

protected java.lang.String bundleDir

bundleFileName

protected java.lang.String bundleFileName

excluded

protected java.lang.Boolean excluded
Constructor Detail

AbstractEarModule

public AbstractEarModule()
Empty constructor to be used when the module is built based on the configuration.


AbstractEarModule

public AbstractEarModule(org.apache.maven.artifact.Artifact a)
Creates an ear module from the artifact.

Parameters:
a - the artifact
Method Detail

resolveArtifact

public void resolveArtifact(java.util.Set artifacts,
                            java.lang.String defaultJavaBundleDir)
                     throws org.apache.maven.plugin.MojoFailureException
Description copied from interface: EarModule
Resolves the Artifact represented by the module with the specified execution configuration.

Specified by:
resolveArtifact in interface EarModule
Parameters:
artifacts - the project's artifacts
defaultJavaBundleDir - the default bundle dir for JavaModule
Throws:
org.apache.maven.plugin.MojoFailureException

getType

protected abstract java.lang.String getType()
Returns the type associated to the module.

Returns:
the artifact's type of the module

getArtifact

public org.apache.maven.artifact.Artifact getArtifact()
Description copied from interface: EarModule
Returns the Artifact representing this module.

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

Specified by:
getArtifact in interface EarModule
Returns:
the artifact
See Also:
EarModule.resolveArtifact(java.util.Set, String)

getUri

public java.lang.String getUri()
Description copied from interface: EarModule
Returns the URI for this module.

Specified by:
getUri in interface EarModule
Returns:
the URI

getGroupId

public java.lang.String getGroupId()
Returns the artifact's groupId.

Returns:
the group Id

getArtifactId

public java.lang.String getArtifactId()
Returns the artifact's Id.

Returns:
the artifact Id

getBundleDir

public java.lang.String getBundleDir()
Returns the bundle directory. If null, the module is bundled in the root of the EAR.

Returns:
the custom bundle directory

getBundleFileName

public java.lang.String getBundleFileName()
Returns the bundle file name. If null, the artifact's file name is returned.

Returns:
the bundle file name

isExcluded

public boolean isExcluded()
Specify whether this module should be excluded or not.

Specified by:
isExcluded in interface EarModule
Returns:
true if this module should be skipped, false otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.