Class AbstractFileNameMapping
- java.lang.Object
-
- org.apache.maven.plugin.ear.output.AbstractFileNameMapping
-
- All Implemented Interfaces:
FileNameMapping
- Direct Known Subclasses:
FullFileNameMapping
,NoVersionFileNameMapping
,NoVersionForEjbFileNameMapping
,StandardFileNameMapping
public abstract class AbstractFileNameMapping extends java.lang.Object implements FileNameMapping
A base class used to generate the standard name of an artifact instead of relying on the (potentially) wrong file name provided byArtifact.getFile()
.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
useBaseVersion
-
Constructor Summary
Constructors Constructor Description AbstractFileNameMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
generateFileName(org.apache.maven.artifact.Artifact a, boolean addVersion)
Generates a standard file name for the specifiedArtifact
.void
setUseBaseVersion(boolean useBaseVersion)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.maven.plugin.ear.output.FileNameMapping
mapFileName
-
-
-
-
Method Detail
-
setUseBaseVersion
public final void setUseBaseVersion(boolean useBaseVersion)
- Specified by:
setUseBaseVersion
in interfaceFileNameMapping
- Parameters:
useBaseVersion
- true if the base version will be use false otherwise.
-
generateFileName
protected java.lang.String generateFileName(org.apache.maven.artifact.Artifact a, boolean addVersion)
Generates a standard file name for the specifiedArtifact
. Returns something like artifactId-version[-classifier].extension if addVersion is true. Otherwise it generates something like artifactId[-classifier].extension- Parameters:
a
- the artifact to generate a filename fromaddVersion
- whether the version should be added- Returns:
- the filename, with a standard format
-
-