Package org.apache.maven.plugin.ear
Class JarModule
- java.lang.Object
-
- org.apache.maven.plugin.ear.AbstractEarModule
-
- org.apache.maven.plugin.ear.JarModule
-
- All Implemented Interfaces:
EarModule
- Direct Known Subclasses:
EjbClientModule
,JavaModule
public class JarModule extends AbstractEarModule
TheEarModule
implementation for a non J2EE module such as third party libraries. Such module is not incorporated in the generated application.xml but some application servers support it. To include it in the generated deployment descriptor anyway, set the includeInApplicationXml boolean flag. This class deprecatesJavaModule
.- Version:
- $Id: JarModule.java 1648046 2014-12-27 11:07:02Z khmarbaise $
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Boolean
includeInApplicationXml
-
Fields inherited from class org.apache.maven.plugin.ear.AbstractEarModule
ALT_DD, altDeploymentDescriptor, bundleDir, bundleFileName, earExecutionContext, excluded, JAVA_MODULE, MODULE_ELEMENT, unpack
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendModule(org.codehaus.plexus.util.xml.XMLWriter writer, java.lang.String version, java.lang.Boolean generateId)
Appends the XML representation of this module.boolean
changeManifestClasspath()
java.lang.String
getType()
Returns the type associated to the module.void
resolveArtifact(java.util.Set<org.apache.maven.artifact.Artifact> artifacts)
Resolves theArtifact
represented by the module.private void
setLibBundleDir(java.lang.String defaultLibBundleDir)
-
Methods inherited from class org.apache.maven.plugin.ear.AbstractEarModule
areNullOrEqual, cleanBundleDir, getAltDeploymentDescriptor, getArtifact, getArtifactId, getBundleDir, getBundleFileName, getClassifier, getGroupId, getLibDir, getModuleId, getOriginalBundleFileName, getUri, isExcluded, setEarExecutionContext, setUri, shouldUnpack, startModuleElement, toString, writeAltDeploymentDescriptor
-
-
-
-
Constructor Detail
-
JarModule
public JarModule()
Create an instance.
-
JarModule
public JarModule(org.apache.maven.artifact.Artifact a, java.lang.String defaultLibBundleDir, java.lang.Boolean includeInApplicationXml)
- Parameters:
a
-Artifact
defaultLibBundleDir
- The default library bundle directory.includeInApplicationXml
- Include the application xml or not.
-
-
Method Detail
-
appendModule
public void appendModule(org.codehaus.plexus.util.xml.XMLWriter writer, java.lang.String version, java.lang.Boolean generateId)
Appends the XML representation of this module.- Parameters:
writer
- the writer to useversion
- the version of the application.xml filegenerateId
- whether an id should be generated
-
resolveArtifact
public void resolveArtifact(java.util.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
-
getType
public java.lang.String getType()
Returns the type associated to the module.- Returns:
- the artifact's type of the module
-
setLibBundleDir
private void setLibBundleDir(java.lang.String defaultLibBundleDir)
-
changeManifestClasspath
public boolean changeManifestClasspath()
- Specified by:
changeManifestClasspath
in interfaceEarModule
- Overrides:
changeManifestClasspath
in classAbstractEarModule
- Returns:
- always
true
-
-